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

Keras does not save weights properly #19693

Open
gcelano opened this issue May 8, 2024 · 3 comments
Open

Keras does not save weights properly #19693

gcelano opened this issue May 8, 2024 · 3 comments
Assignees
Labels

Comments

@gcelano
Copy link

gcelano commented May 8, 2024

I am using Tensorflow 2.15.1 and, if I use model.save_weights("./dir/mymodel.bin") and subsequently try to load the weights with model.load_weights (in a different process), the model does not return the expected results (when using model.evaluate or .predict). My model has a custom loss function and metric, but this should not be a problem, since I try to load weights only. Any idea why I get this error?

@sachinprasadhs
Copy link
Collaborator

Could you please try with the Keras 3 version and let us know your observations and possibly some reproducible code. Thanks

@gcelano
Copy link
Author

gcelano commented May 17, 2024

I installed Tensorflow 2.16.1, but the it cannot detect the GPUs.

@gcelano
Copy link
Author

gcelano commented May 22, 2024

The problem is also with Tensorflow 2.16. Please, run the code here:

https://git.informatik.uni-leipzig.de/celano/dithrax_test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants