tensorflow implementation for RMN
spacy==2.0.18
tensorflow-gpu==1.15.0
numpy==1.15.4
sklearn
python 3.6.9
- install requirements
pip install -r requirements.txt
- download en-core-web-sm
python -m spacy download en
- download 'glove.840B.300d.zip' from here and extract 'glove.840B.300d.txt' to './data'
- generate word2idx.pkl and glove_300.pkl matrix
python preprocess.py
- generate train and test.pkl
python Dataset.py
- train (can modify settings in Settings.py)
python train.py
- test
python train.py --train=False
- Tips
for finetune.py, you can get the current best model, and finetune it with smaller learning rate or remove dropout to train new model.