Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • TensorConstructor

Index

Constructors

Constructors

constructor

  • new TensorConstructor(type: "string", data: readonly string[] | string[], dims?: readonly number[]): TypedTensor<"string">
  • new TensorConstructor(type: "bool", data: Uint8Array | readonly boolean[], dims?: readonly number[]): TypedTensor<"bool">
  • new TensorConstructor<T>(type: T, data: readonly number[] | DataTypeMap[T], dims?: readonly number[]): TypedTensor<T>
  • new TensorConstructor(data: Float32Array, dims?: readonly number[]): TypedTensor<"float32">
  • new TensorConstructor(data: Int8Array, dims?: readonly number[]): TypedTensor<"int8">
  • new TensorConstructor(data: Uint8Array, dims?: readonly number[]): TypedTensor<"uint8">
  • new TensorConstructor(data: Uint16Array, dims?: readonly number[]): TypedTensor<"uint16">
  • new TensorConstructor(data: Int16Array, dims?: readonly number[]): TypedTensor<"int16">
  • new TensorConstructor(data: Int32Array, dims?: readonly number[]): TypedTensor<"int32">
  • new TensorConstructor(data: BigInt64Array, dims?: readonly number[]): TypedTensor<"int64">
  • new TensorConstructor(data: readonly string[], dims?: readonly number[]): TypedTensor<"string">
  • new TensorConstructor(data: readonly boolean[], dims?: readonly number[]): TypedTensor<"bool">
  • new TensorConstructor(data: Float64Array, dims?: readonly number[]): TypedTensor<"float64">
  • new TensorConstructor(data: Uint32Array, dims?: readonly number[]): TypedTensor<"uint32">
  • new TensorConstructor(data: BigUint64Array, dims?: readonly number[]): TypedTensor<"uint64">
  • new TensorConstructor(type: keyof DataTypeMap, data: readonly number[] | readonly boolean[] | DataType, dims?: readonly number[]): Tensor
  • new TensorConstructor(data: DataType, dims?: readonly number[]): Tensor
  • Construct a new string tensor object from the given type, data and dims.

    Parameters

    • type: "string"

      Specify the element type.

    • data: readonly string[] | string[]

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"string">

  • Construct a new bool tensor object from the given type, data and dims.

    Parameters

    • type: "bool"

      Specify the element type.

    • data: Uint8Array | readonly boolean[]

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"bool">

  • Construct a new numeric tensor object from the given type, data and dims.

    Type parameters

    • T: "float32" | "uint8" | "int8" | "uint16" | "int16" | "int32" | "int64" | "float16" | "float64" | "uint32" | "uint64"

    Parameters

    • type: T

      Specify the element type.

    • data: readonly number[] | DataTypeMap[T]

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<T>

  • Construct a new float32 tensor object from the given data and dims.

    Parameters

    • data: Float32Array

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"float32">

  • Construct a new int8 tensor object from the given data and dims.

    Parameters

    • data: Int8Array

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"int8">

  • Construct a new uint8 tensor object from the given data and dims.

    Parameters

    • data: Uint8Array

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"uint8">

  • Construct a new uint16 tensor object from the given data and dims.

    Parameters

    • data: Uint16Array

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"uint16">

  • Construct a new int16 tensor object from the given data and dims.

    Parameters

    • data: Int16Array

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"int16">

  • Construct a new int32 tensor object from the given data and dims.

    Parameters

    • data: Int32Array

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"int32">

  • Construct a new int64 tensor object from the given data and dims.

    Parameters

    • data: BigInt64Array

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"int64">

  • Construct a new string tensor object from the given data and dims.

    Parameters

    • data: readonly string[]

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"string">

  • Construct a new bool tensor object from the given data and dims.

    Parameters

    • data: readonly boolean[]

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"bool">

  • Construct a new float64 tensor object from the given data and dims.

    Parameters

    • data: Float64Array

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"float64">

  • Construct a new uint32 tensor object from the given data and dims.

    Parameters

    • data: Uint32Array

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"uint32">

  • Construct a new uint64 tensor object from the given data and dims.

    Parameters

    • data: BigUint64Array

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns TypedTensor<"uint64">

  • Construct a new tensor object from the given type, data and dims.

    Parameters

    • type: keyof DataTypeMap

      Specify the element type.

    • data: readonly number[] | readonly boolean[] | DataType

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns Tensor

  • Construct a new tensor object from the given data and dims.

    Parameters

    • data: DataType

      Specify the tensor data

    • Optional dims: readonly number[]

      Specify the dimension of the tensor. If omitted, a 1-D tensor is assumed.

    Returns Tensor

Generated using TypeDoc