Represent multi-dimensional arrays to feed to or fetch from model inferencing.

Hierarchy

  • TypedTensorBase<Type>
  • TypedTensorUtils<Type>
    • Tensor

Properties

Methods

Properties

data: string[] | Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array

Get the buffer data of the tensor.

dims: readonly number[]

Get the dimensions of the tensor.

size: number

Get the number of elements in the tensor.

type: keyof DataTypeMap

Get the data type of the tensor.

Methods

  • Create a new tensor with the same data buffer and specified dims.

    Parameters

    • dims: readonly number[]

      New dimensions. Size should match the old one.

    Returns TypedTensor<keyof DataTypeMap>

Generated using TypeDoc