Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please mention your Python version ( and maybe the version of all other packages ) . In this exercise you are going to run some
Please mention your Python version and maybe the version of all other packages In this exercise you are going to run some experiments involving CNNs You need to know Python and install the following libraries: Pytorch, matplotlib and all their dependencies. You can find detailed instructions and tutorials for each of these libraries on the respective websites. For all experiments, running on CPU is sufficient. You do not need to run the code on GPUs, although you could, using for instance Google Colab. Before start, we suggest you review what we learned about each layer in CNN and read at least this tutorial.
Implement and train a VGG net on the MNIST dataset. VGG was an earlier version of VGG and can be found as model A in Table of this paper, whose Section also gives you all the details about each layer. The goal is to get the loss as close to as possible. Note that our input dimension is different from the VGG paper. You need to resize each image in MNIST from its original size times to times why For your convenience, we list the details of the VGG architecture here. The convolutional layers are denoted as Convnumber of input channels, number of output channels, kernel size, stride, padding; the batch normalization layers are denoted as BatchNormnumber of channels; the maxpooling layers are denoted as MaxPoolkernel size, stride; the fullyconnected layers are denoted as FCnumber of input features, number of output features; the drop out layers are denoted as Dropoutdropout ratio: Conv BatchNorm ReLU MaxPool Conv BatchNorm ReLU MaxPool Conv BatchNorm ReLU Conv BatchNorm ReLU MaxPool Conv BatchNorm ReLU Conv BatchNorm ReLU MaxPool Conv BatchNorm ReLU Conv BatchNorm ReLU MaxPool FC ReLU Dropout FC ReLU Dropout FC You should use the crossentropy loss torch.nnCrossEntropyLoss at the end. This experiment will take up to hour on a CPU, so please be cautious of your time. If this running time is not bearable, you may cut the training set to so only have images per class instead of the regular
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started