在yolov5-6.2时,因为改了下面这个:
出现警告:
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()`.
后来看到下图,想起来自己当初为了看学习率曲线解除了注释。后来再注释上就不报警告了。
也有人降低CUDA版本后也没有报警告:https://blog.csdn.net/qq_53826655/article/details/124266850