RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1 #805

时间:2020-01-25 09:35:43   收藏:0   阅读:648



具体错误日志如下:

The resulting error log is as follows
Traceback (most recent call last): File "train.py", line 441, in <module> train() # train normally File "train.py", line 324, in train dataloader=testloader) File "F:\train\yolov3hat\test.py", line 85, in test inf_out, train_out = model(imgs) # inference and training outputs File "D:\Program Files\Python\Python37\lib\site-packages\torch\nn\modules\module.py", line 532, in __call__ result = self.forward(*input, **kwargs) File "F:\train\yolov3hat\models.py", line 260, in forward return torch.cat(io, 1), p RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 7 and 85 in dimension 2 at C:/w/1/s/windows/pytorch/aten/src\THC/generic/THCTensorMath.cu:71


解决办法:













本次我提出的问题:

你应该检查你的 yolov3的配置文件中 全连接层的配置情况

原文:https://www.cnblogs.com/dgwblog/p/12232741.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!