yolo训练时出现AttributeError: module ‘numpy‘ has no attribute ‘int‘的解决方法

背景

在yolo训练最后一步的时候(在最后一步,跳出这个真搞心态),出现

AttributeError: module ‘numpy’ has no attribute ‘int’
yolo训练时出现AttributeError: module ‘numpy‘ has no attribute ‘int‘的解决方法_第1张图片

解决过程

方法一

博客链接
yolo训练时出现AttributeError: module ‘numpy‘ has no attribute ‘int‘的解决方法_第2张图片
我试了,还是报原来的错误(你也可以自己试一试)

方法二

1、重新安装numpy,可以在下面的位置输入:
yolo训练时出现AttributeError: module ‘numpy‘ has no attribute ‘int‘的解决方法_第3张图片

pip uninstall numpy     #可以省略
pip install numpy==1.22

亲测有效,但是我又跳出了下面这个问题

RuntimeError: result type Float can’t be cast to the desired output type __int64

如果,你也出现了这个问题,可以参考,下面的方法!!!
解决方法,点这里

你可能感兴趣的:(numpy,YOLO,python)