转换训练有素Tensorflow模型的Protobuf [英] Converting trained Tensorflow model to protobuf

查看:1533
本文介绍了转换训练有素Tensorflow模型的Protobuf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的Andr​​oid Tensorflow演示成立之初净存储模型作为protobuf的文件( tensorflow_inception_graph.pb )。我想替换这个网络与另一个。

The inception net in the Android Tensorflow Demo stores the model as a protobuf file (tensorflow_inception_graph.pb). I'd like to replace this network with another one.

是否有文件或一个例子某处如何在Python训练有素的TensorFlow网络转换为 .pb ?我知道TensorFlow的节电器但这似乎是用于保存中间训练状态。不知道它是如何工作如果模型已经训练。

Is there documentation or an example somewhere on how to convert a trained TensorFlow network in Python to .pb? I'm aware of TensorFlow's Saver but this seems to be used to save intermediate training state. Not sure how it works if the model is already trained.

推荐答案

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

tf.Graph.as_graph_def() retrieves the serialized graph. Then you just write it to a file.

这篇关于转换训练有素Tensorflow模型的Protobuf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆