介面 TensorFromGpuBufferOptions<T>

interface TensorFromGpuBufferOptions<T> {
    dataType?: T;
    dims: readonly number[];
    dispose?(): void;
    download?(): Promise<DataTypeMap[T]>;
}

型別引數

層級結構

  • Pick<Tensor, "dims">
  • GpuResourceConstructorParameters<T>
    • TensorFromGpuBufferOptions

屬性

dataType?: T

描述了張量的資料型別。

dims: readonly number[]

獲取張量的維度。

方法

  • 一個可選的回撥函式,當張量被釋放時將被呼叫。

    如果未提供,張量將把 GPU 資料視為外部資源。

    返回 void

  • 一個可選的回撥函式,用於將資料從 GPU 下載到 CPU。

    如果未提供,張量將把 GPU 資料視為外部資源。

    返回 Promise<DataTypeMap[T]>

使用 TypeDoc 生成