Interface TensorFromTextureOptions<T>

interface TensorFromTextureOptions<T> {
    format?: ImageFormat;
    height: number;
    width: number;
    dispose?(): void;
    download?(): Promise<DataTypeMap[T]>;
}

Type Parameters

Hierarchy (view full)

Properties

format?: ImageFormat

Describes the image format represented in RGBA color space.

height: number

Describes the image height in pixel

width: number

Describes the image width in pixel

Methods

  • an optional callback function that will be called when the tensor is disposed.

    If not provided, the tensor treat the GPU data as external resource.

    Returns void

  • an optional callback function to download data from GPU to CPU.

    If not provided, the tensor treat the GPU data as external resource.

    Returns Promise<DataTypeMap[T]>

Generated using TypeDoc