-
A Tensorflow implementation of Google's QANet (Note: This is not an official implementation from the authors of the paper)
Unofficial Implementation source: https://github.com/NLPLearn/QANet
-
List of modified files: a) prepro.py : Functions modified - get_embedding(),build_features() Functions created - get_POS_one_hot_vector()
b) model.py : Functions modified - forward()
c) layers.py : Functions created - drnn(), bidirlstm(), bidirectional_dynamic_rnn()
d) demo.py : Functions modified - answer()
e) config.py : Tuned hyperparameters
-
List of commands:
To download and preprocess the data, run
a) sh download.sh
b) python config.py --mode prepro
hyper parameters are stored in config.py. To debug/train/test/demo, run
c) python config.py --mode debug/train/test/demo
d) The default directory for the tensorboard log file is train/{model_name}/event
Run tensorboard for visualisation.
$ tensorboard --logdir=./
- List of requirements:
- Python>=2.7
- NumPy
- tqdm
- TensorFlow>=1.5
- spacy==2.0.9
- bottle (only for demo)
- Cuda 10
The dataset used for this task is Stanford Question Answering Dataset. Pretrained GloVe embeddings obtained from common crawl with 840B tokens used for words.