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
59995c76
Commit
59995c76
authored
Jul 01, 2020
by
Kirthi Sivamani
Browse files
name -> p_name (name variable is out of scope)
parent
73666989
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 @
59995c76
...
...
@@ -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