
您好,请问一下将Yolov4的骨干网络换成ghostnet后能进行稀疏化训练,通道剪枝时好像在生成模型时报错:
Traceback (most recent call last):
File "normal_prune.py", line 159, in
pruned_model = prune_model_keep_size(model, prune_idx, CBL_idx, CBLidx2mask)
File "/home/yhk/YOLOv4-GhostNet/utils/prune_utils.py", line 287, in prune_model_keep_size
update_activation(i, pruned_model, activation, CBL_idx)
File "/home/yhk/YOLOv4-GhostNet/utils/prune_utils.py", line 398, in update_activation
offset = conv_sum.matmul(activation.reshape(-1, 1)).reshape(-1)
RuntimeError: size mismatch, m1: [8 x 1], m2: [8 x 1] at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:283
请问该如何解决