运行python models/tf.py --weight weights/yolov5s.pt --cfg models/yolov5s.yaml --img 320报错:AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. 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
时间: 2023-12-10 16:39:31 浏览: 102
yolov3-tiny_wk_caffemodel_prototxt_cfg_weights.rar
5星 · 资源好评率100%
这个错误是因为 numpy 库的版本不兼容导致的。您可以尝试升级 numpy 库到最新版本,可以使用以下命令进行升级:
```
pip install --upgrade numpy
```
如果您已经安装了最新版本的 numpy 库,可以尝试降低 numpy 库的版本,例如:
```
pip install numpy==1.19.3
```
这应该会解决您遇到的问题。
阅读全文