只有pd模型文件, 打印所有节点
浪卡子网站制作公司哪家好,找创新互联!从网页设计、网站建设、微信开发、APP开发、响应式网站等网站项目制作,到程序开发,运营维护。创新互联于2013年成立到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选创新互联。from tensorflow.python.framework import tensor_util from google.protobuf import text_format import tensorflow as tf from tensorflow.python.platform import gfile from tensorflow.python.framework import tensor_util GRAPH_PB_PATH = 'models/frozen_person_graph.pb' #path to your .pb file with tf.Session() as sess: print("load graph") with gfile.FastGFile(GRAPH_PB_PATH,'rb') as f: graph_def = tf.GraphDef() # Note: one of the following two lines work if required libraries are available #text_format.Merge(f.read(), graph_def) graph_def.ParseFromString(f.read()) tf.import_graph_def(graph_def, name='') for i,n in enumerate(graph_def.node): print("Name of the node - %s" % n.name)