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

epoch value in ModelCheckpoint is inconsistent #7541

Closed
SKb10 opened this issue Aug 6, 2017 · 3 comments
Closed

epoch value in ModelCheckpoint is inconsistent #7541

SKb10 opened this issue Aug 6, 2017 · 3 comments

Comments

@SKb10
Copy link

SKb10 commented Aug 6, 2017

Hi:
Keras offer a easy way to add epoch to the model name when saving
https://github.com/fchollet/keras/blob/master/keras/callbacks.py#L400
filepath = self.filepath.format(epoch=epoch, **logs)

But with the code like below one, which is suppose to save model every 20 eopch:

checkpointer = ModelCheckpoint(filepath="{epoch:03d}"+".hdf5", period=20)

It save the model every 20 epochs like:
019.hdf5
039.hdf5

The model saving operation does happen after 20, 40 epoch were finished.
Is there a bug, or I missed something(?

thanks for your review

@rravu3
Copy link

rravu3 commented Aug 9, 2017

Don't think it's a bug. The epoch value coming into the callback is zero indexed.

@stale
Copy link

stale bot commented Nov 7, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed.

@stale stale bot added the stale label Nov 7, 2017
@stale stale bot closed this as completed Dec 7, 2017
@ozabluda
Copy link
Contributor

ozabluda commented Dec 9, 2017

fixed in #8137

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

3 participants