打印tensorflow每一层结构
·
import tensorflow as tf
sess=tf.Session
with tf.Graph().as_default():
with tf.gfile.FastGFile(‘*.pb’,’rb’) as modelfile:
graph_def=tf.GraphDef()
graph_def.ParseFromString(modelfile.read())
tf.import_graph_def(graph_def)
[print(n.name) for n in tf.get_default_graph().as_graph_def().node]
新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。
更多推荐


所有评论(0)