Homework 1
Provide the solutions to the homework either in (a) a Python script or (b) in a Jupyter notebook (preferred choice).
Points 1, 2, 4 should be provided as code.
Point 3 should be provided in a markdown cell (if Jupyter notebook) or in a multiline comment (if Python script).
Taking inspiration from the notebook `01-intro-to-pt.ipynb`, build a class for the Multilayer Perceptron (MLP) whose scheme is drawn in the last figure of the notebook. As written there, no layer should have bias units and the activation for each hidden layer should be the Rectified Linear Unit (ReLU) function, also called ramp function. The activation leading to the output layer, instead, should be the softmax function, which prof. Ansuini explained during the last lecture. You can find some notions on it also on the notebook.
After having defined the class, create an instance of it and print a summary using a method of your choice.
Provide detailed calculations (layer-by-layer) on the exact number of parameters in the network.
Provide the same calculation in the case that the bias units are present in all layers (except input).
For each layer within the MLP, calculate the L2 norm and L1 norm of its parameters.