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
A clear and concise description of what the bug is.
when code run try_prune function in group_fisher/mutator.py show the IndexError: from sefl.mutable_units[0].
I check the sefl.mutable_units length is zero. But I don't know where to set sefl.mutable_units and why its zero.
To Reproduce
The group_fisher_act_prune.py
############################################################################# base = 'mmdet::/RTMDet_M_group_fisher/RTMDet_ins_M.py'
pretrained_path = '/root/xxxx/best_coco_bbox_mAP_epoch_580.pth' # noqa
Your train log file if you meet the problem during training.
Traceback (most recent call last):
File "/root/louis/mm/mmrazor/tools/train.py", line 121, in
main()
File "/root/louis/mm/mmrazor/tools/train.py", line 117, in main
runner.train()
File "/root/louis/mm/MMengine/mmengine/runner/runner.py", line 1755, in train
model = self.train_loop.run() # type: ignore
File "/root/louis/mm/MMengine/mmengine/runner/loops.py", line 97, in run
self.run_epoch()
File "/root/louis/mm/MMengine/mmengine/runner/loops.py", line 113, in run_epoch
self.run_iter(idx, data_batch)
File "/root/louis/mm/MMengine/mmengine/runner/loops.py", line 129, in run_iter
outputs = self.runner.model.train_step(
File "/root/louis/mm/mmrazor/mmrazor/implementations/pruning/group_fisher/algorithm.py", line 61, in train_step
return self._train_step(data, optim_wrapper)
File "/root/louis/mm/mmrazor/mmrazor/implementations/pruning/group_fisher/algorithm.py", line 73, in _train_step
self.mutator.try_prune()
File "/root/louis/mm/mmrazor/mmrazor/implementations/pruning/group_fisher/mutator.py", line 60, in try_prune
min_unit = self.mutable_units[0]
IndexError: list index out of range
Other code you modified in the mmrazor folder.
[here]
Additional context
Add any other context about the problem here.
[here]
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
when code run try_prune function in group_fisher/mutator.py show the IndexError: from sefl.mutable_units[0].
I check the sefl.mutable_units length is zero. But I don't know where to set sefl.mutable_units and why its zero.
To Reproduce
The group_fisher_act_prune.py
#############################################################################
base = 'mmdet::/RTMDet_M_group_fisher/RTMDet_ins_M.py'
pretrained_path = '/root/xxxx/best_coco_bbox_mAP_epoch_580.pth' # noqa
interval = 10
normalization_type = 'act'
lr_ratio = 0.1
target_flop_ratio = 0.5
input_shape = (1, 6, 960, 960)
##############################################################################
architecture = base.model
if hasattr(base, 'data_preprocessor'):
architecture.update({'data_preprocessor': base.data_preprocessor})
data_preprocessor = {}
architecture.init_cfg = dict(type='Pretrained', checkpoint=pretrained_path)
architecture['scope'] = base.default_scope
architecture.backbone.frozen_stages = -1
model = dict(
delete=True,
scope='mmrazor',
type='GroupFisherAlgorithm',
architecture=architecture,
interval=interval,
mutator=dict(
type='GroupFisherChannelMutator',
parse_cfg=dict(type='ChannelAnalyzer', demo_input=input_shape, tracer_type='FxTracer'),
channel_unit_cfg=dict(
type='GroupFisherChannelUnit',
default_args=dict(normalization_type=normalization_type, ),
),
),
)
model_wrapper_cfg = dict(
type='mmrazor.GroupFisherDDP',
broadcast_buffers=False,
)
optim_wrapper = dict(
optimizer=dict(lr=base.optim_wrapper.optimizer.lr * lr_ratio))
custom_hooks = getattr(base, 'custom_hooks', []) + [
dict(type='mmrazor.PruningStructureHook'),
dict(
type='mmrazor.ResourceInfoHook',
interval=interval,
demo_input=dict(
type='mmrazor.DefaultDemoInput',
input_shape=input_shape,
),
save_ckpt_thr=[target_flop_ratio],
),
]
Post related information
pip list | grep "mmcv\|mmrazor\|^torch"
[here]
Traceback (most recent call last):
File "/root/louis/mm/mmrazor/tools/train.py", line 121, in
main()
File "/root/louis/mm/mmrazor/tools/train.py", line 117, in main
runner.train()
File "/root/louis/mm/MMengine/mmengine/runner/runner.py", line 1755, in train
model = self.train_loop.run() # type: ignore
File "/root/louis/mm/MMengine/mmengine/runner/loops.py", line 97, in run
self.run_epoch()
File "/root/louis/mm/MMengine/mmengine/runner/loops.py", line 113, in run_epoch
self.run_iter(idx, data_batch)
File "/root/louis/mm/MMengine/mmengine/runner/loops.py", line 129, in run_iter
outputs = self.runner.model.train_step(
File "/root/louis/mm/mmrazor/mmrazor/implementations/pruning/group_fisher/algorithm.py", line 61, in train_step
return self._train_step(data, optim_wrapper)
File "/root/louis/mm/mmrazor/mmrazor/implementations/pruning/group_fisher/algorithm.py", line 73, in _train_step
self.mutator.try_prune()
File "/root/louis/mm/mmrazor/mmrazor/implementations/pruning/group_fisher/mutator.py", line 60, in try_prune
min_unit = self.mutable_units[0]
IndexError: list index out of range
mmrazor
folder.[here]
Additional context
Add any other context about the problem here.
[here]
The text was updated successfully, but these errors were encountered: