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

run purne.py error #7

Open
broliao opened this issue Sep 12, 2019 · 4 comments
Open

run purne.py error #7

broliao opened this issue Sep 12, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@broliao
Copy link

broliao commented Sep 12, 2019

when I run prune.py with follow parameter,
Namespace(cfg='cfg/yolov3-spp.cfg', img_size=608, overall_ratio=0.5, perlayer_ratio=0.1, save='prune_0.5_0.1', weights='weights/best.pt')
Using CUDA device0 _CudaDeviceProperties(name='GeForce GTX 1060 6GB', total_memory=6078MB)

i get the error:

Traceback (most recent call last):
File "/home/broliao/桌面/yolov3-slimyolov3/prune.py", line 396, in
opt.perlayer_ratio,
File "/home/broliao/桌面/yolov3-slimyolov3/prune.py", line 344, in test
inf_out, train_out = pruned_model(imgs) # inference and training outputs
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/broliao/桌面/yolov3-slimyolov3/models.py", line 226, in forward
x = torch.cat([layer_outputs[i] for i in layers], 1)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 13 and 28 in dimension 2 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:71

who can help me?thanks a lot.

@broliao broliao added the bug Something isn't working label Sep 12, 2019
@ASONG0506
Copy link

@broliao
Copy link
Author

broliao commented Sep 25, 2019

@ASONG0506 thanks for your reply, I will try it.

@May-forever
Copy link

when I run prune.py with follow parameter,
Namespace(cfg='cfg/yolov3-spp.cfg', img_size=608, overall_ratio=0.5, perlayer_ratio=0.1, save='prune_0.5_0.1', weights='weights/best.pt')
Using CUDA device0 _CudaDeviceProperties(name='GeForce GTX 1060 6GB', total_memory=6078MB)

i get the error:

Traceback (most recent call last):
File "/home/broliao/桌面/yolov3-slimyolov3/prune.py", line 396, in
opt.perlayer_ratio,
File "/home/broliao/桌面/yolov3-slimyolov3/prune.py", line 344, in test
inf_out, train_out = pruned_model(imgs) # inference and training outputs
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/broliao/桌面/yolov3-slimyolov3/models.py", line 226, in forward
x = torch.cat([layer_outputs[i] for i in layers], 1)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 13 and 28 in dimension 2 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:71

who can help me?thanks a lot.

师兄,你好,我在win10上配置了这个工程,用来修剪我自己的网络(不是YOLOv3),但是报了下面这个错,你能帮我看看问题出在哪吗?先谢谢师兄了
1

@zbyuan
Copy link

zbyuan commented Oct 23, 2019

@broliao @ASONG0506
hai I have encountered the same mistake, have you solved it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants