Giter Site home page Giter Site logo

rnnvis's Introduction

RNNVis

A visualization tool for understanding and debugging RNNs.

Online demo: http://rnnvis.hkustvis.org

The major goal of this project is to explore possible ways to help better unerstanding of RNN models (Vanilla RNN, LSTM, GRU, etc.) and help practitioners to debug their model and data, and help reasearchers improve model architecture and performances.

Note: This is an underdeveloped project.

Setup

  1. Install TensorFlow r0.12.1 (gpu is also supported)

  2. To install all the dependency packages, under the project dir, run:

    pip install -r requirements.txt

  3. Example datasets are already in the cached_data dir.

    To set up the mongodb, you must first have mongodb installed on your system and have a mongod instance running. More details

    Then, at the project root dir, run

    python -m rnnvis.main seeddb

TODO

  • Remove the dependency of Mongo for easier extension.

  • Migration to TensorFlow 1.0 and Vuex.

Usage

Run Training Test

  1. Run tests on PTB datasets to see whether the code runs normally:

    python -m tests.test_language_model --config_path=./config/model/lstm.yml --data_path=./cached_data/simple-examples/data

Training an RNN model

  1. To train a rnn model using predefined procedures, run:

    python -m tests.train_with_db --config_path=./config/model/lstm-large3.yml

    you can modify the model file under the /config directory and customize your model and training parameters.

Visualizing the hidden states of a model

  1. Since the system is built on top of the hidden states of RNN. You need to first record the hidden states of the model by running it on a dataset (the hidden states record will be stored in mongodb for latter use). To do so, you can run:

    python -m tests.test_eval_record --config_path=./config/model/lstm-large3.yml

  2. Then, to run the visualization server, first modify the ./config/models.yml to config which models you want to load. Then run:

    python -m rnnvis.main server

    to host a server for the visualization. Also note that it will take some time for the visualization to pop up (depend on the size of your model and the dataset) the first time you attempt to run the visualization.

rnnvis's People

Contributors

myaooo avatar shaozu avatar nehzilrz avatar

Watchers

James Cloos 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.