Git Product home page Git Product logo

dynamic-memory-networks-plus-pytorch's Introduction

Dynamic-memory-networks-plus-Pytorch

DMN+ implementation in Pytorch for question answering on the bAbI 10k dataset.

Contents

file description
babi_loader.py declaration of bAbI Pytorch Dataset class
babi_main.py contains DMN+ model and training code
fetch_data.sh shell script to fetch bAbI tasks (from DMNs in Theano)

Usage

Install Pytorch v0.1.12 and Python 3.6.x (for Literal String Interpolation)

Run the included shell script to fetch the data

chmod +x fetch_data.sh
./fetch_data.sh

Run the main python code

python babi_main.py

Benchmarks

Low accuracies compared to Xiong et al's are may due to different weight decay setting or the model's instability.

On some tasks, the accuracy was not stable across multiple runs. This was particularly problematic on QA3, QA17, and QA18. To solve this, we repeated training 10 times using random initializations and evaluated the model that achieved the lowest validation set loss.

You can find pretrained models here

Task ID This Repo Xiong et al
1 100% 100%
2 96.8% 99.7%
3 89.2% 98.9%
4 100% 100%
5 99.5% 99.5%
6 100% 100%
7 97.8% 97.6%
8 100% 100%
9 100% 100%
10 100% 100%
11 100% 100%
12 100% 100%
13 100% 100%
14 99% 99.8%
15 100% 100%
16 51.6% 54.7%
17 86.4% 95.8%
18 97.9% 97.9%
19 99.7% 100%
20 100% 100%

dynamic-memory-networks-plus-pytorch's People

Contributors

dandelin avatar yermouth avatar

Watchers

 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.