tanluren / yolov3-channel-and-layer-pruning

yolov3 yolov4 channel and layer pruning, Knowledge Distillation 层剪枝,通道剪枝,知识蒸馏
Apache License 2.0
1.5k stars 446 forks source link

Traceback (most recent call last): File "slim_prune.py", line 153, in <module> prune_and_eval(model, CBL_idx, CBLidx2mask) File "slim_prune.py", line 145, in prune_and_eval bn_module.weight.data.mul_(mask) RuntimeError: output with shape [256] doesn't match the broadcast shape [1, 256] #111

Open Kuuuo opened 3 years ago

Kuuuo commented 3 years ago

tanluren大佬,您好,我修改了yolov3的cfg文件,加入了SE注意力机制,并且稀疏训练成功。 但在slim_prune.py剪枝过程中,出现了以下错误:

merge the mask of layers connected to shortcut! Traceback (most recent call last): File "slim_prune.py", line 153, in prune_and_eval(model, CBL_idx, CBLidx2mask) File "slim_prune.py", line 145, in prune_and_eval bnmodule.weight.data.mul(mask) RuntimeError: output with shape [256] doesn't match the broadcast shape [1, 256]

请问大佬,您知道这是原因吗?

zbyuan commented 3 years ago

不支持该模块