Hello everybody,
I’m creating a script in order to save a model and, then, load the checkpoint in a second moment to resume the training.
It works very well, but I have a doubt on the point in which I have to save the scheduler. I write here the two codes and could you tell me which one is correct?

Save the scheduler before the step function

for e in range(start_epoch, epochs):
    train(...)
    val(...)
    save_checkpoint(...)
    scheduler.step()


Save the scheduler after the step function

for e in range(start_epoch, epochs):
    train(...)
    val(...)
    scheduler.step()
    save_checkpoint(...)

With the save_checkpoint() function, I save the model, the number of the epoch, the optimizer and the scheduler.
Thank you very much for your help.