ModelCheckpoint loses .h5 save support, breaking retrocompatibility #20490
Labels
type:support
User is asking for help / asking an implementation question. Stackoverflow would be better suited.
Title: ModelCheckpoint Callback Fails to Save Models in .h5 Format in TensorFlow 2.17.0+
Description:
I'm experiencing an issue with TensorFlow's
tf.keras.callbacks.ModelCheckpoint
across different TensorFlow versions on different platforms.Background:
With versions up to TensorFlow 2.15.0, I was able to save models in
.h5
format usingtf.keras.callbacks.ModelCheckpoint
with thesave_weights_only=False
parameter. This allowed for easy cross-platform loading of saved models.Problem: Since TensorFlow 2.17.0,
tf.keras.callbacks.ModelCheckpoint
appears unable to save models in.h5
format, breaking backward compatibility. Models can only be saved in the.keras
format, which versions prior to 2.17.0 cannot load, creating a compatibility issue for users maintaining models across different TensorFlow versions.Steps to Reproduce:
tf.keras.callbacks.ModelCheckpoint
usingsave_weights_only=False
and specifying.h5
as the file format.Expected Behavior: The model should be saved in
.h5
format without error, maintaining backward compatibility with earlier versions.Actual Behavior: The model cannot be saved in
.h5
format, only in.keras
format, making it incompatible with TensorFlow versions prior to 2.17.0.Question: Is there a workaround to save models in
.h5
format in TensorFlow 2.17.0+? Or, is there a plan to restore.h5
support in future updates for backward compatibility?Environment:
Thank you for your help and for maintaining this project!
The text was updated successfully, but these errors were encountered: