Tensorflow: what is the difference between tf.identity and '=' operator
问题 I'm confused about '=' operator, and tf.identity() , I thought '=' is to just make a reference of the tensor, and identity is to make a copy, e.g., with ref = x ref = ref*0 sess.run(x) I will get x all been set to 0 element-wise, and with copy = tf.identity(x) copy = ref*0 sess.run(x) x would not be changed, since identity make copy, not a reference, but with experiment, '=' also make a copy and x is not set to 0, so what's the difference? 回答1: The difference is only in tensorlfow graph