GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - chenwgen/LSTMVis: Visualization Toolbox for Long Short Term Memory networks (LSTMs)

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

87 Commits
87 Commits

Folders and files

NameName
Last commit message
Last commit date
client
client
 
 
docs
docs
 
 
lstmdata
lstmdata
 
 
model
model
 
 
tools
tools
 
 
.gitignore
.gitignore
 
 
.virtualrc
.virtualrc
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 
server.py
server.py
 
 

Repository files navigation

Visual Analysis for State Changes in RNNs

More information about LSTMVis, an introduction video, and the link to the live demo can be found at lstm.seas.harvard.edu

Install

Clone the repository:

git clone https://github.com/HendrikStrobelt/LSTMVis.git; cd LSTMVis

Install python (server-side) requirements using pip:

pip install -r requirements.txt

on OSX 10.11 (El Capitan):
pip install --user -r requirements.txt

Download & Unzip example dataset(s):

Children Book - Gutenberg - 2.2 GB

start server:

python server.py -dir <datadir>

open browser at http://localhost:8888 - eh voila !

Adding Your Own Data

If you want to train your own data first, please read the Training document. If you have your own data at hand, adding it to LSTMVis is very easy. You only need three files:

  • HDF5 file containing the state vectors for each time step (e.g. cbt_epoch10.h5)
  • HDF5 file containing a word ID for each time step (e.g. train.h5)*
  • Dict file containing the mapping from word ID to word (e.g. words.dict)*

A schematic representation of the data:

Data Format

*If you don't have these files yet, but a space-separated .txt file of your training data instead, check out our text conversion tool

Data Directory

LSTMVis parses all subdirectories of <datadir> for config files lstm.yml. A typical <datadir> might look like this:

<datadir>
├── children_book  		<--- project directory
│   ├── lstm.yml 		<--- config file
│   ├── cbt_epoch10.h5 	<--- states for each time step
│   ├── train.h5 		<--- word ID for each time step
│   └── words.dict 		<--- mapping word ID -> word
├── fun .. 

Config File

a simple example of an lstm.yml is:

name: children books  # project name
description: children book texts from the Gutenberg project # little description

files: # assign files to reference name
  states: cbt_epoch10.h5 # HDF5 files have to end with .h5 or .hdf5 !!!
  word_ids: train.h5
  words: words.dict # dict files have to end with .dict !!

word_sequence: # defines the word sequence
  file: train # HDF5 file
  path: word_ids # path to table in HDF5
  dict_file: words # dictionary to map IDs from HDF5 to words

states: # section to define which states of your model you want to look at
  file: states # HDF5 files containing the state for each position
  types: [
  	{type: state, layer: 1, path: states1}, # type={state, output}, layer=[1..x], path = HDF5 path
	{type: state, layer: 2, path: states2},
  	{type: output, layer: 2, path: output2}
  ]

Intrigued ? Here is more..

Check out our documents about:

  • details about configuring the states file input
  • adding annotation files for result heatmaps
  • training a model with torch
  • tools that make your life easier

Credits

LSTMVis is a collaborative project of Hendrik Strobelt, Sebastian Gehrmann, Bernd Huber, Hanspeter Pfister, and Alexander M. Rush at Harvard SEAS.

About

Visualization Toolbox for Long Short Term Memory networks (LSTMs)

Resources

Readme
BSD-3-Clause license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.