Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netsaur/packages/core/src/backends/gpu/backend.ts>GPUBackend

Powerful Powerful Machine Learning library with GPU, CPU and WASM backends
Latest
class GPUBackend
implements Backend
import { GPUBackend } from "https://deno.land/x/netsaur@0.4.2/packages/core/src/backends/gpu/backend.ts";

GPU Backend.

Constructors

new
GPUBackend(
library: Library,
outputShape: Shape<Rank>,
id: bigint,
)

Properties

library: Library
outputShape: Shape<Rank>

Methods

predict(input: Tensor<Rank>): Promise<Tensor<Rank>>
predict(
input: Tensor<Rank>,
layers: number[],
outputShape: Shape<Rank>,
): Promise<Tensor<Rank>>
save(): Uint8Array
saveFile(path: string): void
train(
datasets: DataSet[],
epochs: number,
batches: number,
rate: number,
): void

Static Methods

load(buffer: Uint8Array, library: Library): GPUBackend
loadFile(path: string, library: Library): GPUBackend