mmrazor: [Bug] 'AutoSlim' object has no attribute 'channel_cfg'

Describe the bug

Refer to Pruning-Split Checkpoint(Optional) for the following command:

$ python ./tools/model_converters/split_checkpoint.py \
>   configs/pruning/autoslim/autoslim_mbv2_supernet_8xb256_ci10.py \
>   output/epoch_49.pth \
>   --channel-cfgs output/subnet_497881198.yaml,output/subnet_297081551.yaml,output/subnet_197465826.yaml
load checkpoint from local path: output/epoch_49.pth
Traceback (most recent call last):
  File "./tools/model_converters/split_checkpoint.py", line 69, in <module>
    main()
  File "./tools/model_converters/split_checkpoint.py", line 60, in main
    algorithm.channel_cfg[i])
  File "/home/tanghuayang/venv_torch/lib64/python3.6/site-packages/torch/nn/modules/module.py", line 948, in __getattr__
    type(self).__name__, name))
AttributeError: 'AutoSlim' object has no attribute 'channel_cfg'

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Hi tanghy2016, do you set retraining to True in algorithm config?


algorithm = dict(
	# ...
	retraining=True
	# ...
)