将* .pb保存到* .ckpt以进行张量流

时间:2018-11-21 17:44:20

标签: python tensorflow

我有一个tensorflow检查点文件。我使用以下代码将模型冻结在protobuf文件中

output_graph_def = tf.graph_util.convert_variables_to_constants(
        sess,  # The session is used to retrieve the weights
        tf.get_default_graph().as_graph_def(),  # The graph_def is used to retrieve the nodes
        output_node_names.split(",")  # The output node names are used to select the usefull nodes
    )

然后我阅读了protobuf并手动删除了一些节点,然后再次另存为* .pb。

删除节点后是否有一种方法可以另存为张量流检查点而不是* .pb。

0 个答案:

没有答案
相关问题