How do you get the name of the tensorflow output nodes in a Keras Model?
<p>I'm trying to create a pb file from my Keras (tensorflow backend) model so I can build it on iOS. I'm using freeze.py and I need to pass the output nodes. How do i get the names of the output nodes of my Keras model?</p>

<p><a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph.py" rel="nofollow">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph.py</a></p>

<p>The <code>output_node_names</code> should contain the names of the graph nodes you intend to use for inference(e.g. softmax). It is used to extract the <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/framework/graph_util.py#L234" rel="nofollow">sub-graph</a> that will be needed for inference.
It may be useful to look at <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph_test.py" rel="nofollow">freeze_graph_test</a>.</p>

python tensorflow keras