YOLO模型conda环境配置中的问题

下面的问题是我在配置yolo系列模型过程中遇到的报错问题,我将它汇总在这,这篇文章更新。

1.AttributeError: module 'numpy' has no attribute 'int'.

AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

出现这一报错,是由于np.int属性在NumPy 1.20中被弃用,即不能再写np.int,解决办法有两种:

(1)降低numpy版本等级,降低到Numpy 1.20一下:直接输入以下指令:

pip install numpy==1.19.0

(2)按照报错指引依次将源码中np.int更改为np.int64

建议使用第2种方法,第1种方法可能存在库间的兼容性问题,容易引起其他报错

2.RuntimeError: Unable to find a valid cuDNN algorithm to run convolution

RuntimeError: Unable to find a valid cuDNN algorithm to run convolution

报错原因:电脑的显卡不支持过高的batch-size,只需调小batch-size即可。需要注意的是batch-size需要时2的倍数。我是从64降低到32便不再报错,这需根据自己的电脑显卡的大小来决定。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值