This project aim to help me understanding how IA works. That's why I choosed to use only numpy and math.
-
An
multilayer Perceptronand aCNNcapable of detecting the number drawn in a 28 x 28 square (data provided by MNIST). -
An
multilayer Perceptroncapable of doing a good score in the snake game -
An
CNNcapable of classifying pictures of planes,ships or cars
- classe.py (This file contain all of the class and function used to create IA)
-
Fully Connected Layer : This layer is responsible of predicting the expected ouput based on it's previous errors.
-
Dropout Layer : This layer is responsible of randomly disabling some neurones of the previous layer to prevent the network from overfiting to a specific pattern or the training data (This layer must be desactivate after training).
-
Convolutional Layer : This layer is reponsible of extracting features in an image.
-
Batch Normalization Layer : This layer is responsible of making the result of the Convolutional Layers more "smooth".
-
Max Pooling Layer : This layer is responsible of reducing the size of the result from the Convolutional Layers.
-
All Simple Neural Network's Layers : This part is responsible of treating the data extracted by the convolutional part.
-
$X$ is the input of the layer -
$W$ is the weight of the layer -
$B$ is the bias of the layer -
$f$ is the activation function -
$f'$ is the derivative of the activation function -
$l$ is the learning rate -
$Y$ is the output of the layer -
$dY$ is the output error -
$dW$ is weight grandiant of the layer -
$db$ is bias gradiant of the layer -
$dX$ is the input error of the layer
-
$K$ is the kernel
-
$\gamma$ is the scale of the layer -
$\beta$ is the gap of the layer -
$\epsilon$ is epsilon (it's a really small number used to avoid division by 0) -
$m$ is the number of sample in each batch
The mean
Math behind a Perceptron : https://www.youtube.com/watch?v=kft1AJ9WVDk&t=551s
Math behind a multilayer Perceptron : https://towardsdatascience.com/math-neural-network-from-scratch-in-python-d6da9f29ce65
List and explanation of activations functions : https://medium.com/@sanjay_dutta/multi-layer-perceptron-and-backpropagation-a-deep-dive-8438cc8bcae6
Visualization of a multilayer Perceptron solving MNIST : https://www.youtube.com/watch?v=9RN2Wr8xvro
What's a CNN : https://medium.com/latinxinai/convolutional-neural-network-from-scratch-6b1c856e1c07
What's a convolution : https://www.youtube.com/watch?v=KuXjwB4LzSA
How does a convolutional layer work : https://www.youtube.com/watch?v=Lakz2MoHy6o
Visualization of a CNN solving MNIST : https://www.youtube.com/watch?v=pj9-rr1wDhM
What is Batch Normalization and math for forward propagation : https://medium.com/towards-data-science/batch-norm-explained-visually-how-it-works-and-why-neural-networks-need-it-b18919692739


