Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.1/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,
): void

Static Methods

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