In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `l

在yolov5-6.2时,因为改了下面这个:
In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `l_第1张图片
出现警告:

UserWarning: Detected call of `lr_scheduler.step()` before `optimizer.step()`. In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `lr_scheduler.step()`.

后来看到下图,想起来自己当初为了看学习率曲线解除了注释。后来再注释上就不报警告了。
In PyTorch 1.1.0 and later, you should call them in the opposite order: `optimizer.step()` before `l_第2张图片
也有人降低CUDA版本后也没有报警告:https://blog.csdn.net/qq_53826655/article/details/124266850

你可能感兴趣的:(环境搭建+包安装+搭建小错误,pytorch,深度学习,人工智能)