In this assignment you will practice with training Convolutional Neural Networks for digits classification tasks.
Setup
You can work on the assignment on google colab.
Pytorch neural network tutorial
https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html#sphx-glr-beginn er-blitz-neural-networks-tutorial-py
1. Filling in the training code
The dataloader and network architecture classes are all given to you. To train a deep neural network, you iterate through the whole training dataset multiple times (called epochs). At each step of training,
- extract a mini-batch from the training dataset and give it to the network;
- compute the loss between the output from the network and the groundtruth label; 3. compute the gradients of network weights with respect to the loss;
- update the weights.
2. Answer questions
- How many layers are there in the neural network?
- How many features are there at each layer?
- What is the loss function? How does it penalize wrongly classified labels?
- If we change the input image size from 2828 to 3232, how should we modify the fc1() layer?
Reviews
There are no reviews yet.