identity

dragon.vm.tensorflow.identity(
  input,
  name=None
)[source]

Return a new tensor copying the content of input.

Examples:

# Copy ``x`` to ``xx``
x = tf.zeros(shape=(2, 3))
xx = tf.identity(x)

# ``x`` != ``xx``
x += 1
print(x)
print(xx)
Parameters:
  • input (dragon.Tensor) – The input tensor.
  • name (str, optional) – A optional name for the operation.
Returns:

dragon.Tensor – The output tensor.