Tensorflow Implementation of R-Net
There have been a lot of known problems caused by using different software versions. Please check your versions before opening issues or emailing me.
To download and preprocess the data, run
# download SQuAD and Glove
sh download.sh
# preprocess the data
python config.py --mode prepro
Hyper parameters are stored in config.py. To debug/train/test the model, run
python config.py --mode debug/train/test
To get the official score, run
python evaluate-v1.1.py ~/data/squad/dev-v1.1.json log/answer/answer.json
The default directory for tensorboard log file is log/event
See release for trained model.
EM | F1 | |
---|---|---|
original paper | 71.1 | 79.5 |
this project | 71.07 | 79.51 |
Native | Native + Bucket | Cudnn | Cudnn + Bucket | |
---|---|---|---|---|
E5-2640 | 6.21 | 3.56 | - | - |
TITAN X | 2.56 | 1.31 | 0.41 | 0.28 |
These settings may increase the score but not used in the model by default. You can turn these settings on in config.py
.