具有slim库的初始v3中的输入和输出节点名称是什么?

时间:2018-05-30 02:44:52

标签: tensorflow tensorflow-slim

我使用Tensorflow slim在我自己的数据上重新训练了inceptionV3模型。下面的文件是在培训后生成的: -

  

graph.pbtxt,model.ckpt,model.meta,model.index,checkpoint,   events.out.tfevents

我想冻结图形文件并创建.pb文件。我不知道在初始v3中输入节点和输出节点是什么。使用Tensorboard对我来说很复杂。

inceptionV3中的输入/输出节点是什么?(在slim / nets中)或者我如何找到输入/输出节点?

操作系统:窗口7

2 个答案:

答案 0 :(得分:1)

(A)。如果你将它放到this link的底部。你会在某个地方找到它(特定于inceptionV3):

input_layer=input
output_layer=InceptionV3/Predictions/Reshape_1

(B)。另一种方法是打印模型的所有张量并获得输入/输出张量

from tensorflow.python.tools.inspect_checkpoint import print_tensors_in_checkpoint_file
ckpt_path="model.ckpt"
print_tensors_in_checkpoint_file(file_name=ckpt_path, tensor_name='', all_tensors=True, all_tensor_names=True)

(C)。如果需要打印.pb文件的张量名称。您可以使用this简单代码。

检查什么对你有用。

答案 1 :(得分:0)

使用slim.get_variables_to_restore()。您可以找到详细信息here

相关问题