`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
时间: 2023-07-29 21:14:22 浏览: 474
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. \[1\]\[2\]\[3\]
这个报错是因为在训练YOLO模型时使用了已经被弃用的`np.int`别名,而新版本的NumPy中已经不再支持这个别名。为了避免这个错误,你需要直接使用`int`关键字。如果需要指定精度,可以使用`np.int64`或`np.int32`。如果你想查看当前使用情况,可以参考发布说明链接获取更多信息。这个别名在NumPy 1.20中被弃用。\[1\]\[2\]\[3\]
#### 引用[.reference_title]
- *1* *3* [【YOLO问题记录】AttributeError: module ‘numpy‘ has no attribute ‘int‘.解决方案](https://blog.csdn.net/weixin_51972142/article/details/130664737)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [yolov5lite v1.4 踩坑记录](https://blog.csdn.net/weixin_51732593/article/details/130878662)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文