Git Product home page Git Product logo

repn-learning's Introduction

Representation Learning (RLAI)

The given code is the implementation of the paper Generate and Test by Mahmood and Sutton (2013). This provides two methods of learning representations one called the fixed representation the other one that updates the features according to utility. The code uses Second Tester in order to determine utility (See paper.)

Requirements

  • Python 3.x

  • Pytorch 1.7+

  • Numpy

  • Matplotlib

  • tqdm

Usage

Config file:

The file config.json contains the parameters associated with the run. This can be modified for different runs. See running on server section for parrallel runs.

Running locally:

Use python script directly.

  • Fixed Representation:
python learner_original.py

Other flags can be seen by:

python learner_original.py -h
  • Using search
python learner_original.py --search
Running on a server/parallel runs:

For parallel runs you need to generate temporary configuration files by editing master_config.json and adding parameters of your choice then use:

python generate_config.py

This will create a temporary directory then with config files corresponding to the runs. Use --cfg flag to locate them. And an example script for slurm job loader is given as run.sh. Don't forget to use --store-losses flag with parallel runs.

The losses are saved as pickle files(for each run) and results can be visualised as follows.

  • For fixed representations:
python plot_graph.py -f {size of features seperated by space} -s {Seed array}
  • For search use --search flag. If you need to compare fixed representation and search results use --plot_all flag. For replacement rate and step size variation use rrstep.py and rrdr.py for replacement rate and decay rate variation plots.
  • learner_x.py is LTU +Adam and learner_xrel.py is for other activations+ Adam.

Example result:

Here X axis represents number of examples and Y axis loss. -s is using search -f is fixed representation.

** code will be updated with modules soon.

repn-learning's People

Contributors

taapasx28 avatar armahmood avatar

Watchers

James Cloos avatar  avatar Mohamed Elsayed avatar  avatar

Forkers

taapasx28

repn-learning's Issues

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.