In Python code, please (preferred library is: Keras TensorFlow).
We want to implement a CNN to classify fashion-MNIST images that has the following structure:
1. A 2D convolution layer having 5 channels, kernel size = 3x3, padding = 2, and ReLU activation function.
2. Max pooling layer having pool size = 2x2 and stride = 1.
3. 2D convolution layer having 15 channels, kernel size = Sx5, no padding, and sigmoid activation function.
4. Dense layer having 100 neurons and sigmoid activation.
5. Dense layer having 50 neurons and ReLU activation.
6. Dense layer for the output.
TASK 1
Implement the CNN: After creating a random input of shape (batch_size X channel num * height x width) 1x1x28x28, report the output shape of all 7 layers:
TASK 2
Train and test your model. Set the learning rate to 0.9 and run for 10 epochs. Report your test accuracies for batch_size 64, 128, and 256.
TASK 3
Run the LeNet-5 architecture and report the test accuracies for batch_Size = 64, 128, and 256. Compare with the results in Task 2.