Assignment : keras code for a multilayer perceptron neural network
To type in Jupyter notebook (ipynb file).
In the following 4 questions the code should simply build the architecture of the
model. You will not need to not run it on real data.
1. Write the keras code for a multilayer perceptron neural network with the following
structure: Three hidden layers. 50 hidden units in the first hidden layer, 100 in the
second, and 150 in the third. Activate all hidden layers with relu. The output layer
should be built to classify to five categories. Further, your optimization technique should
e stochastic gradient descent. (This code should simply build the architecture of the
model. You will not run it on real data.)
2. Write the keras code for a multilayer perceptron neural network with the following
structure: Two hidden layers. 75 hidden units in the first hidden layer and 150 in the
second. Activate all hidden layers with relu. The output layer should be built to classify
a binary dependent variable. Further, your optimization technique should be stochastic
gradient descent. (This code should simply build the architecture of the model. You will
not run it on real data.)
3. Write the keras code for a convolutional neural network with the following structure:
Two convolutional layers. 16 filters in the first layer and 28 in the second. Activate all
convolutional layers with relu. Use max pooling after each convolutional layer with a 2
y 2 filter. The output layer should be built to classify to ten categories. Further, your
optimization technique should be stochastic gradient descent. (This code should simply
uild the architecture of the model. You will not run it on real data.)
4. Write the keras code for a convolutional neural network with the following structure:
Two convolutional layers. 32 filters in the first layer and 32 in the second. Activate all
convolutional layers with relu. Use max pooling after each convolutional layer with a 2
y 2 filter. Add two fully connected layers with 128 hidden units in each layer and relu
activations. The output layer should be built to classify to six categories. Further, your
optimization technique should be stochastic gradient descent. (This code should simply
uild the architecture of the model. You will not run it on real data.)