GithubHelp home page GithubHelp logo

vyraun / rnn_reader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adbrebs/rnn_reader

0.0 3.0 0.0 155 KB

Implementation of "Teaching Machines to Read and Comprehend" in Theano/Lasagne

Python 100.00%

rnn_reader's Introduction

Fast attentive reader from "Teaching Machines to Read and Comprehend"

Lasagne/Theano implementation of the attentive reader of the following paper from Google DeepMind.

Teaching Machines to Read and Comprehend,
Karl Moritz Hermann, Tomáš Kočiský, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, Phil Blunsom,
NIPS 2015

Our attentive reader architecture is fast to train and reaches 62.1% accuracy in only 4-5 hours (green curve below). Learning starts straight away, the plateau phase is very short.

img

Instructions

  1. Clone the repository

  2. Follow the instructions steps of https://github.com/thomasmesnard/DeepMind-Teaching-Machines-to-Read-and-Comprehend to download and process the data.

  3. Create a $DATA_PATH env variable with the path of the dataset folder. More precisely the dataset folder should have the following structure: $DATA_PATH > deepmind-qa > cnn > questions and stats folder

  4. Go to the cloned repository and run python main.py -s config/big/attention_softmax.py.

It should take about 4-5 hours to reach a validation performance of 62% on a Titan X.

Differences between deepmind's model and ours

If the attentive reader mechanism is the same, there are several architecture differences compared to Deepmind's model. In particular:

  • we use GRUs instead of LSTMS,
  • we don't use dropout,
  • we use ADAM as gradient descent rule,
  • a single small layer of GRUs (256 units),
  • no bidirectional layer,
  • no skip connections,
  • no weight noise,
  • vocabulary is limited to 30K words.

The config file of our architecture: https://github.com/adbrebs/rnn_reader/blob/master/config/big/attention_softmax.py

Requirements

  • Theano
  • Lasagne
  • Fuel (for the data pipeline)
  • Raccoon (to monitor training): NEW: you need a earlier version: git checkout 5174d65e69f7cf7a7b8fd26db6b6eab9a48d0339

Credit

Our code relies on the fuel data extensions developed by Thomas Mesnard, Alex Auvolat and Étienne Simon: https://github.com/thomasmesnard/DeepMind-Teaching-Machines-to-Read-and-Comprehend

rnn_reader's People

Contributors

adbrebs avatar

Watchers

James Cloos avatar Vikas Raunak avatar  avatar

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.