当前位置:网站首页>Pytorch——报错解决:“torch/optim/adamw.py” beta1, UnboundLocalError: local variable ‘beta1‘

Pytorch——报错解决:“torch/optim/adamw.py” beta1, UnboundLocalError: local variable ‘beta1‘

2022-06-22 16:29:00 Irving.Gao

报错截图

在这里插入图片描述

解决方法

该问题出现在Pytorch1.8.x版本,更新Pytorch至1.9.0即可解决。

在这里插入图片描述

卸载:

pip uninstall torch

重新安装1.9.0版本:

pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
原网站

版权声明
本文为[Irving.Gao]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_45779334/article/details/125380796