Closed tqdungctuct closed 3 years ago
Just set the ``save_period'' flag to 1 so that you can save the checkpoint file every epoch.
Thank @fourson . But I also want to have the checkpoint after 10 epochs. My idea is latest checkpoint will be overwrited after next epoch is done. If change save period to 1, the problem is many save file is created and it take a lot of space
You can add some logics in base/base_trainer.py at function ``train''.
You can add some logics in base/base_trainer.py at function ``train''.
Can you take a little time to help me do that? I don't know much about coding so I can't write it. I appreciate you so much
Just set the flag ``is_best'' to True manually (keep it always True) so that the file model_best.pth will always contain the newest checkpoint.
@fourson I still have to set save_period to 1 to make it work. Here is detail of my idea. Can you guide me how to implement it? For example, after epoch 1 complete, it will create latest.pth, model_best.pth. After epoch 2, new latest.pth will create and overwrite the old one, model_best.pth .... After epoch 10, checkpoint_epoch10.pth will be created, also latest.pth and model_best.pth created too
Set is_best to True in code and set save_period to 10 in config simultaneously.
I want to create latest checkpoint after every epochs beside save period in config file. For example, I already set save period every 10 epochs but I still want to create latest checkpoint for every epoch. Can you guide me to do that? Thank you