microsoft / nni

An open source AutoML toolkit for automate machine learning lifecycle, including feature engineering, neural architecture search, model compression and hyper-parameter tuning.
https://nni.readthedocs.io
MIT License
14.03k stars 1.81k forks source link

Res2Net/Res2Next series models prune error with assert len(set(num_channels_list)) == 1 #5427

Open moonlightian opened 1 year ago

moonlightian commented 1 year ago

With models from https://github.com/Res2Net/Res2Net-PretrainedModels prune with FPGMPruner I got same error as : File "/usr/local/lib/python3.7/dist-packages/nni/compression/pytorch/speedup/compressor.py", line 518, in speedup_model fix_mask_conflict(self.masks, self.bound_model, self.dummy_input) File "/usr/local/lib/python3.7/dist-packages/nni/compression/pytorch/utils/mask_conflict.py", line 54, in fix_mask_conflict masks = fix_channel_mask.fix_mask() File "/usr/local/lib/python3.7/dist-packages/nni/compression/pytorch/utils/mask_conflict.py", line 264, in fix_mask assert len(set(num_channels_list)) == 1

How could I get rid of such problems?

super-dainiu commented 1 year ago

It seems problem occured in the fix mask conflict stage. We are upgrading our code recently, and will come to you once the problem is solved.

vacing commented 1 year ago

same problem, looking formard a bugfix