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()
. Failure to do this will result in PyTorch skipping the first value of the learning rate schedule.
在' optimizer.step() '之前检测到' lr scheduler.step() '的调用。在PyTorch 1.1.0及以后版本中,你应该以相反的顺序调用它们:' optimizer.step() '在' lr scheduler.step() '之前。如果做不到这一点,将导致PyTorch跳过学习速率计划的第一个值。