COMP590-Homework 5 Filling in The Training Code Solved
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,
1. extract a mini-batch from the training dataset and give it to the network;
2. 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;
4. update the weights.
1. Answer questions 1. How many layers are there in the neural network?
2. How many features are there at each layer?
3. What is the loss function? How does it penalize wrongly classified labels?
4. If we change the input image size from 28x28 to 32x32, how should we modify the fc1() layer?