2

I am confused by the variable name and tensor name in tensorflow. My understanding is as follows:

  1. A tensor name consists of the op_name and index.
  2. The variable name is given by us when we define variables. For instance, if we do

a = tf.Variable([1,2],name='defined_a')

print(a.name)

'defined_a:0'

which one of them is the correct variable name, defined_a:0 or defined_a? Also, if we save the graph in a meta file, which name will be saved, defined_a:0 or defined_a?

Can anyone helps?

lin
  • 53
  • 3
  • Possible duplicate of [How does TensorFlow name tensors?](https://stackoverflow.com/questions/36150834/how-does-tensorflow-name-tensors) – P-Gn May 23 '18 at 11:51

0 Answers0