-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
identity_mask_propagation issue while trying to prune yolov5 #715
Comments
Download the yolov5s.pt from here and place it in the main directory: |
Hi @abuvaneswari |
Hi @AlexanderDokuchaev |
@daniil-lyakhov FYI |
Hello,
I am trying to prune yolov5 model and my env is as follows:
torch==1.8.1
torchvision==0.9.1
nncf==1.7.1
Python 3.6.8
No CUDA
While the sparsity compression works fine, filter pruning does not work. I get the following error message:
INFO:nncf:Computing filter importance scores and binary masks...
Traceback (most recent call last):
File "train.nncf.py", line 539, in
train(hyp, opt, device, tb_writer, wandb)
File "train.nncf.py", line 246, in train
compression_ctrl, compressed_model = create_compressed_model(model, nncf_config)
File "/home/tfs/venv_nncf/lib/python3.6/site-packages/nncf/model_creation.py", line 124, in create_compressed_model
compression_ctrl = composite_builder.build_controller(compressed_model)
File "/home/tfs/venv_nncf/lib/python3.6/site-packages/nncf/composite_compression.py", line 94, in build_controller
return self._child_builders[0].build_controller(model)
File "/home/tfs/venv_nncf/lib/python3.6/site-packages/nncf/pruning/filter_pruning/algo.py", line 66, in build_controller
self.config)
File "/home/tfs/venv_nncf/lib/python3.6/site-packages/nncf/pruning/filter_pruning/algo.py", line 108, in init
self.set_pruning_rate(self.pruning_init)
File "/home/tfs/venv_nncf/lib/python3.6/site-packages/nncf/pruning/filter_pruning/algo.py", line 336, in set_pruning_rate
self._apply_masks()
File "/home/tfs/venv_nncf/lib/python3.6/site-packages/nncf/pruning/filter_pruning/algo.py", line 537, in _apply_masks
MaskPropagationAlgorithm(graph, PT_PRUNING_OPERATOR_METATYPES).mask_propagation()
File "/home/tfs/venv_nncf/lib/python3.6/site-packages/nncf/common/pruning/mask_propagation.py", line 62, in mask_propagation
cls.mask_propagation(node, self._graph)
File "/home/tfs/venv_nncf/lib/python3.6/site-packages/nncf/pruning/export_helpers.py", line 144, in mask_propagation
identity_mask_propagation(node, graph)
File "/home/tfs/venv_nncf/lib/python3.6/site-packages/nncf/common/pruning/mask_propagation.py", line 80, in identity_mask_propagation
assert len(input_masks) == 1
AssertionError
I will share a zip of the directory with files.
To reproduce this error:
The text was updated successfully, but these errors were encountered: