https://github.com/pytorch/pytorch/issues/22844
时间: 2023-02-24 18:34:12 浏览: 87
这个问题是关于 PyTorch 的一个 bug。提问者发现在使用 PyTorch 训练模型时,如果开启了 GPU 加速,模型会输出错误的结果。目前,这个问题仍然没有得到解决,PyTorch 团队正在努力解决这个问题。
相关问题
AMP: checks failed ❌, disabling Automatic Mixed Precision. See https://github.com/ultralytics/yolov5/issues/7908
这个问题是由于使用了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自动混合精度训练。
UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()` to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available. Please open an issue if you are unable to replicate your use case: https://github.com/pytorch/pytorch/issues/new/choose. warnings.warn(EPOCH_DEPRECATION_WARNING, UserWarning)
警告:`scheduler.step()`中的时代参数不是必需的,正在尽可能地弃用。请使用`scheduler.step()`来步进调度程序。在淘汰期间,如果时代与none不同,则使用闭合形式,而不是可链式形式(如果可用)。如果无法复制您的用例,请打开问题:https://github.com/pytorch/pytorch/issues/new/choose。 警告(epoch_deprecation_warning,userwarning)
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.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)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)