Open entrehuihui opened 5 years ago
No, I have not yet made this compatible with TensorFlow 2.0
You can provide me with a link to some of your models (both TensorFlow 1.0 and 2.0). I will then use them as test files to extend the current implementation and make sure it's compatible with yours.
I don't think you can make this script compatible with TF 2.0. They made a really huge change, now there is no such thing as session and there is no such thing as frozen graph.
I managed to convert a Keras model.h5
to a tensorflow saved_model.pb
with the following one-liner
tf.keras.models.save_model(network,"model_save_path")
I found this from a Chinese blog post at https://blog.csdn.net/u012995500/article/details/103575879.
Tested Tensorflow version: 2.2.0
I found that the script does not seem to support TensorFlow2.0. I don't know if it is my own problem..
frozen_graph = freeze_session(tf.keras.backend.get_session(), output_names=[ AttributeError: module 'tensorflow.python.keras.api._v2.keras.backend' has no attribute 'get_session'