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

x/netsaur/src/backend_cpu/backend.ts>CPUBackend

Powerful machine learning, accelerated by WebGPU
Go to Latest
class CPUBackend
implements Backend
import { CPUBackend } from "https://deno.land/x/netsaur@0.2.6/src/backend_cpu/backend.ts";

CPU Backend.

Constructors

new
CPUBackend(
library: Library,
outputShape: Shape[Rank],
id: bigint,
)

Properties

library: Library
outputShape: Shape[Rank]

Methods

predict(input: Tensor<Rank>): 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): CPUBackend
loadFile(path: string, library: Library): CPUBackend