Skip to content
/ nnjs Public

Small library for building Neural Networks in Javascript

Notifications You must be signed in to change notification settings

nschuc/nnjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nnjs

Small library for building Neural Networks in Javascript.

Pre-pre-alpha.

Example inspired by Deep Learning with PyTorch: A 60-minute Blitz

let x = new Variable(nn.ones(3));
let y = x.mul(2);

while (y.data.norm() < 1000) {
  y = y.mul(2);
}

y.backward(nn.fromArray([ 0.1, 1, 0.0001 ]));

const grad = x.grad.numjs();
const expectedGrad = nj.array([ 102.4, 1024, 0.1024 ]);

About

Small library for building Neural Networks in Javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published