Giter Site home page Giter Site logo

tensor_train_rnn's Introduction

Tensor Train Recurrent Neural Network

Build Status Coverage Status Dependency Status

Clean code repo for tensor train recurrent neural network, implemented in Tensorflow. See details in our paper Long-Term Forecasting with Tensor Train RNNs

Getting Started

install prerequisites

  • tensorflow >= r1.6
  • Python >=3.0
  • Jupyter >=4.1.1

import module

from trnn import TensorLSTMCell
from trnn_imply import tensor_rnn_with_feed_prev

Classes

  • TensorLSTMCell(num_units, num_lags, rank_vals) โ€“ creates a TensorTrainLSTM object with num_units hidden nodes, num_lags time lags, with rank_vals is the list of values for tensor train decomposition rank

Methods

  • tensor_rnn_with_feed_prev โ€“ forward pass for a single TensorTrainLSTM cell, returns an output and a hidden state.

Running the test

Run the Jupyter notebook

  • jupyter notebook test_trnn.pynb

A simple example of using TensorTrainLSTM by

  • loading a set of sim sequences
  • building a tensor train Seq2Seq model
  • making long-term predictions

Directory

  • reader.py read the data into train/valid/test datasets, normalize the data if needed

  • model.py seq2seq model for sequence prediction

  • trnn.py tensor-train lstm cell and corresponding tensor train contraction

  • trnn_imply.py forward step in tensor-train rnn, feed previous predictions as input

Citation

If you think the repo is useful, we kindly ask you to cite our work at

@article{yu2017long,
  title={Long-term forecasting using tensor-train RNNs},
  author={Yu, Rose and Zheng, Stephan and Anandkumar, Anima and Yue, Yisong},
  journal={arXiv preprint arXiv:1711.00073},
  year={2017}
}

tensor_train_rnn's People

Watchers

 avatar  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.