Open broliao opened 5 years ago
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. 师兄,你好,方便留个QQ号或者微信号交流一下这个代码吗
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.