Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
apex
Commits
4027bcba
Unverified
Commit
4027bcba
authored
Jul 16, 2020
by
Thor Johnsen
Committed by
GitHub
Jul 16, 2020
Browse files
Merge pull request #904 from ksivaman/sparsity
Fixed variable name
parents
1ff54b8f
59995c76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
apex/contrib/sparsity/asp.py
apex/contrib/sparsity/asp.py
+1
-1
No files found.
apex/contrib/sparsity/asp.py
View file @
4027bcba
...
...
@@ -102,7 +102,7 @@ class ASP:
print
(
"[ASP] Sparsifying %s::%s of size=%s and type=%s for sparsity"
%
(
module_name
,
p_name
,
str
(
p
.
size
()),
str
(
p
.
dtype
)))
mask
=
torch
.
ones_like
(
p
).
bool
()
buffname
=
name
.
split
(
"."
)[
-
1
]
# buffer names cannot contain "."
buffname
=
p_
name
.
split
(
"."
)[
-
1
]
# buffer names cannot contain "."
module
.
register_buffer
(
'__%s_mma_mask'
%
buffname
,
mask
)
if
allow_recompute_mask
:
pruned
=
torch
.
zeros_like
(
p
).
cpu
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment