GithubHelp home page GithubHelp logo

memn2n's Introduction

End-To-End Memory Network

Torch implementation of MemN2N (Sukhbaatar, 2015). Supports Adjacent Weight Tying, Position Encoding, Temporal Encoding and Linear Start. Code uses v1.0 of bAbI dataset with 1k questions per task.

Prerequisites:

  • Python 2.7
  • Torch (with nngraph)

Preprocessing

First, preprocess included data into hdf5 format:

python preprocess.py

This will create a hdf5 file for each task (total 20 tasks).

To train:

th train.lua

This will train on task 16 with Linear Start over 100 epochs by default. See train.lua (or the paper) for hyperparameters and more training options. To train on gpu, use -cuda.

memn2n's People

Contributors

lhoang29 avatar yoonkim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

memn2n's Issues

nn.ZeroGrad has been already assigned a parent class

mldl@mldlUB1604:~/ub16_prj/MemN2N-harvard$ th train.lua
/home/mldl/torch/install/bin/luajit: /home/mldl/torch/install/share/lua/5.1/trepl/init.lua:389: /home/mldl/torch/install/share/lua/5.1/trepl/init.lua:389: /home/mldl/torch/install/share/lua/5.1/trepl/init.lua:389: /home/mldl/torch/install/share/lua/5.1/trepl/init.lua:389: /home/mldl/torch/install/share/lua/5.1/torch/init.lua:102: class nn.ZeroGrad has been already assigned a parent class

stack traceback:
[C]: in function 'error'
/home/mldl/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
train.lua:3: in main chunk
[C]: in function 'dofile'
...mldl/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50
mldl@mldlUB1604:~/ub16_prj/MemN2N-harvard$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.