Learn how AI works by building it — from the math up.

Most machine learning is taught as a black box: data goes in, a prediction comes out, and the part that actually matters stays hidden.

Here, it's the exact opposite — every model written from scratch, every matrix and gradient drawn out, so you can see exactly how a network learns.

I was a premed kid when I first tried to learn AI in 2021. It was a side thing, so a black box was all the reason I needed to quit. That was a mistake—looking into the box is worth it no matter where you're headed.

— Conrad Feng

looking through the glass

Most intro to AI tutorials look like this:

train.py
import tensorflow as tf
model = tf.keras.Sequential([...]) # who knows
model.compile(optimizer="adam", loss="...")
model.fit(x_train, y_train, epochs=5) # 97% accuracy
# watdatmean
but here's what model.fit() is (kinda) actually doing
0.21
-0.84
0.55
0.10
-0.33
0.47
0.92
-0.18
0.66
0.05
-0.27
0.73
W · 3×4
×
1.00
0.40
-0.70
0.90
x · 4×1
+
0.10
-0.20
0.05
b · 3×1
=
-0.32
-1.15
1.58
y · 3×1
yᵢ = Σⱼ Wᵢⱼ · xⱼ + bᵢ
y0 = (0.21)(1.00)
softmax(y) → ŷ · argmax → class 2
ŷ₀
0.12
ŷ₁
0.05
ŷ₂
0.82

Contents

00

Start here

Just a few quick notes on who I am, how these notebooks work, and prereqs.

01

The fundamentals Coming

The stuff behind the machine: learning forward pass to backpropagation using the math you already know.

≈ 4 sections · prereq: a little linear algebra

Why I'm
building this

I learn best by rebuilding things until they stop feeling like magic. Conrad's Notebook is the resource I wish I'd had when I started — patient, visual, and honest about the math. It will always be free, and I'm building it in the open, one chapter at a time.

Read more about the project →