Giter Site home page Giter Site logo

albertpenny / reasoning_attention Goto Github PK

View Code? Open in Web Editor NEW

This project forked from junfenglx/reasoning_attention

0.0 0.0 0.0 96.79 MB

Unofficial implementation algorithms of attention models on SNLI dataset

Python 56.13% Jupyter Notebook 43.80% Shell 0.07%

reasoning_attention's Introduction

Attention on SNLI

Unofficial implementation algorithms of attention models on SNLI dataset.

Current include papers:

  1. "Reasoning About Entailment With Neural Attention", arXiv:1509.06664
  2. "Learning Natural Language Inference with LSTM", arXiv:1512.08849

Based on Lasagne.

Requirements

  • Cuda 8(Theano can run with)
  • Python 3
  • Lasagne
  • some others(best install Anaconda)

Run

At source root dir

First extracts preprocessed SNLI data ./extract_data.sh

Then run: python3 ./snli_reasoning_attention.py [condition|attention|word_by_word]

Or run: python3 ./snli_match_lstm.py

Results

The learning curve of word by word attention(best test acc is at epoch 41):

Epoch: 1-20

wordbyword_attention

Epoch: 20-39

wordbyword_attention20_39

Epoch: 40-59

wordbyword_attention40_59

The learning curve of match LSTM with word embedding: mlstm_word2vec_embedding

Notes

About word by word attention:

  1. The test acc of word by word attention is 0.2% smaller than the original paper, 83.29% (41 epochs)
  2. every 20 epochs, we reduce learning_rate, see log files for detail info.

About match LSTM:

  1. The test acc of match LSTM is 1% smaller than the original paper.
  2. not decay learning rate when train
  3. using Word2Vec pre-trained model
  4. tune OOV words in train dataset, like in Reasoning Attention

[3]:

reasoning_attention's People

Contributors

junfenglx 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.