Function slice

  • Extracts a slice from a tensor.

    Parameters

    • t: Tensor

      the input tensor

    • begin: number | number[]

      the coordinates to start the slice from

    • Optional size: number | number[]

      (optional) the size of the slice

    Returns Tensor

    the tensor slice