Let's say in Python 3.6 I create two placeholders in tensorflow and for each I assign a name. However, I use the same variable in python to store each tensor.
import tensorflow as tf
tfs = tf.InteractiveSession()
p3 = tf.placeholder(tf.float32,name='left')
p3 = tf.placeholder(tf.float32,name='right')
How can I now create an operation using the names I assigned instead of the variable names?
op1 = left * right
op2 = tf.multiply(left,right)
Obviously the first one won't work because python doesn't have a variable called 'left' or 'right', but it seems like in the second case I should be able to reference the names. If not, why would I ever bother to set names on a tensor?
In case it matters, I'm doing this on AWS Sagemaker conda_tensorflow_p36