Build your own neural network, Exercise 1
Key Takeaways
This video demonstrates building a neural network framework from scratch using NumPy, covering the basics of neural networks and optimization, and provides a walkthrough of the solution to the first coding exercise.
Full Transcript
hey welcome to the course we're going to be using code walkthroughs as a way for me to explain my solutions to the coding exercises that i pose to you this is only to show one possible way to do it there are lots of ways to go about this lots of really good ways to go about this this i'm not showing you the right way or even the best way but i'm showing you a way and the benefit of that is that at each step along the way you're free to either do it in your own style to differ from what i write as much as you want but also if you get a little bogged down or sometimes the changes can be hard to keep track of you can always revert back to whatever my solution was to the previous exercise and build from that so the goal is to give you maximum flexibility but to always have a get out of jail free card in case you get tripped up the walkthroughs themselves are actually entirely optional it's just a way for me to verbally step through what i've done but you're welcome to just look at the code of my solution and for some people that actually is a much easier way to ingest the ideas and to understand the work that was done so they're not gonna you're gonna be blocked from progressing to the next example if you don't watch the video they're just here for in case it's helpful here we're taking a look at our very first test data set this is our as simple as possible example we've named it data loader 2x2 dot pi the very first thing we've done in line one is import numpy and numpy will let us do all kinds of numerical computations has a great set of tools the most important thing we'll use it for right now is it's very useful data structure called a numpy array we define the function get data sets and within it we create this variable examples which is a list of arrays and each of these arrays is two rows by two columns and the way that we initialize the array here is to do a list of lists it's a little bit confusing because we have examples which is itself a list and then within it we have a bunch of arrays which are each initialized as a list of lists so there's a bunch of square brackets running around but the way i've uh spaced it here you can see the rows and the columns and you can if you use your imagination imagine each z zero as a black pixel and each one as a white pixel then what you see in this first example is an image with a black bar on top and a white bar on the bottom the second example has a white bar on the left and a black bar on the right the third example has a white bar on top and a black bar on the bottom and so forth and as you go through here you can see that we have diagonals we can have corners and altogether there's lots of variations that we can have of this in fact because we have four pixels each of which we're allowing to have two values we can have two to the fourth or 16 different examples which we enumerated most of them here if not all and then we just close that out for this example that's all we had to do was create a list of these numpy arrays each of which is a very tiny two by two matrix or two by two two dimensional array which you can imagine as an image so this is our silly simple image test set as we get things up and going the goal being that if we can run this ridiculously simple example through we know what answer we should get then once that's if that doesn't work we know something's wrong once it does work then we can swap this out for a slightly more complex example until we step our way up to the full problem that we're trying to solve
Original Description
Get the full course experience at https://e2eml.school/312
In this course we build a neural network framework from scratch. By the time you are done, you will have a simple but fully functional neural network framework. You will understand every important concept, including optimization, normalization, backpropagation, and gradient descent.
Writing the code has been broken out into 28 separate coding exercises. In each one, we discuss the principles involved, list the goals, and then you get turned loose to write the code. You get to work at your own pace and on your own timeline. If you get stuck, there are discussion threads within each lesson so that I can help you get pointed in the right direction. After you’re done, I walk through my solution line by line, describing exactly what I did and why.
This sets you up to experiment on your own, to try more exotic architectures, and to better understand what frameworks like PyTorch and TensorFlow are doing behind the scenes.
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Brandon Rohrer · Brandon Rohrer · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Robot Learning with a Biologically-Inspired Brain (BECCA)
Brandon Rohrer
BECCA talk at AGI 2011
Brandon Rohrer
Robot Learning with a Biologically-Inspired Brain (BECCA), The Sequel
Brandon Rohrer
BECCA listens to The Hobbit
Brandon Rohrer
Learning the building blocks of speech: BECCA extracts a hierarchy of audio features
Brandon Rohrer
BECCA listens for sound effects in The Hobbit
Brandon Rohrer
BECCA finds movie trailers while watching the Big Bang Theory
Brandon Rohrer
Listening for unexpected sounds: BECCA detects anomalies in audio data
Brandon Rohrer
Learning the building blocks of vision: BECCA extracts a spatio-temporal hierarchy of features
Brandon Rohrer
Watching for the unexpected: BECCA detects anomalies in video data
Brandon Rohrer
BECCA finds a stationary target
Brandon Rohrer
BECCA finds a stationary target at 3X speed
Brandon Rohrer
BECCA watches the X-men and Bruce Lee
Brandon Rohrer
BECCA plays Quidditch
Brandon Rohrer
BECCA chases a ball
Brandon Rohrer
BECCA chases a ball, part 2
Brandon Rohrer
Becca chases a ball, part 3
Brandon Rohrer
BECCA creates features from MNIST
Brandon Rohrer
How reinforcement learning works in Becca 7
Brandon Rohrer
Deep Learning Demystified
Brandon Rohrer
How Data Science Works
Brandon Rohrer
How Convolutional Neural Networks work
Brandon Rohrer
How Bayes Theorem works
Brandon Rohrer
How Deep Neural Networks Work
Brandon Rohrer
Recurrent Neural Networks (RNN) and Long Short-Term Memory (LSTM)
Brandon Rohrer
How Support Vector Machines work / How to open a black box
Brandon Rohrer
How autocorrelation works
Brandon Rohrer
Getting closer to human intelligence through robotics
Brandon Rohrer
A minimalist's guide to slicing and indexing pandas DataFrames
Brandon Rohrer
How decision trees work
Brandon Rohrer
Data scientist archetypes
Brandon Rohrer
How to use python's datetime package
Brandon Rohrer
How optimization for machine learning works, part 1
Brandon Rohrer
How optimization for machine learning works, part 2
Brandon Rohrer
How optimization for machine learning works, part 3
Brandon Rohrer
How optimization for machine learning works, part 4
Brandon Rohrer
How convolutional neural networks work, in depth
Brandon Rohrer
How to pick a machine learning model 4: Splitting the data
Brandon Rohrer
How to pick a machine learning model 3: Choosing a loss function
Brandon Rohrer
How to pick a machine learning model 2: Separating signal from noise
Brandon Rohrer
How to pick a machine learning model 1: Choosing between models
Brandon Rohrer
How to pick a machine learning model 5: Navigating assumptions
Brandon Rohrer
What do neural networks learn?
Brandon Rohrer
Interview with iRobot's Director of Data Science Angela Bassa
Brandon Rohrer
How Backpropagation Works
Brandon Rohrer
Evolutionary Powell's method: A discrete optimizer for hyperparameter optimization
Brandon Rohrer
1D convolution for neural networks, part 1: Sliding dot product
Brandon Rohrer
1D convolution for neural networks, part 2: Convolution copies the kernel
Brandon Rohrer
1D convolution for neural networks, part 3: Sliding dot product equations longhand
Brandon Rohrer
1D convolution for neural networks, part 4: Convolution equation
Brandon Rohrer
1D convolution for neural networks, part 5: Backpropagation
Brandon Rohrer
1D convolution for neural networks, part 6: Input gradient
Brandon Rohrer
1D convolution for neural networks, part 7: Weight gradient
Brandon Rohrer
1D convolution for neural networks, part 8: Padding
Brandon Rohrer
1D convolution for neural networks, part 9: Stride
Brandon Rohrer
The Four Grand Challenges of Robots in the Home
Brandon Rohrer
How Convolution Works
Brandon Rohrer
The Softmax neural network layer
Brandon Rohrer
Batch normalization
Brandon Rohrer
Getting ready to learn Python, Mac edition #1: Files and directories
Brandon Rohrer
More on: Neural Network Basics
View skill →Related Reads
📰
📰
📰
📰
Help Choosing Neural Network Architecture for Matrix Classification
Reddit r/deeplearning
How to Choose the Best Deep Learning Model for Medical Imaging
Medium · Deep Learning
Another Way to Read Neural Geometry
Medium · Data Science
Another Way to Read Neural Geometry
Medium · Deep Learning
🎓
Tutor Explanation
DeepCamp AI