Function tile

  • Replicate a Tensor about its axes. There is a method version of this static function: Tensor.tile.

    Example

      const t = sm.identity(4)

    // equivalent calls
    const a = sm.tile(t, [2, 2])
    a.shape // [8, 8]
    const b = t.tile([2, 2])
    b.shape // [8, 8]

    // tiling by 1 on all dims does nothing
    const no_op = t.tile([1, 1])

    Returns

    A new Tensor

    Parameters

    • tensor: Tensor

      Tensor to tile

    • shape: BigInt64Array | number[]

      A shape describing the number of iterations to tile each axis.

    Returns Tensor

Generated using TypeDoc