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
nni
Commits
aea82f23
Unverified
Commit
aea82f23
authored
Dec 02, 2020
by
Ningxin Zheng
Committed by
GitHub
Dec 02, 2020
Browse files
Fix a small bug in the dependency_aware mode. (#3143)
Signed-off-by:
Ningxin
<
Ningxin.Zheng@microsoft.com
>
parent
95f731e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
nni/algorithms/compression/pytorch/pruning/structured_pruning.py
...orithms/compression/pytorch/pruning/structured_pruning.py
+2
-1
No files found.
nni/algorithms/compression/pytorch/pruning/structured_pruning.py
View file @
aea82f23
...
@@ -278,7 +278,8 @@ class StructuredWeightMasker(WeightMasker):
...
@@ -278,7 +278,8 @@ class StructuredWeightMasker(WeightMasker):
sparsity
,
_w
,
_w_idx
)
sparsity
,
_w
,
_w_idx
)
num_total
=
current_weight
.
size
(
0
)
num_total
=
current_weight
.
size
(
0
)
if
num_total
<
2
or
num_prune
<
1
:
if
num_total
<
2
or
num_prune
<
1
:
return
base_mask
masks
[
name
]
=
base_mask
continue
_tmp_mask
=
self
.
get_mask
(
_tmp_mask
=
self
.
get_mask
(
base_mask
,
current_weight
,
num_prune
,
_w
,
_w_idx
,
channel_masks
)
base_mask
,
current_weight
,
num_prune
,
_w
,
_w_idx
,
channel_masks
)
...
...
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