Skip to content
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

RuntimeError: size mismatch, m1: [8 x 1], m2: [8 x 1] at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:283 #148

Open
kust-yhk opened this issue Jul 31, 2021 · 0 comments

Comments

@kust-yhk
Copy link

2021-07-31 09-33-33屏幕截图
您好,请问一下将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
请问该如何解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant