Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

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

Index

Properties

Methods

Properties

Readonly data

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

Get the buffer data of the tensor.

Readonly dims

dims: readonly number[]

Get the dimensions of the tensor.

Readonly size

size: number

Get the number of elements in the tensor.

Readonly type

type: keyof DataTypeMap

Get the data type of the tensor.

Methods

reshape

  • 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