You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when I prune resnet in structured type, I got error like this:
Traceback (most recent call last):
File "prune.py", line 131, in
pruner.prune(model, prune_rate)
File "/content/deep-compression-master/pruners/l1_pruner.py", line 70, in prune
self.structured_prune(model, prune_rate)
File "/content/deep-compression-master/pruners/l1_pruner.py", line 30, in structured_prune
threshold = np.percentile(channel_norms, prune_rate)
File "<array_function internals>", line 6, in percentile
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/function_base.py", line 3868, in percentile
a, q, axis, out, overwrite_input, interpolation, keepdims)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/function_base.py", line 3988, in _quantile_unchecked
interpolation=interpolation)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/function_base.py", line 3564, in _ureduce
r = func(a, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/function_base.py", line 4103, in _quantile_ureduce_func
)), axis=0)
ValueError: operands could not be broadcast together with shapes (128,) (64,)
It seems because some element's lenth in channel_norms list are different. What should I do?
The text was updated successfully, but these errors were encountered:
Hi, when I prune resnet in structured type, I got error like this:
Traceback (most recent call last):
File "prune.py", line 131, in
pruner.prune(model, prune_rate)
File "/content/deep-compression-master/pruners/l1_pruner.py", line 70, in prune
self.structured_prune(model, prune_rate)
File "/content/deep-compression-master/pruners/l1_pruner.py", line 30, in structured_prune
threshold = np.percentile(channel_norms, prune_rate)
File "<array_function internals>", line 6, in percentile
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/function_base.py", line 3868, in percentile
a, q, axis, out, overwrite_input, interpolation, keepdims)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/function_base.py", line 3988, in _quantile_unchecked
interpolation=interpolation)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/function_base.py", line 3564, in _ureduce
r = func(a, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/numpy/lib/function_base.py", line 4103, in _quantile_ureduce_func
)), axis=0)
ValueError: operands could not be broadcast together with shapes (128,) (64,)
It seems because some element's lenth in channel_norms list are different. What should I do?
The text was updated successfully, but these errors were encountered: