Assignment:
-
Refer to the file we wrote in the class: Rewrite this code, but this time remove RNN and add LSTM.
-
Refer to this file.
-
The questions this time are already mentioned in the file. Take as much time as you want (but less than 7 days), to solve the file. Once you are done, then write your solutions in the quiz.
-
Please note that the Session 4 Assignment Solution will time out after 15 minutes, as you just have to copy-paste your answers.
-
Notebook Title | Colab Link | GitHub Link |
---|---|---|
LSTM Rewrite of the RNN Code | Google Colab | GitHub |
Original RNN Code | Google Colab | GitHub |
Quiz Solution | Google Colab | GitHub |
Quiz Question | Google Colab | GitHub |
😢 I messed up the Quiz Again, forgot to set the hidden size to 100 for the above cells, only did it for the last training cells.
I also wrote a PyTorch Lightning version of the IMDB Text Classification: GoogleColab GitHub
NOTES:
- The PyTorch Text codes shared above is really outdated, i need to follow up on https://pytorch.org/tutorials/beginner/text_sentiment_ngrams_tutorial.html and rewrite the code for my sanity.
- Captum seems like a nice addition to PyTorch Text, more here: https://captum.ai/tutorials/IMDB_TorchText_Interpret