Save model state without suffering.
pip install torch-model-persistency
This project is currently developed and maintained by EyeCU Software Team. You are very welcomed to send an e-mail to head of developer team or open an issue for your future requests or bugs. It is always nice to hear from you. Stay safe!
from torch_persistency import ModulePersistency as MP
if __name__ == "__main__":
# Training code
mp = MP("checkpoint")
train_step(model)
mp.save(model,epoch)
torch_persistency has MIT license. You can find further details in LICENSE.