canguezelhan / key-value-memory-network

The implementation of the key-value memory network in Python/TensorFlow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Key Value Memory Networks

This repository contains the implementation of Key Value Memory Networks for Directly Reading Documents in Python using Tensorflow. The model is tested on The Children's Book Test and CNN QA.

Structure of Key Value Memory Networks

Get Started

git clone https://github.com/canguezelhan/key-value-memory-network.git

mkdir ./key-value-memory-network/key_value_memory/logs
mkdir ./key-value-memory-network/key_value_memory/data/
cd ./key-value-memory-network/key_value_memory/data
wget http://www.thespermwhale.com/jaseweston/babi/CBTest.tgz
tar xzvf ./CBTest.tgz
wget https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfTTljRDVZMFJnVWM
tar xzvf ./cnn.tgz

cd ../
python model.py

Usage

Running model.py

The script, when executed, creates several files as output. These files can be found in the directory key_value_memory/results/

There are serval flags within model.py. Check all available flags with the following command.

python model.py -h

Requirements

  • tensorflow
  • scikit-learn
  • six
  • nltk

About

The implementation of the key-value memory network in Python/TensorFlow


Languages

Language:Python 100.0%