This project involves sentiment classification on the IMDb dataset using two different models: an LSTM and a simple Transformer. The goal is to classify movie reviews as positive or negative.
- Accuracy: 90% after 10 epochs
- Accuracy: 80% after 20 epochs
| LSTM Confusion Matrix | Transformer Confusion Matrix |
|---|---|
![]() |
![]() |
| LSTM ROC Curve | Transformer ROC Curve |
|---|---|
![]() |
![]() |
The project uses the following libraries:
torchtorchvisiontorchtextnumpymatplotlibsklearn
To install the required dependencies, run:
pip install -f requirements.txt- To choose model, see the config
- Train
python train.py- Evaluate/visualize
python evaluation.py


