Skip to content

Latest commit

 

History

History
39 lines (36 loc) · 943 Bytes

README.md

File metadata and controls

39 lines (36 loc) · 943 Bytes

RMN

tensorflow implementation for RMN

Requirements

spacy==2.0.18
tensorflow-gpu==1.15.0
numpy==1.15.4
sklearn
python 3.6.9

Usage

  • 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.