Function full

  • Create a Tensor filled with a single value.

    Example

      // 128x8 tensor of all 1s
    const t = sm.full([128, 8], 1)

    Returns

    A new Tensor of a single user specified value.

    Parameters

    • shape: BigInt64Array | number[]

      The shape of the output Tensor

    • val: number

      The value used to fill the output

    Returns Tensor

Generated using TypeDoc