AMP: checks failed ❌, disabling Automatic Mixed Precision. See https://github.com/ultralytics/yolov5/issues/7908
时间: 2023-07-14 13:52:53 浏览: 1398
这个问题是由于使用了PyTorch 1.7版本以上的版本,导致的Automatic Mixed Precision(AMP)自动混合精度训练失败。您可以尝试以下几种解决方法:
1.升级PyTorch版本到1.7及以上。
2.在训练代码中禁用AMP自动混合精度训练,可以通过在代码中加入以下语句实现:
```
opt_level = 'O1' # 或者 'O2', 'O3'
model, optimizer = amp.initialize(model, optimizer, opt_level=opt_level)
```
3.检查您的显卡是否支持半精度浮点数运算,如果不支持,则无法使用AMP自动混合精度训练。
相关问题
github: skipping check (offline), for updates see https://github.com/ultralytics/yolov5 Traceback (most recent call last): File "train.py", line 630, in <module> main(opt) File "train.py", line 499, in main check_file(opt.data), check_yaml(opt.cfg), check_yaml(opt.hyp), str(opt.weights), str(opt.project) # checks File "/home/zy/yolov5/utils/general.py", line 428, in check_yaml return check_file(file, suffix) File "/home/zy/yolov5/utils/general.py", line 454, in check_file assert len(files), f'File not found: {file}' # assert file was found AssertionError: File not found: data/hyps/hyp.scratch-low.yaml
这个错误提示和之前的一样,是说在 train.py 文件的第630行出现了错误,具体是在 main 函数中的某个地方出现了问题。可能是由于缺少某些文件导致的,比如 data/hyps/hyp.scratch-low.yaml 这个文件没有找到。建议检查一下这个文件是否存在,或者路径是否正确。另外,由于你之前的提示中提到了 Github 离线,也有可能是因为无法连接到 Github 服务器导致无法下载所需文件。
W0710 23:30:54.833759 12361 checks.go:835] detected that the sandbox image "registry.k8s.io/pause:3.6" of the container runtime is inconsistent with that used by kubeadm. It is recommended that using "registry.aliyuncs.com/google_containers/pause:3.9" as the CRI sandbox image.
您好!对于您的问题,建议您使用"registry.aliyuncs.com/google_containers/pause:3.9"作为CRI容器运行时的沙箱镜像。这是因为检测到您当前使用的沙箱镜像"registry.k8s.io/pause:3.6"与kubeadm使用的镜像不一致。更换为匹配的镜像可以确保系统的一致性和稳定性。
阅读全文
相关推荐
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![exe](https://img-home.csdnimg.cn/images/20241231044909.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)