import tensorflow as tf import collections from tensorflow.core.framework import tensor_shape_pb2 # 读取模型 graph_def = tf.GraphDef() with tf.gfile.FastGFile('./pb/model.pb', 'rb') as f: graph_def.ParseFromString(f.read()) # 统计图中的node,保存为map.其中 key : va…