Tensorflow (.pb) format to Keras (.h5)
问题 I am trying to convert my model in Tensorflow (.pb) format to Keras (.h5) format to view post hoc attention visualisation. I have tried below code. file_pb = "/test.pb" file_h5 = "/test.h5" loaded_model = tf.keras.models.load_model(file_pb) tf.keras.models.save_keras_model(loaded_model, file_h5) loaded_model_from_h5 = tf.keras.models.load_model(file_h5) Can anyone help me with this? Is this even possible? 回答1: In the Latest Tensorflow Version (2.2) , when we Save the Model using tf.keras