CODE PATH
PRO ACCOUNT

Master Code
On The Go

Learn. Practice. Build.

Quest 1 β€’ Lesson 3

🧠 Neural Networks & Deep Learning

A neural network is a set of algorithms inspired by the human brain. It consists of layers of neurons that process information. Deep learning uses many layers to learn complex patterns.

"A single neuron (perceptron) takes inputs, multiplies them by weights, adds a bias, and applies an activation function to produce an output."

πŸ”¬ A Single Neuron (Perceptron)

Ξ£ x₁ xβ‚‚ x₃ output weights + bias activation (sigmoid/ReLU)

A neuron computes: output = activation( w₁·x₁ + wβ‚‚Β·xβ‚‚ + ... + b )

πŸš€ Live Demo: Neural Network Classifier

A small neural network with 1 hidden layer (4 neurons). It learns to separate blue and red points. Click on the canvas to add points (blue = class 0, red = class 1). Then press "Train" to see the network learn the decision boundary.

Click to add points, then press "Train". The coloured background shows the network's prediction.
πŸ“˜ Neural network architecture (TensorFlow.js)
const model = tf.sequential();
model.add(tf.layers.dense({units: 4, activation: 'relu', inputShape: [2]}));
model.add(tf.layers.dense({units: 2, activation: 'softmax'}));
model.compile({optimizer: 'adam', loss: 'categoricalCrossentropy'});

πŸ—οΈ From Shallow to Deep

✨ Challenge: Train a Non-linear Boundary

Add points forming a circle: blue inside, red outside (or vice versa). Train the network – can it learn a circular boundary? Add more hidden units or layers to improve.

❀️ Support Free Education

This course is 100% free. If it helps you, consider buying me a coffee.

β˜• Buy Me a Coffee

➑️ Ready for more?

Next lesson: Computer Vision – detect objects with pre‑trained models.

Continue to Lesson 1.4 β†’

(Coming soon – check back or buy Pro Pack for instant access)