I have a tensorflow Functional keras model made up of 2 separate Sequential models like so:
I want to deploy the model with tensorflow-serving and therefore need to save the model in 'tf' format. When I save the model, it creates the new model directory with the correct files and directories (assets, saved_model.pb, variables). However, when I try to re-load the model using model = tf.keras.models.load_model('./my_model_v1')
it will not load. I don't get any error message but it just seems to sit there. I have left it run for over 30 minutes and nothing happens.
When I save the model in h5 format, it will load in seconds. Likewise, saving the individual sequential models in 'tf' format and then subsequently loading completes in a matter of seconds.
Why can I not load a model made up of these layers?
question from:
https://stackoverflow.com/questions/65845136/save-and-load-a-concatenated-tensorflow-model 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…