There was a feature - tensorflow format to save a checkpoint. I have checked and it is everywhere in the official docs and samples:
However in the TF I am running (2.18) if I write model.save('something')
I get this:
Invalid filepath extension for saving. Please add either a `.keras` extension for the native Keras format (recommended) or a `.h5` extension.
How do I save in "tensorflow" format in the latest versions?
There was a feature - tensorflow format to save a checkpoint. I have checked and it is everywhere in the official docs and samples: https://www.tensorflow.org/tutorials/keras/save_and_load#savedmodel_format
However in the TF I am running (2.18) if I write model.save('something')
I get this:
Invalid filepath extension for saving. Please add either a `.keras` extension for the native Keras format (recommended) or a `.h5` extension.
How do I save in "tensorflow" format in the latest versions?
In TensorFlow 2.18 the behavior of model.save()
has changed. In previous versions you could save a model in the “SavedModel” (TensorFlow) format simply by calling, for example, model.save("my_model")
. Now, however, model.save()
requires that you either specify a .keras
or a .h5
extension. To save your model in the TensorFlow SavedModel format, use the save_format parameter:
model.save("my_model", save_format="tf")