yolov5运行以及训练时报错的问题

当我运行时会报一些错误,首先采用下面两个链接的方式解决,亲测有效,这里进行一个汇总。

当遇到:AttributeError: Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from ... 问题时

看此链接:

(115条消息) AttributeError: Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from ‘H:\\yolov5-5.0\\models\\_啥也不是的py人的博客-CSDN博客

作者是:

啥也不是的py人

当遇到:YOLOV5 | AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘  问题时

看此链接:(114条消息) YOLOV5 | AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘ 问题解决 亲测有效_RodgeH的博客-CSDN博客

作者是:

RodgeH

最后如果遇到 RuntimeError: The size of tensor a (60) must match the size of tensor b (56) at non-singleton dimension 3 这个问题应该是训练版本不一致的原因,因为有的人在官网可能找不到对应的版本,所以我将yolov5s.pt放在我的百度网盘上,链接如下:https://pan.baidu.com/s/1dpD7vldIdfBBdNkDq99BfQ?pwd=8mf0 
提取码:8mf0

将此文件下载后放在:

 运行后的结果在:

若需要在本地自己训练则需要下载coco128.zip,然后解压。https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip

若运行时自动下载失败则推荐使用迅雷下载,然后将解压后的文件放在yolov5文件夹的上一级(此处我是根据系统提示放置的,你们的可能会不同)

 

此时点开train.py文件,可能在运行时会报 RuntimeError: result type Float can‘t be cast to the desired output type long int 的错。

看此链接:

(115条消息) 一步真实解决RuntimeError: result type Float can‘t be cast to the desired output type long int_蓝胖胖▸的博客-CSDN博客

作者是:

蓝胖胖▸

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值