【问题标题】:Converting trained Tensorflow model to protobuf将训练有素的 Tensorflow 模型转换为 protobuf
【发布时间】:2016-02-06 22:41:34
【问题描述】:

Android Tensorflow Demo 中的初始网络将模型存储为 protobuf 文件 (tensorflow_inception_graph.pb)。我想用另一个网络替换这个网络。

是否有关于如何将 Python 中经过训练的 TensorFlow 网络转换为 .pb 的文档或示例?我知道 TensorFlow 的 Saver 但这似乎是用来保存中间训练状态的。如果模型已经训练,不确定它是如何工作的。

【问题讨论】:

  • 如果提到的答案之一是正确的,或者您找到了不同的解决方案并在这里更新会很好

标签: android python tensorflow


【解决方案1】:

这是savingloading 的示例

【讨论】:

    【解决方案2】:

    tf.Graph.as_graph_def() 检索序列化图。然后你只需将它写入一个文件。

    【讨论】:

      猜你喜欢
      • 2017-11-11
      • 1970-01-01
      • 2021-12-13
      • 2017-11-17
      • 2021-01-01
      • 2019-02-02
      • 1970-01-01
      • 2016-11-01
      • 2021-03-14
      相关资源
      最近更新 更多