加载tensorflow .meta图结构,打印各个节点名
import tensorflow as tf
model_path = "./UGATIT.model-1000000"
outfile = "./output.txt"
## 下面两个reader作用等价
#reader = pywrap_tensorflow.NewCheckpointReader(model_path)
reader = tf.train.NewCheckpointReader(model_path)
## 用reader获取变量字典,key是变量名,value是变量的shape
原创
2020-11-12 18:20:02 ·
443 阅读 ·
0 评论