The graph object in Tensorflow has a method called \"get_tensor_by_name(name)\". Is there anyway to get a list of valid tensor names?
If not, does anyone know the va
You do not even have to create a session to see the names of all operation names in the graph. To do this you just need to grab a default graph tf.get_default_graph() and extract all the operations: .get_operations. Each operation has many fields, the one you need is name.
Here is the code:
import tensorflow as tf
a = tf.Variable(5)
b = tf.Variable(6)
c = tf.Variable(7)
d = (a + b) * c
for i in tf.get_default_graph().get_operations():
print i.name