[SOLVED] AI6126 Homework 1

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Homework-1-7w41d8.zip (556.9 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
Rate this product

 

Question 1: A network with the type of each layer and the corresponding output shape is given as follows

The input has a shape of 1x32x32. The output shape of each layer is provided as [<ignore>, output channels, height, width]. For instance, at layer β€˜Conv2d-1’, the output shape is [6, 28, 28], i.e., six feature maps of spatial size 28×28. Each conv filter and neuron of linear layer has a bias term and stride = 1.

Calculate the number of parameters for each layer and finally the total number of parameters of this network.

Question 2: Define a model in PyTorch with the architecture as given in Question 1. Start with the following constructor

class HelloCNN(nn.Module): def __init__(self):

super(HelloCNN, self).__init__() def forward(self, x):

Question 3: Please answer the following questions:
i) Explain the difference between regression and classification.

ii) You need to train a neural network that predicts the age of a person. Is this a regression or classification problem?

iii) Why do we need a validation set?
Question 4: Let us consider the convolution of single-channel tensors 𝐱 ∈ R!Γ—! and 𝐰 ∈ R#Γ—#

βˆ’1 0 1 10 10 0 0

π’˜β‹†π’™=)βˆ’2 0 2./10 10 0 00 βˆ’1 0 1 10 10 0 0

10 10 0 0

Perform convolution as matrix multiplication by converting the kernel into sparse Toeplitz circulant matrix. Show your steps.

Question 5: Why might we prefer to minimize the sum of absolute residuals (L1 loss) instead of the residual sum of squares for some data sets (L2 loss)? (Hint: What is one of the flaws of least-squares regression?)

  • Homework-1-7w41d8.zip