tf.identity

Return a tensor with the same shape and contents as input.

Aliases:

  • tf.compat.v1.identity
  • tf.compat.v2.identity
  • tf.identity
tf.identity(
    input,
    name=None
)

Defined in python/ops/array_ops.py.

Args:

  • input: A Tensor.
  • name: A name for the operation (optional).

Returns:

A Tensor. Has the same type as input.