Multilayer Perceptron with k Hidden Layers, built from scratch using NumPy. You can choose the number of hidden layers with the .Dense() method, a demonstration is found in experiments.py.
Hidden Layer values are computed with ReLU (eq. 1) and output probabilities with Softmax (eq. 2). The architecture is demonstrated in Figure 1.
(Figure 1. Architecture of a k-layer Neural Network)Required shape of the data is X.shape = (Ndim, Npts). Labels can have shape y.shape = (Npts,)
This model requires Python 3 and packages NumPy and Matplotlib.pyplot.
Navigate to the repository in your terminal and type:
python experiment.py
Feel free to send me your questions to Majdj@kth.se.