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

Cannot modify max_epochs and rerun fit() #214

Closed
ferrouswheel opened this issue Feb 16, 2016 · 1 comment
Closed

Cannot modify max_epochs and rerun fit() #214

ferrouswheel opened this issue Feb 16, 2016 · 1 comment

Comments

@ferrouswheel
Copy link

It'd be nice to be able to run network.fit(X, Y) with a network until network.max_epochs is reached, then change max_epochs to a higher number and call fit again to have training continue.

This would be possible if the condition in train_loop used num_epochs_past as the initial value for epoch rather than 0:

num_epochs_past = len(self.train_history_)
epoch = num_epochs_past # epoch was previously assigned to 0

while epoch < epochs:
    ...

Of course, it was probably intended that calling max_epochs applies independently for each call to fit() and if that's the case it'd be good for future documentation to mention this. In the mean time, they'll be this github issue that people can find by google ;-)

@BenjaminBossan
Copy link
Collaborator

Yes, this behavior may be a little bit unintuitive for some but I don't think it needs to be changed.

Btw., you can pass the number of epochs you want to train directly to the fit call instead of setting max_epochs.

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