I have trained a Keras model based on this repo.
After the training I save the model as checkpoint files like this:
sess=tf.keras.backend.get_session(
Thanks for pointing the main issue! I found that keras.backend.set_learning_phase(0) to be not working sometimes, at least in my case.
keras.backend.set_learning_phase(0)
Another approach might be: for l in keras_model.layers: l.trainable = False
for l in keras_model.layers: l.trainable = False