Function reshape

  • Reshapes a tensor to a given shape.

    Parameters

    • t: Tensor

      the input tensor

    • shape: number[]

      an array of integers defining the output tensor shape

    Returns Tensor

    the reshaped tensor