運行下列腳本,可以打印出模型各個節點變量的名稱:
1
2
3
4
5
6
7
8
|
from tensorflow.python import pywrap_tensorflow import os checkpoint_path = os.path.join( 'model.ckpt-131805' ) reader = pywrap_tensorflow.NewCheckpointReader(checkpoint_path) var_to_shape_map = reader.get_variable_to_shape_map() for key in var_to_shape_map: print 'tensor_name: ' ,key |
checkpoint_path為自己的模型路徑
以上這篇tensorflow查看ckpt各節點名稱實例就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持服務器之家。
原文鏈接:https://blog.csdn.net/u010122972/article/details/85989131