Pytorch中报错RuntimeError: The size of tensor a (60) must match the size of tensor b (56)

YOLOV5中报错:RuntimeError: The size of tensor a (60) must match the size of tensor b (56) at non-singleton dimension 3


YOLOV5

最近在学习YOLOV5的时候,刚开始遇到了如下的问题:

RuntimeError: The size of tensor a (60) must match the size of tensor b (56) at non-singLeton dimension 3

原因分析:

这可能是因为5.0的工程下载了个6.1的模型,所以不匹配


解决方案:

yolov5s.pt
[https://github.com/ultralytics/yolov5/releases/download/v5.0/yolov5s.pt]
下载下来替换掉工程文件夹里的yolov5s.pt文件
发现下面这个问题直接消失了!

RuntimeError: The size of tensor a (60) must match the size of tensor b (56) at non-singLeton dimension 3

顺利完成
Pytorch中报错RuntimeError: The size of tensor a (60) must match the size of tensor b (56)_第1张图片

如果对你有用麻烦点个赞,谢谢啦!

你可能感兴趣的:(YOLOV5学习,机器学习,深度学习,pytorch,opencv)