Function sq

  • Squares each tensor element (multiplies a number by itself). The result is always a positive number, as multiplying two negative numbers always yields a positive result. For example, -1 * -1 = 1.

    Parameters

    Returns Tensor

    the square of each tensor element