The spelled-out intro to neural networks and backpropagation: building micrograd
This is the most step-by-step spelled-out explanation of backpropagation and training of neural networks. It only assumes basic knowledge of Python and a vague recollection of calculus from high school.
Links:
- micrograd on github:
- jupyter notebooks I built in this video:
- my website:
- my twitter:
- “discussion forum“: nvm, use youtube comments below for now :)
- (new) Neural Networks: Zero to Hero series Discord channel: , for people who’d like to chat more and go beyond youtube comments
Exercises:
you should now be able to complete the following google collab, good luck!:
Chapters:
00:00:00 intro
00:00:25 micrograd overview
00:08:08 derivative of a simple function with one input
00:14:12 derivative of a function with multiple inputs
00:19:09 starting the core Value object of micrograd and its visualization
00:32:10 manual backpropagation example #1: simple expression
00:51:10 preview of a single optimization step
00:52:52 manual backpropagation example #2: a neuron
01:09:02 implementing the backward function for each operation
01:17:32 implementing the backward function for a whole expression graph
01:22:28 fixing a backprop bug when one node is used multiple times
01:27:05 breaking up a tanh, exercising with more operations
01:39:31 doing the same thing but in PyTorch: comparison
01:43:55 building out a neural net library (multi-layer perceptron) in micrograd
01:51:04 creating a tiny dataset, writing the loss function
01:57:56 collecting all of the parameters of the neural net
02:01:12 doing gradient descent optimization manually, training the network
02:14:03 summary of what we learned, how to go towards modern neural nets
02:16:46 walkthrough of the full code of micrograd on github
02:21:10 real stuff: diving into PyTorch, finding their backward pass for tanh
02:24:39 conclusion
02:25:20 outtakes :)
5 views
7
2
4 weeks ago 00:39:19 1
Historian Answers Witchcraft Questions | Tech Support | WIRED
4 weeks ago 00:03:25 1
Lenny Kravitz - Honey (Official Music Video)
4 weeks ago 00:03:05 1
Jeorgia Rose - Undertone (Official Music Video)
4 weeks ago 00:03:15 1
A Writing Exercise to Help You Meet Yourself
4 weeks ago 00:02:04 1
Nightcore - Bad Luck (Lyrics)
4 weeks ago 00:32:13 1
ITALIAN STYLE FOR FALL 2024 🇮🇹 AUTUMN OUTFITS 🍁MILAN STREET FASHION #vanityfair #milanstreetstyle
4 weeks ago 00:16:06 1
Halloween MBTI Witches | Enter with Care! The Spell is Already Cast!
4 weeks ago 00:04:56 1
BEHEMOTH - At The Left Hand Ov God (Live From XXX Years Ov Blasphemy)
4 weeks ago 00:20:08 1
A guide to our alphabet
4 weeks ago 01:29:35 1
TRANCE 2024 VOL. 8 [FULL ALBUM]
1 month ago 00:05:03 1
Mirko Hirsch - Pandora’s Box 2020 Remix - New Generation of Italo Disco
1 month ago 00:03:15 1
Castle in the Sky - DJ Satomi
1 month ago 00:03:02 3
Hocus Pocus - I Put A Spell On You (Official Music Video)
1 month ago 00:02:42 1
Wasps Unleash “Ritual of the Damned“ - Epic Bug Muzak Halloween Special!
1 month ago 01:00:40 1
Sensual Deep Mix | Deep & Vocal House, Nu Disco, Chillout | Soundeo Mixtape + Gravity Recordings
1 month ago 00:23:21 1
Broken Peach - The Night Of The Halloween Specials (Live)
1 month ago 00:03:37 14
DRAN Like BRANN (a Great Dark Beyond pronunciation rap)
1 month ago 00:03:33 3
This Is Halloween except it’s terrifyingly horrible.
1 month ago 00:39:38 1
Does This Spell The End of Humanity? I Resistance Podcast #25 with Dr Tess Lawrie
1 month ago 01:00:29 1
Dismantling the American Empire (w/ Cornel West) | The Chris Hedges Report
1 month ago 00:03:37 7
Damian “Jr. Gong“ Marley - Banner (Official Music Video)