Checkpointing

Learn about running a classy pipeline for checkpointing and resuming training steps.

Saving checkpoints

To checkpoint the model to resume training later, we can use the save_checkpoint method, which handles the state dictionaries for us and saves them to a file:

Press + to interact
# Saving checkpoint of model
sbs.save_checkpoint('model_checkpoint.pth')

Resuming training

Remember, when we did this in the chapter, Rethinking the Training Loop, we had to set up the stage before actually loading the model, loading the data, and ...

Access this course and 1400+ top-rated courses and projects.