import tensorflow as tf
ckpt = r'D:\SoftWare\AI\chinese_L-12_H-768_A-12\chinese_L-12_H-768_A-12\bert_model.ckpt'
# read node name way 1
with tf.Session() as sess:
saver = tf.train.import_meta_graph(ckpt + '.meta', clear_devices=True)
graph_def = tf.get_default_graph().as_graph_def(add_shapes=True)
node_list = [n.name for n in graph_def.node]
for node in node_list:
print("node_name", node)
12-23
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交