TensorFlow 2.0 RC is available Learn more

tf.identity

TensorFlow 2.0 version View source on GitHub

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

Aliases:

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

Args:

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

Returns:

A Tensor. Has the same type as input.