- pytorch >= 0.4.0
- numpy >= 1.13.3
- sklearn
- python 3.6 / 3.7
- pytorch-transformers == 1.2.0
To install requirements, run pip install -r requirements.txt
.
- For SciBERT models, please visit allenai/scibert for downloading.
- For ImbalancedDatasetSampler, please visit ImbalancedDatasetSampler. Note that this is their April 20, 2020 version.
Please refer to datasets folder for more details.
python train_k_fold_cross_val.py
- All implemented models are listed in models directory.
- See train.py for more training arguments.
- Refer to train_k_fold_cross_val.py for k-fold cross validation support.
python infer_example_bert_models.py
- Aspect Based Sentiment Analysis, PyTorch Implementations.: https://github.com/songyouwei/ABSA-PyTorch