End-To-End Memory Networks for bAbI question-answering tasks
This is an implementation of MemN2N model in Python for the bAbI question-answering tasks as shown in the Section 4 of the paper "End-To-End Memory Networks". It is based on Facebook's Matlab code.
$ sudo pip install -r requirements.txt
data/tasks_1-20_v1-2
:$ wget -qO- http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz | tar xvz -C data
babi_runner.py
with -t
followed by task's id. For example,python babi_runner.py -t 1
The output will look like:
Using data from data/tasks_1-20_v1-2/en
Train and test for task 1 ...
1 | train error: 0.876116 | val error: 0.75
|=================================== | 71% 0.5s
python babi_runner.py -a
python babi_runner.py -j
memn2n_model.pklz
in trained_model/
, run:python -m demo.qa
python -m demo.qa -console
memn2n_model.pklz
can be created by running:python -m demo.qa -train
python -m demo.qa -h
See the results here.
Vinh Khuc