-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added model saving, loading and checkpointing support to PyTorch #8
Conversation
I ran this command line after your addition: But nothing was saved. I removed the condition in the main script as a WA for now to see if it works, but the main problem is that this stage of reading the batched takes all day long, and so if the model wasn't saved (or any other issue) I need to start it all over again. Is there anything to do with it? Converted to tensors...done! |
After it finished to count the data it crashed. Reading in batch: 263115 / 263115 Testing data time/loss/accuracy (if enabled): |
Hi, can you try withy the latest version of the code since I'm not able to see the same issue at my end. Also, the model is saved only when the testing is done. So you would need to add --test-freq argument with a number of iterations interval for doing the testing. It would be best to set this to be sufficiently high since it this additional overhead of having to do evaluate on the whole test data-set. |
I guess what was missing the --test-freq. Now it seem to work. |
Happy to hear! Also, for quick tests you can use the —num-batches argument to quickly test by running with only a limited number of batches and once it works you can run with the full data-set |
Thanks a lot. |
…ebookresearch#8) * added model saving, loading and checkpointing support to PyTorch * minor fixes; updated README
Adds model saving/loading support for the PyTorch implementation -
--save-model="model file" (e.g: model.pt)
--load-model="model file" (e.g: model.pt)
Also, the saved model can be used with --inference-only to run only testing on a previously trained (and saved) model.