Tensorflow:什么是“output_node_names"?在 model_with_buckets 模型中的 freeze_graph.py ? [英] Tensorflow: What are the "output_node_names" for freeze_graph.py in the model_with_buckets model?

查看:135
本文介绍了Tensorflow:什么是“output_node_names"?在 model_with_buckets 模型中的 freeze_graph.py ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 seq2seq = tf.nn.seq2seq.embedding_attention_seq2seq 训练了一个 tf.nn.seq2seq.model_with_bucketsTensorflow 教程.

I trained a tf.nn.seq2seq.model_with_buckets with seq2seq = tf.nn.seq2seq.embedding_attention_seq2seq very similar to the example in the Tensorflow Tutorial.

现在我想使用 freeze_graph.py 冻结图形.如何在我的模型中找到output_node_names"?

Now I would like to freeze the graph using freeze_graph.py. How can I find the "output_node_names" in my model?

推荐答案

您可以通过将可选的 name="myname" 参数传递给几乎任何 Tensorflow 运算符来为模型中的节点选择名称构建一个节点.如果您不指定图形节点,Tensorflow 将自动为它们选择名称,但如果您想通过 freeze_graph.py 之类的工具识别这些节点,那么最好自己选择名称.这些名称是您传递给 output_node_names 的内容.

You can choose names for the nodes in your model by passing the optional name="myname" argument to pretty much any Tensorflow operator that builds a node. Tensorflow will pick names for graph nodes automatically if you don't specify them, but if you want to identify those nodes to a tool like freeze_graph.py, then it's best to choose the names yourself. Those names are what you pass to output_node_names.

这篇关于Tensorflow:什么是“output_node_names"?在 model_with_buckets 模型中的 freeze_graph.py ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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