Hello, I created and compiled a Keras model in Python and saved it in the SavedModel format. I want to load this model in the TF C or C++ API for training and prediction.
Currently I’m able to do prediction with the C API, loading the ‘serve’ tag-set. However, when I want to load the model for training the ‘train’ tag-set is missing.
The output of saved_model_cli
only shows the ‘serve’ tag-set.
TF Python: 2.5.0.
TF C API: 2.5.0-dev20210512
Model creation:
# imports from tensorflow.keras
# build model using the functional API
input = ...
output = ...
loss = ...
model = Model(inputs=[input], outputs=[output])
model.compile(loss=[loss], optimizer='adam', metrics=['accuracy'])
model.save("./model", save_format='tf')
Output from saved_model_cli
:
$ saved_model_cli show --dir model
The given SavedModel contains the following tag-sets:
‘serve’
What am I missing?
Is this even possible?
Maybe this only works in TF 1.x?
Thanks in advance