Test tensor changed . The most common way to create a tensor with a typed type is to define tf.Variable : defining tf.Variable , whose initial value is dtype tf.float32 will create a tensor with a typed type with dtype tf.float32_ref . You can mutate the reference typed tensor by passing it as the first argument to tf.assign() .
(Note that reference tensors are implementation details in this version of TensorFlow. We recommend using higher-level wrappers, such as tf.Variable , which can be carried over to alternative representations for mutable state in the future.)
source share