Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Assignment 1

Report Submission Due: 23 Jan, 2024 (before 11:59 pm)

Submission: Submit to NTULearn (Assignments à Assignment 1 à Report)   with   subject “ MH6812-Ass1-YourStudentID”.

Topic: Deep Learning models for Sentiment Classification

In  this  assignment,  we  will  implement  different  deep  learning  models  for  sentiment classification task.

Code base for the Assignment 1: https://colab.research.google.com/drive/1- zXNgxFIGeTKuw2s2ftBscCKYCUnF20n?usp=sharing

In the code base, you are given a sample RNN model to classify the sentiment of sentences in iMDB dataset.

Tasks:

1.   Warm up: Read, understand, and reimplement the example in the code base.

2.   Conduct experiments with different optimizers: SGD, Adam, Adagrad and record the experimental results

3.   Use Adam optimizer, conduct experiments with different number of epochs: 5, 10, 20, and 50.

4.   Use   Adam  optimizer  and   50  epochs,  download  and  use  pretrained  Word2Vec embeddings  as  initialization  of  the   models;  compare  the   performance  with  the previous one.

Important notes:

-     You  can  refer  to  here https://stackoverflow.com/questions/49710537/pytorch- gensim-how-to-load-pre-trained-word-embeddings on how to initialize the model using Word2Vec

-     Note  that  you  can  pre-train  Word2Cec  on  this  dataset  or  use  the  pretrained Word2Vec available online. Available Pretrained Word2Vec can be downloaded

here:

https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM/edit?usp=s haring

-     Remember   to   match   the   vocabulary   of   our   TEXT   with   Word2Vec   vocab:

https://radimrehurek.com/gensim/models/word2vec.html

5.   Use  Adam   optimizer,  50  epochs  and   randomly  initialized  embeddings,  run  the experiments with the following models:

•    One-layer feed forward neural network, hidden dimension is 500.

•    Two-layer feed forward neural network, hidden dimensions are 500 and 300.

•    Three-layer feed forward neural network, hidden dimensions are 500, 300, and 200

•    CNN model (using three feature maps with the sizes are 1, 2, and 3)

•    LSTM model

•    Bi-LSTM model

Report:

.    Summarize the results of experiments (better in tables)

.    Analysis, comparison, and explanation about the results (e.g., why there is difference between with and without Word2Vec? why this model is better than another model? i.e.)

.    The format is free style. Try to be concise and not more than 4 pages

.    The deadline is 11:59pm, 23 January 2023