MP6: RNN¶
This MP will use pytorch, which is an extremely powerful and flexible neural net training package.
NOTE EXTENDED DEADLINE: Due date is Wednesday, 12/8, 11:59pm.
Pytorch is intentionally easy to learn, but even so, it’s worth spending some time with the pytorch tutorial.
In this MP, you will train an LSTM voice conversion system.
mp6.zip contains the code. You should download the code, unzip it into some directory, and then type
jupyter-lab
to get started.mp6_notebook.html is an example of what the Jupyter notebook will look like, once you’ve finished everything.
The MP uses a lot of torch-specific functions. You can find documentation for all of those functions here.
Your
LineEar.__init__
method will use torch.nn.parameter.Parameter.Your
LineEar.forward
method will use torch.matmul.Your module
EllEssTeeEmm
will put torch.nn.LSTMCells. into two torch.nn.ModuleLists – one calledself.forward_layers
, one calledself.reverse_layers
.Your module
GeeArrYou
will put torch.nn.GRUCells. into two torch.nn.ModuleLists – one calledself.forward_layers
, one calledself.reverse_layers
.Your
Encoder.__init__
,Decoder.__init__
, andPostnet.__init__
will each put Conv1d, BatchNorm1d, and ReLU layers into a torch.nn.ModuleLists – calledself.convolutions
. They will then create anEllEssTeeEmm
module calledself.recurrent
, and aLineEar
calledself.fc_projection
.
python grade.py
is how you will grade your code on your local machine.When it works on your machine, then you can try uploading only the file
submitted.py
to the MP4 assignment on Gradescope.