- Python > 3.6.1
pip install -r requirements.txt
In the data directory is the following datasets:
- sst - which is the Stanford Sentiment Treebank. Which has be downloaded from this link.. Number of train, dev, and test instances; 8544, 1101, and 2210 respectively.
- Fine grained sentence level sentiment analysis using the Stanford Sentiment Treebank with 5 sentiment labels.
In the model_configs directory there are two models:
These model files use a batch size of 1 and to ensure that the optimiser updates every N we set the num_gradient_accumulation_steps to N.
If you want to run these models in VSCode in debug model use the model_test.py file and put your break point on any line in the selective_tuning/allen/training/modified_trainer.py file.
The modified_trainer.py is the file that contains the code that stores the gradients for each sample within a batch on lines 367 to 413.