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

[BUG]: Model saving logic is wrong #35

Closed
dagap opened this issue Jan 16, 2020 · 1 comment
Closed

[BUG]: Model saving logic is wrong #35

dagap opened this issue Jan 16, 2020 · 1 comment

Comments

@dagap
Copy link

dagap commented Jan 16, 2020

The code seems to be doing the wrong thing:

is_best = val_loss > best_val_loss
best_val_loss = max(val_loss, best_val_loss)

best_val_loss is initialized to 1.0 and once the validation loss drops below 1.0, any further decrease will not be taken into account due to the use of max. I am not sure about the logic here but perhaps best_val_loss should be set to None or inf initially and min should be used instead of max.

@chickenbestlover
Copy link
Owner

Thanks for finding the bug. The code is now corrected.

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