Skip to content
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

could you give an example of how to save checkpoints? #47

Closed
tomisalready opened this issue Oct 7, 2021 · 3 comments
Closed

could you give an example of how to save checkpoints? #47

tomisalready opened this issue Oct 7, 2021 · 3 comments

Comments

@tomisalready
Copy link

unfortunately, as i upgrade the ignite, i don't know how to save my model's checkpoints, becuase the save_interval is deprecated, my code is below, but it doesn' work.
checkpointer = ModelCheckpoint(output_dir, cfg.MODEL.NAME, n_saved=10, require_empty=False) trainer.add_event_handler(Events.EPOCH_COMPLETED(every=1), checkpointer, to_save={'model': model, 'optimizer': optimizer})

please give an example, thanks

@vfdev-5
Copy link
Member

vfdev-5 commented Oct 7, 2021

Hi @tomisalready can you give ignite version and the error you get ? Thanks

@tomisalready
Copy link
Author

i install the pytorch-ignite 0.4.6, but save_interval is deprecated in this version, i want save my trainning checkpoints, there's no example of how to save this. could you offer an example? thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants