
Learn to build neural networks with JavaScript and React, from perceptrons to multi-layer networks, train with mNIST data, and recognize digits using TensorFlow.
Set up the neural networks project by creating a folder, opening it in Visual Studio Code, and creating nodes.md to document the perceptron concepts and mNIST pattern recognition.
Define a two-input perceptron to classify pencils versus erasers, using training data with x1 as weight and x2 as scale, and include weights, a bias, and a learning rate.
Adjust the weights and bias to recompute the weighted sum and activation function, showing how the predicted y changes when data and weights yield different results.
Update weights shows training a simple perceptron by adjusting weights and bias using y true minus y pred with a 0.1 learning rate, demonstrated on inputs (2,7) then (3,6).
Update weights in code using a step activation function, train with inputs and labels, and adjust weights and bias via learning rate; verify results with perceptron outputs.
Learn how to evaluate a trained model with testing data and unseen data, measure testing accuracy, and recognize overfitting and underfitting with simple toy data.
Explore mnist data for a binary zero versus not zero task using 60k training and 10k testing 28x28 images, and prepare a data sets/mnist folder.
Parse images by iterating items, rows, and columns to build a 60,000-image array of 28x28 pixels. Manage offset, read bytes as uint8, push rows into images, and prepare for storage.
Initialize the front end with React using Create React App, then display stored images and labels from the JSON file in a simple hello world setup.
Create a home page and simple navigation in a React app, organize a pages folder with a home component and a custom router to preview MNIST images with labels.
Learn to preview mnist test images by copying the data set into the public/mNIST folder, fetching testdata.json with useEffect in React, and displaying labels and inputs in the frontend.
Implement batch loading of mNIST data by splitting 10,000 items into 5,000-item JSON files, updating the savedata function, and saving each batch with a batch id.
Create save training data functions to load mnist train images and train labels for 784-input perceptron training. Store 60,000 training items with the test data to enable backend perceptron training.
Prepare training and test data for a binary perceptron by mapping zero labels to one and non-zero labels to zero, flatten 28 by 28 images to 784 inputs for training.
Assess testing accuracy of a trained perceptron on MNIST test data, compare with training accuracy, and explore improvements such as shuffling and adjusting epochs, weights, and bias for higher performance.
Enhance the image prediction canvas by wiring a 2D context, enabling drawing with the mouse, and adding start, draw, and stop handlers with proper cleanup.
Enhance neural network predictions by thresholding image pixels in training and testing data, keeping values above a threshold and zeroing the rest, with processed images for the front end.
Experiment with training and retraining a mnist perceptron, adjust pixel threshold, and normalize inputs by dividing by 255 to improve accuracy and crisper image predictions on canvas.
Store misclassified data by appending input and label to a JSON file in datasets/mNIST, creating the file if needed, so each misclassification supports later model retraining.
Transition from a single perceptron to a two-neuron hidden layer in a multi-layer perceptron. Normalize a 2x2 image's pixel inputs to 0-1 and establish inter-layer weights.
Finish constructing a multilayer perceptron with input, hidden, and output layers, defining biases and weights, and wiring connections to classify zero or one, with activation and backpropagation planned for later.
Perform the forward pass by computing weighted sums and activations from four inputs through two hidden neurons with biases, then to two outputs using ReLU activations.
Compute the forward pass by calculating the weighted sums for hidden neurons from input pixel values using the weights and biases.
Explore softmax explanation and math for multi-class classification in neural networks, deriving output probabilities from weighted sums and applying the softmax function to determine the most likely class.
Learn how softmax probabilities map to eight output neurons for digit classification, using labels and example probabilities like 0.769 and 0.231 to illustrate predictions and weight updates.
Learn to implement backward propagation in a neural network, computing output deltas from probabilities versus targets and preparing to update weights after the forward pass.
Compute the gradient of loss for hidden-to-output weights, update weights and biases using output and hidden deltas, and verify improved probabilities.
Welcome to Master Neural Networks: Build with JavaScript and React. This comprehensive course is designed for anyone looking to understand and build neural networks from the ground up using JavaScript and React.
What You'll Learn:
Introduction to Neural Networks
Understand the basics of perceptrons and their similarities to biological neurons.
Learn how perceptrons work at a fundamental level.
Building a Simple Perceptron
Code a perceptron to classify simple objects (e.g., pencils vs. erasers) using hardcoded data.
Implement a basic perceptron from scratch and train it with sample inputs and outputs.
Draw graphs and explain the steps needed, including defining weighted sums and activation functions.
Perceptron for Number Recognition
Advance to coding a perceptron for number recognition using the MNIST dataset to identify if a number is 0 or not.
Train the perceptron using the MNIST dataset, optimizing weights and biases.
Learn techniques to calculate accuracy and handle misclassified data.
Save and export the trained model for use in web applications.
Parsing and Preprocessing MNIST Data
Learn to parse and preprocess MNIST data yourself.
Understand the file formats and the steps needed to convert image data into a usable format for training.
Building a Multi-Layer Perceptron (MLP)
Develop a more complex MLP to recognize digits from 0 to 9.
Implement training algorithms and understand backpropagation.
Explore various activation functions like ReLU and Softmax.
Practical Implementation with JavaScript and React
Integrate neural networks into web applications using JavaScript, React, and Node.js.
Build and deploy full-stack applications featuring neural network capabilities.
Create a React application to test and visualize your models, including drawing on a canvas and making predictions.
Integrate TensorFlow library
Learn to setup Neural networks with TensorFlow
Use Tensorflow to recognize numbers from 0-9
Course Features:
Step-by-step coding tutorials with detailed explanations.
Hands-on projects to solidify your understanding.
Graphical visualization of neural network decision boundaries.
Techniques to save and export trained models for real-world applications.
Comprehensive coverage from basic perceptrons to multi-layer perceptrons.