ECE CNN on the MNIST dataset.
Need help with this assignment?Get an original answer from a qualified tutor — from $10/page.
Get it written →https://drive.google.com/drive/folders/1qkJQimdua0…
ECE Introduction to Neural Networks ECE Homework #7 In this task, you will design LeNet-5 using Pytorch. You will do classification on MNIST dataset: http://yann.lecun.com/exdb/mnist/ Four files are available on this site: train-images-idx3-ubyte.gz: training set images (9912422 bytes) train-labels-idx1-ubyte.gz: training set labels (28881 bytes) t10k-images-idx3-ubyte.gz: test set images (1648877 bytes) t10k-labels-idx1-ubyte.gz: test set labels (4542 bytes) The Architecture of LeNet-5 is as the following figure: Therefore, you may design the network as class ConvNet(nn.Module): def __init__(self): super(ConvNet, self).__init__() self.conv1 = nn.Conv2d(…) self.pool1 = nn.AvgPool2d() self.conv2 = nn.Conv2d(…) self.pool2 = nn.AvgPool2d() self.flatten = nn.Flatten() self.fc1 = nn.Linear(…) self.fc2 = nn.Linear(…) self.fc3 = nn.Linear(.., 10) ECE Introduction to Neural Networks def forward(self, x): x = self.pool1(torch.—(self.conv1(x))) x = self.pool2(torch.—(self.conv2(x))) x = self.flatten(x) x = torch.—(self.fc1(x)) x = torch.—(self.fc2(x)) x = self.fc3(x) return x Where — is your activation function. You need to design each layer by yourself. You may learn how to use each API of layers from Pytorch official website: https://pytorch.org/docs/stable/index.html In your report, you should include: 1. 2. 3. 4. Accuracy on the testing dataset Your network structure What loss function are you using? (Like MSE, cross-entropy, etc) What training parameters? (What kind of optimizer are you using and what is the initial learning rate?) 5. Append your code at the end of the report. So, you will submit a single .pdf file without the code files as usual.
Get a plagiarism-free answer to this question
Send us your instructions and we’ll match you with the best writer in your subject.
- 100% human-written, zero AI
- Turnitin report included
- Confidential — we never share your data
- Free revisions & refunds