Skip to content
forked from denosaurs/netsaur

Powerful machine learning, accelerated by WebGPU

License

Notifications You must be signed in to change notification settings

retraigo/netsaur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Netsaur


netsaur stars netsaur releases netsaur License


neural network deno module using neo

Maintainers

Usage

import { DenseLayer, NeuralNetwork } from "https://deno.land/x/netsaur/mod.ts";

const net = await new NeuralNetwork({
  silent: true,
  layers: [
    new DenseLayer({ size: 3, activation: "sigmoid" }),
    new DenseLayer({ size: 1, activation: "sigmoid" }),
  ],
  cost: "crossentropy",
}).setupBackend("cpu");

await net.train(
  [
    { inputs: [0, 0, 1, 0, 0, 1, 1, 1], outputs: [0, 1, 1, 0] },
  ],
  5000,
  4,
  0.1,
);

console.log(await net.predict(new Float32Array([0, 0])));
console.log(await net.predict(new Float32Array([1, 0])));
console.log(await net.predict(new Float32Array([0, 1])));
console.log(await net.predict(new Float32Array([1, 1])));

About

Powerful machine learning, accelerated by WebGPU

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 57.7%
  • TypeScript 26.4%
  • JavaScript 15.4%
  • Python 0.5%