• Stars
    star
    240
  • Rank 167,414 (Top 4 %)
  • Language
    Python
  • Created over 8 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dynamic Memory Networks (https://arxiv.org/abs/1603.01417) in Tensorflow

Dynamic Memory Networks in Tensorflow

DMN Structure

Implementation of Dynamic Memory Networks for Visual and Textual Question Answering on the bAbI question answering tasks using Tensorflow.

Prerequisites

  • Python 3.x
  • Tensorflow 0.8+
  • Numpy
  • tqdm - Progress bar module

Usage

First, You need to install dependencies.

sudo pip install tqdm
git clone https://github.com/therne/dmn-tensorflow & cd dmn-tensorflow

Then download the dataset:

mkdir data
curl -O http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz
tar -xzf tasks_1-20_v1-2.tar.gz -C data/

If you want to run original DMN (models/old/dmn.py), you also need to download GloVe word embedding data.

curl -O http://nlp.stanford.edu/data/glove.6B.zip
unzip glove.6B.zip -d data/glove/

Training the model

./main.py --task [bAbi Task Number]

Testing the model

./main.py --test --task [Task Number]

Results

Trained 20 times and picked best results - using DMN+ model trained with paper settings (Batch 128, 3 episodes, 80 hidden, L2) + batch normalization. The skipped tasks achieved 0 error.

Task Error Rate
  1. Two supporting facts | 25.1%
  2. Three supporting facts | (N/A)
  3. Three arguments relations | 1.1%
  4. Compound coreference | 1.5%
  5. Time reasoning | 0.8%
  6. Basic induction | 52.3%
  7. Positional reasoning | 13.1%
  8. Size reasoning | 6.1%
  9. Path finding | 3.5% Average | 5.1%

Overfitting occurs in some tasks and error rate is higher than the paper's result. I think we need some additional regularizations.

References

To-do

  • More regularizations and hyperparameter tuning
  • Visual question answering
  • Attention visualization
  • Interactive mode?

More Repositories

1

cottage

Simple, fast HTTP router on koa.js.
JavaScript
101
star
2

compact-bilinear-pooling-tf

Compact Bilinear Pooling (https://arxiv.org/abs/1511.06062) for TensorFlow
C++
47
star
3

instauuid

Instagram-Style Compact UUID generator library for Node.js
JavaScript
43
star
4

tender

Serverless for Web3, which is Immutable and Verifiableβœ…
TypeScript
23
star
5

errorist

Utilities for coping with errors and panics like a boss in Go
Go
19
star
6

hype

Production-Ready Indexer Framework for Terra
TypeScript
18
star
7

stringenum

A go tool to auto-generate methods for enum types based on string.
Go
13
star
8

tschema

Simple and fastest static type checker for Node.js.
JavaScript
10
star
9

connect6-python

Connect6 (Korean: 윑λͺ©) for Python.
Python
10
star
10

pine-log

Simple yet powerful logger for Node.JS with contextual logging
TypeScript
10
star
11

lrmr

Less-Resilient MapReduce for Go
Go
10
star
12

relation-networks-tensorflow

WIP) A TensorFlow implementation of DeepMind's Relation Networks (https://arxiv.org/abs/1706.01427)
Python
8
star
13

vscode-theme-atom

Visual Studio Code theme for Atom Editor
CSS
7
star
14

cosmwasm-rbac

Access Control Utilities for CosmWasm smart contracts
Rust
5
star
15

til

Today I Learned
4
star
16

shape

Shape is Android UI Markup Language.
Java
2
star
17

my-env

My shell environment. Used for setting up new computers.
Vim Script
2
star
18

mansion

A full-sized, convinient framework built on cottage.
JavaScript
2
star
19

thebot

Thebot is simple, intuitive, extensible chatbot framework for Node.
JavaScript
1
star
20

droidium

Droidium is an Android manipulation & automation framework for Node.js.
JavaScript
1
star
21

tender-isolate

Isolation Runtime Server for Tender
TypeScript
1
star
22

importer

A node.js module that helps you to import (require) all sources in a directory.
JavaScript
1
star