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

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

Powerful machine learning, accelerated by WebGPU
Go to Latest
class GPUBackend
implements Backend
import { GPUBackend } from "https://deno.land/x/netsaur@0.3.0/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[keyof Shape],
): Promise<Tensor<Rank>>
save(): Uint8Array
saveFile(path: string): void
train(
datasets: DataSet[],
epochs: number,
batches: number,
rate: number,
)

Static Methods

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