I\'m having trouble recovering a tensor by name, I don\'t even know if it\'s possible.
I have a function that creates my graph:
def create_structure(
All tensors have string names which you can see as follows
[tensor.name for tensor in tf.get_default_graph().as_graph_def().node]
Once you know the name you can fetch the Tensor using (0 refers to endpoint which is somewhat redundant)
For instance if you do this
tf.constant(1)+tf.constant(2)
You have the following Tensor names
[u'Const', u'Const_1', u'add']
So you can fetch output of addition as
sess.run('add:0')
Note, this is part not part of public API. Automatically generated string tensor names are an implementation detail and may change.