Neural Networks II: Forward Propagation with Matrices + Intro to Calc
TJ Machine Learning
Slide 1
TJ Machine Learning Club
Credits
Slide 2
TJ Machine Learning Club
Review of the Perceptron
The formal equations that represent the perceptron are:
Step Function
Note that there would be more terms in f(x) if we had more inputs to the perceptron
b
Slide 3
TJ Machine Learning Club
The Neuron
b
Slide 4
TJ Machine Learning Club
Nonlinearity functions
Sigmoid Function
ReLU
tanh
Slide 5
TJ Machine Learning Club
Neural Networks
From 3Blue1Brown
Slide 6
TJ Machine Learning Club
Forward Propagation
Formalizing the process we outlined above, forward propagation for the network on the bottom left would look like this:
Slide 7
TJ Machine Learning Club
Multiplying Matrices
If dimensions
Of matrix 1 = (a x b) and
Of matrix 2 = (b x c)
Then final dimensions are: (a x c)
From mathisfun.com
Slide 8
TJ Machine Learning Club
Vectorized Forward Propagation
We can express forward propagation in terms of matrices and see massive speedups in our computation
Each column corresponds to a neuron in the previous layer
Each row corresponds to a neuron in the current layer
More generally:
Slide 9
TJ Machine Learning Club
Error
There are a variety of error functions we can use to quantify our performance on some task:
Binary Cross Entropy From Towards Data Science
Mean Squared Error
Slide 10
TJ Machine Learning Club
Derivatives
y = 2x +3
dy/dx = 2
y = x^2
dy/dx = 2x
Slide 11
TJ Machine Learning Club
Partial Derivatives
From Khan Academy
Slide 12
TJ Machine Learning Club
Gradients
From Khan Academy
From faculty.etsu.edu
Slide 13
TJ Machine Learning Club
Gradient Descent
Why not just find the global minimum? → Hard to do with the complexity of large multivariable functions like neural networks
Slide 14
TJ Machine Learning Club
Backpropagation
From 3Blue1Brown
Slide 15
TJ Machine Learning Club
Slide 16
TJ Machine Learning Club