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

Make ModelCheckpoint backwards compatible with TF <1.14 #25

Open
btcooper22 opened this issue Nov 11, 2019 · 3 comments
Open

Make ModelCheckpoint backwards compatible with TF <1.14 #25

btcooper22 opened this issue Nov 11, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@btcooper22
Copy link

I attempt to create a ModelCheckpoint callback with the following code:

model_checkpoint = ModelCheckpoint(
HOME + "/locust/best_model_SHG.h5",
monitor="loss",
#monitor="loss" # use if validation_split=0
verbose=1,
save_best_only=True,
)

Upon running it, the code fails with the following error:

Traceback (most recent call last):
File "R:/Locust/bc175/Warren Research Technician/deepposekit/Training.py", line 147, in
save_best_only=True,
File "R:\Locust\bc175\Warren Research Technician\deepposekit\deepposekit\callbacks.py", line 257, in init
**kwargs
TypeError: init() got an unexpected keyword argument 'save_freq'

When I remove that code, training works fine, so it's definitely what's causing the issue.

Thanks,
Ben

@jgraving
Copy link
Owner

Thanks for pointing this out. What version of TF are you using? It seems the ModelCheckpoint callback will only work with TF >=1.14. If you're using a version <1.14 I'd recommend upgrading to a newer version. When I get the chance I will update so it's backward compatible.

@jgraving jgraving added the bug Something isn't working label Nov 11, 2019
@btcooper22
Copy link
Author

Thanks - I was using 1.13, upgrading to 2.0.0 sorted the problem!

@jgraving
Copy link
Owner

Glad it's working. I'm going to reopen this so I don't forget about it.

@jgraving jgraving reopened this Nov 11, 2019
@jgraving jgraving changed the title ModelCheckpoint callback not working Make ModelCheckpoint backwards compatible with TF <1.14 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants