Neural Network Tutorial
The Mathematical Heart of Neural Network
neural network is just a math function, of the form
Fold [ Function[af[#2 . #1 ]], {v, M1, M2, M3, M4 } ]
or written as
af[M4 . af[M3 . af[M2 . af[M1 . v]]]]
where
- The M are matrixes.
- M . v means matrix times vector.
- v is a vector, of the input. (as n by 1 matrix. or can be a matrix M0.)
- af is the activation function, typically ReLU (aka Ramp function) or sigmoid.
- There may be arbitrarily number of M. Total number of matrix is the number of layers, of the neural network.
- Each of the matrix, the number of rows is arbitrary, depending on the design on how many neurons in each layer. The number of columns must be compatible for multiplication.
(* neural network, typical form *) Fold [ Function[af[#2 . #1 ]], {v, M1, M2, M3, M4 } ] === af[M4 . af[M3 . af[M2 . af[M1 . v]]]] (* example of matrix multiplication *) {{a,b}, {c,d}, {e,f} } . {x,y} === {a*x + b*y, c*x + d*y, e*x + f*y}
How Neural Network Work

- https://odysee.com/@3Blue1Brown:b/but-what-is-a-neural-network-deep:f
- But what is a neural network? | Chapter 1, Deep learning
- 3Blue1Brown
- Oct 5, 2017

- https://odysee.com/@3Blue1Brown:b/gradient-descent-how-neural-networks:a
- Gradient descent, how neural networks learn | Chapter 2, Deep learning
- 3Blue1Brown
- Oct 16, 2017

- https://odysee.com/@3Blue1Brown:b/what-is-backpropagation-and-what-is-it:8
- What is backpropagation really doing? | Chapter 3, Deep learning
- 3Blue1Brown
- Nov 3, 2017

- https://odysee.com/@3Blue1Brown:b/backpropagation-calculus-appendix-to:0
- Backpropagation calculus | Chapter 4, Deep learning
- 3Blue1Brown
- Nov 3, 2017