-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Saving formats #18523
Comments
We have observed similar behaviour reported in TF repo as well recently and this issue persists from 2.13 version onwards. While saving model with .keras format and if model have a callback say for eg.
It fails with similar error as reported in the attached SO link. Similar issue was discussed in TF #61999. Please have a look into it. As per my understanding there is issue with Could you please check and confirm for your case what are the options that are getting passed to model.save() ? |
Hi @pedrobrs , I believe this issue should have fixed by this PR #18545. The relevant tensorflow issue #tensorflow/tensorflow#61999 also resolved with this PR. Could you please check the issue with nightly and let us know if yet to resolve. Thanks |
can I work on this? |
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you. |
can I work on this? |
Hi @SuryanarayanaY |
Hi @rickiepark , Could you please check with nightly version as changes are not merged into nightly only? Also your colab gist not accessible. |
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you. |
This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further. |
this issue exists in TensorFlow 2.16.1 |
Can you share a minimal colab that reproduces the error? |
This issue also exists in TensorFlow 2.17.0 |
I used to save models with ModelCheckpoint callback and filename .h5.
Recently update tensorflow to version 2.13.
Now If save the model in h5 format, a warning is logged:
UserWarning: You are saving your model as an HDF5 file via
model.save()
. This file format is considered legacy. We recommend using instead the native Keras format, e.g.model.save('my_model.keras')
.But If use keras, I hit this issue:
https://stackoverflow.com/questions/76701617/the-following-arguments-are-not-supported-with-the-native-keras-format-opti
and, if I use tf format , I get no logs for fit!
When checkpoint filename ends with .h5 I get a log like:
absl - 1106/1106 - 41s - loss: 0.0014 - accuracy: 0.9996 - precision: 0.9998 - recall: 0.9996 - auc: 1.0000 - val_loss: 0.0046 - val_accuracy: 0.9978 - val_precision: 0.9987 - val_recall: 0.9984 - val_auc: 1.0000 - lr: 0.0010 - 41s/epoch - 37ms/step
But with a filename .tf, that log is not generated.
I would like to use a non legacy format but without exceptions nor logs missing.
What can I do?
The text was updated successfully, but these errors were encountered: