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
{{ message }}
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
Assertion error: number of channels in same set should be identical
Error Trace
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
Cell In[108], line 1
----> 1 model = ModelSpeedup(model, [dummy_input], masks, garbage_collect_values=False).speedup_model()
File /usr/local/lib/python3.8/dist-packages/nni/compression/speedup/model_speedup.py:429, in ModelSpeedup.speedup_model(self)
427 self.logger.info('Resolve the mask conflict before mask propagate...')
428 # fix_mask_conflict(self.masks, self.graph_module, self.dummy_input)
--> 429 self.fix_mask_conflict()
430 self.logger.info('Infer module masks...')
431 self.initialize_propagate(self.dummy_input)
File /usr/local/lib/python3.8/dist-packages/nni/compression/speedup/model_speedup.py:243, in ModelSpeedup.fix_mask_conflict(self)
241 def fix_mask_conflict(self):
242 fix_group_mask_conflict(self.graph_module, self.masks)
--> 243 fix_channel_mask_conflict(self.graph_module, self.masks)
244 fix_weight_sharing_mask_conflict(self.graph_module, self.masks)
File /usr/local/lib/python3.8/dist-packages/nni/compression/speedup/mask_conflict.py:296, in fix_channel_mask_conflict(graph_module, masks)
294 num_channels_list = [len(x) for x in channel_masks if x is not None]
295 # number of channels in same set should be identical
--> 296 assert len(set(num_channels_list)) == 1
297 num_channels = num_channels_list[0]
299 for i, dim_mask in enumerate(channel_masks):
AssertionError:
The same code works fine without self.conv3 and self.bn3.
The text was updated successfully, but these errors were encountered:
ModelSpeedup does not alter the model successfully for a model with 3 successive conv blocks.
Environment:
Reproduce the problem
sparsity_ratio
L1NormPruner
ModelSpeedup
withbatch_size
parameterMinimal Code
Error:
Assertion error: number of channels in same set should be identical
Error Trace
The same code works fine without
self.conv3
andself.bn3
.The text was updated successfully, but these errors were encountered: