Neural networks
in JavaScript
Machine learning shifts the focus of dev work
Our responsibility Black magic
Synaptic.js makes complicated concepts simple
Initializing a neural network with Synaptic
Training a network with Synaptic
Using the trained network
digitMatrix: 28x28 array of pixel lightness (values between 0 and 1)
networkResult: [0.01, 0, 0.2, 0, 0.9999, 0, 0, 0.032, 0, 0.1, 0]
Demo
Recognizing hand-written digits
Sources for understanding neural network
principles
- “How Machines Learn” by CGP Grey (~10min)
- “But what *is* a Neural Network?” series by 3Blue1Brown (~1h total)
- http://neuralnetworksanddeeplearning.com, has complete walkthrough of
the digit recognition example
ty

Recognizing hand-written digits with Synaptic.js

Editor's Notes

  • #3 Instead of problem + solution → correct answer, you do problem + correct answer → solution Makes job more focused on data instead of programming logic
  • #4 Synaptic is a neural network library for JavaScript Works directly in the browser, but should be separated into a Web Worker (separate thread) to not block main thread while learning Contains lots of useful abstractions which I don’t understand
  • #8 Run `node train.js` Open test.html and test network
  • #9 Links to resources