Failed to convert tensorflow frozen graph to pbtxt file
问题 I want to extract pbtxt file given an input of tensorflow frozen inference graph. In order to do this I am using the below script : import tensorflow as tf #from google.protobuf import text_format from tensorflow.python.platform import gfile def converter(filename): with gfile.FastGFile(filename,'rb') as f: graph_def = tf.GraphDef() graph_def.ParseFromString(f.read()) tf.import_graph_def(graph_def, name='') tf.train.write_graph(graph_def, 'pbtxt/', 'protobuf.pbtxt', as_text=True) print(graph