Help Implementing Checkpoint Loader? #3743
Replies: 2 comments
-
Hi @jmenville11 , Seems you saved a dict of data to ckpt, please only load the Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hi and good day @jmenville11 , Thank you for the wonderful question! I was able to reproduce it and suspected it could be due to the arrangement of model.to(device). Below is the code that I have changed from your original code and the error that prompts.
Also, I believe @Nic-Ma was referencing to this. It can be referred from this link https://pytorch.org/tutorials/recipes/recipes/saving_and_loading_a_general_checkpoint.html . The code I have attached down here is from the link, where you may refer to for better clarity.
This should now solve the problem. Credits to @Nic-Ma for pointing it out. I am leaving this here in case anyone encounters similar issue before. Regards, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to write my code so that my model saves every 50 epochs. Then, if the code is interrupted for whatever reason, I can load the last checkpoint and continue training from there. However, I'm having some issues with tensor agreement. Can you advise if I'm implementing CheckpointLoader wrong?
Jesse
Error:

Beta Was this translation helpful? Give feedback.
All reactions