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

x/netsaur/packages/core/src/backends/wasm/backend.ts>WASMBackend

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

Web Assembly Backend.

Constructors

new
WASMBackend(outputShape: Shape<Rank>, id: number)

Properties

outputShape: Shape<Rank>

Methods

predict(input: Tensor<Rank>, config: { postProcess: PostProcessor; outputShape?: Shape<Rank>; }): Promise<Tensor<Rank>>
predict(
input: Tensor<Rank>,
config: { postProcess: PostProcessor; outputShape?: Shape<Rank>; },
layers: number[],
): Promise<Tensor<Rank>>
save(): Uint8Array
saveFile(input: string): void
train(
datasets: DataSet[],
epochs: number,
batches: number,
rate: number,
): void