The code for paper: 《TSAM: A Two-Stream Attention Model for Causal Emotion Entailment》
- Python 3.6
- PyTorch 1.6
- Transformers from Hugging Face
With Anaconda, we can create the environment with the provided environment.yml
:
conda env create --file environment.yml
conda activate CEE
The code has been tested on Ubuntu 16.04 using a single GPU. For multi-GPU training, a little extra work may be needed, and please refer to these examples: Hugging Face and CLUEbenchmark.
data/
including original annotation dataset and our preprocessed dataset.code/
including our codes.- Download necessary pre-trained model files (RoBERTa base and large).
- Configure hyper-parameters in
code/config.py
- Run our model:
python code/main.py