GithubHelp home page GithubHelp logo

anthrax3 / neural-gpu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openai/neural-gpu

0.0 1.0 0.0 246 KB

Code for the Neural GPU model originally described in "Neural GPUs Learn Algorithms"

Home Page: http://arxiv.org/abs/1511.08228

Python 100.00%

neural-gpu's Introduction

Code for the Neural GPU model originally described in [[http://arxiv.org/abs/1511.08228]].

Running experiments

Running one instance

The following would use 256 filters to train on binary multiplication, then 4-ary, then decimal:

python neural_gpu_trainer.py --nmaps=256 --task=bmul,qmul,mul --progressive_curriculum=5

My typical invocation is something like

  CUDA_VISIBLE_DEVICES=0 python neural_gpu_trainer.py --random_seed=0 --max_steps=200000 --forward_max=201 --nmaps=256 --task=bmul,qmul,mul --time_till_eval=4 --progressive_curriculum=5 --train_dir=../logs/August-12-curriculum/forward_max=201-nmaps=256-task=bmul,qmul,mul-progressive_curriculum=5-random_seed=0

The tests on decimal carry were done using invocations like the following:

  CUDA_VISIBLE_DEVICES=0 neural_gpu_trainer.py --train_dir=../logs/run1 --random_seed=1 --max_steps=100000 --forward_max=201 --nmaps=128 --task=add --time_till_eval=4 --time_till_ckpt=1

You can find a list of options, and their default values, in neuralgpu/trainer.py.

Examining results

Loading and examining a model

examples/examples_for_loading_model.py gives a simple instance of loading a model and running it on an instance.

Plotting results

Something like python plots/get_pretty_score.py cachedlogs/*/*task=bmul,qmul,mul-* works. There are a lot of options to make it prettier (renaming stuff, removing some runs, changing titles, reordering, etc.). For example, one of my plots was made with

python get_pretty_score.py cachedlogs/A*/*256*[=,]mul-* --titles '256 filters|' --title 'Decimal multiplication is easier with curriculum' --task mul --remove_strings='|-progressive_curriculum=5' --exclude='layer|progressive' --order '4,2,1,3' --global-legend=1

Requirements

  • TensorFlow (see tensorflow.org for how to install)
  • Matplotlib for Python (sudo apt-get install python-matplotlib)
  • joblib

Credits

Original code by Lukasz Kaiser (lukaszkaiser). Modified by Eric Price (ecprice)

neural-gpu's People

Contributors

ecprice avatar jonasschneider avatar openai-sys-okta-integration avatar

Watchers

 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.