记录调通yolov5 5.0遇到的问题

2023年最新版本7.0但还是下了5.0 调通了detect和train.py 记录一下我遇到的bug!


【detect.py】:
1.大家都碰到的Can't get attribute 'SPPF' on <module 'models.common' 。因为代码自动下载的pt文件是目前最新的,与5.0版本不匹配,所以需要去5.0的release中手动下载yolov5s.pt放到项目文件夹中。
2.AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'。我在评论里找到 能拆家吗 的回复完美解决,https://blog.csdn.net/songhuangong123/article/details/125735434


【train.py】:(这个调死我了……)
1.module 'numpy' has no attribute 'int'。从报错信息中找到对应文件,修改np.int为np.int_
2.CUDA out of memory,在main函数中的参数中调小batch_size,亲测8可以运行
3.TypeError: No loop matching the specified signature and casting was found for ufunc greater。参考帖子https://blog.csdn.net/weixin_45819759/article/details/131229983的方法二。
4.RuntimeError: result type Float can‘t be cast to the desired output type __int64。参考帖子https://blog.csdn.net/weixin_54713879/article/details/125612388

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值