CS6140 Machine Learning
HW6 Modern Neural Networks: Convolution NN, Recurrent NN, LSTM
Make sure you check the syllabus for the due date.
PROBLEM 1 CNN implementation in Pytorch/D2L [50 points]
Starting Code for Pb1 (modified LeNet from D2L book)
(A) Run the basic LeNet design on CIFAR and MNIST datasets
(B) Implement your own LazyConv2d_scratch() and AvgPool2D_scratch() and run LeNet_scratch design. You can do this by filling in the TODO sections, or code the cells on your own
(C) Replace Softmax/Sigmoid + AvgPool with ReLU + MaxPool built in libraries: run LeNet_scratch_ReLU_MaxPool network
(D) Add a third convolution layer, and change the channel numbers to 16,32, 64. Run the LeNet_scratch_ReLU_MaxPool_3Conv network
(E) Implement batch normalization by filling the TODOs in the two respective cells. Run the BNLeNet network
(F) Implement Residual Blocks by filling the TODO (or write your own). Run the BNLeNet_ResBlock design
PROBLEM 2 Recurrent NN : implement Encoder and Decoder [50 points]
Starting Code for Pb1
To setup: see the README, get the data, get the code : training, data_utils, evaluate.
In all problems below you will train and evaluate for translation from English to Spanish
(A) Code up the Encoder and Decoder, and use the "nn.RNN" built in pipeline.
(B) Replace "nn.RNN" with the "nn.LSTM" built-in pipeline
PROBLEM 3 Recurrent NN : Implement the RNN and LSTM
Starting Code for Pb2
(A) [50 points] Encoder, Decoder: Replace "nn.RNN" with your own RNN pipeline, using code from the d2l book
(B) [optional, no credit] Encoder, Decoder: Replace "nn.LSTM" with your own LSTM, using LSTM code from the d2l book