Code Monkey home page Code Monkey logo

ran's Introduction

Recurrent Additive Networks

Note: This code is not up-to-date, please refer to the implementation by the original authors: https://github.com/kentonl/ran


This is a PyTorch implementation of Recurrent Additive Networks (RAN) by Kenton Lee, Omer Levy, and Luke Zettlemoyer:

http://www.kentonl.com/pub/llz.2017.pdf

The RAN model is implemented in ran.py.

Code for running Penn Tree Bank (PTB) experiments is taken from:

https://github.com/pytorch/examples/tree/master/word_language_model

To run PTB experiments, clone this repository:

git clone https://github.com/bheinzerling/ran

and then do:

cd ran
python main.py --cuda --emsize 256 --nhid 1024 --dropout 0.5 --epochs 100 --nlayers 1 --batch-size 512 --model RAN

This should result in a test set perplexity which roughly agrees with the RAN (tanh) result reported in the paper:

End of training | test loss  4.78 | test ppl   119.40

Better results can be achieved with smaller batch sizes, e.g. with batch size 40:

End of training | test loss  4.45 | test ppl    85.24

batch size 20:

| End of training | test loss  4.42 | test ppl    83.42

batch size 10:

| End of training | test loss  4.41 | test ppl    82.62

batch size 5:

| End of training | test loss  4.49 | test ppl    89.21

ran's People

Watchers

James Cloos avatar Mark Romme 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.