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

EarlyStopping does nothing with default triggers #1170

Open
xdurch0 opened this issue Dec 2, 2016 · 0 comments
Open

EarlyStopping does nothing with default triggers #1170

xdurch0 opened this issue Dec 2, 2016 · 0 comments

Comments

@xdurch0
Copy link

xdurch0 commented Dec 2, 2016

If no triggers are handed as parameters to the EarlyStopping extension, it won't actually save the best model. From what I can tell, this is because its TrackTheBest subextension is by default called "after_epoch", but Checkpoint with the additional condition of the "best_so_far" log entry being present is called "after_batch". This means that it will e.g. be called after the last batch of the epoch, which is before any "after_epoch" extensions (including TrackTheBest()) are run, meaning that the log entry for this iteration step isn't actually present when Checkpoint is called.
I would propose that the condition added to the Checkpoint subextension should be "after_batch" or "after_epoch" depending on whether the "iterations" or "epochs" argument is not None. As it is now, EarlyStopping also doesn't play nice with DataStreamMonitoring's "after_epoch" default for similar reasons; instead I need to call the Monitoring "after_n_batches" with a batch number equal to the number of batches per epoch, which is really awkward.

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

1 participant