/tensorflow-multi-dimensional-lstm

Multi dimensional LSTM as described in Alex Graves' Paper https://arxiv.org/pdf/0705.2011.pdf

Primary LanguageJupyter NotebookApache License 2.0Apache-2.0

Multi Dimensional Recurrent Networks

Tensorflow Implementation of the model described in Alex Graves' paper https://arxiv.org/pdf/0705.2011.pdf

  • Fully compatible with Tensorflow 1.x support.
  • True multi dimensional ability (not LSTM on M time series, but more on a grid of dimension M).
  • Only 2D is supported now.


Example: 2D LSTM Architecture

What is MD LSTM?

Recurrent neural networks (RNNs) have proved effective at one dimensional sequence learning tasks, such as speech and online handwriting recognition. Some of the properties that make RNNs suitable for such tasks, for example robustness to input warping, and the ability to access contextual information, are also desirable in multidimensional domains. However, there has so far been no direct way of applying RNNs to data with more than one spatio-temporal dimension. This paper introduces multi-dimensional recurrent neural networks (MDRNNs), thereby extending the potential applicability of RNNs to vision, video processing, medical imaging and many other areas, while avoiding the scaling problems that have plagued other multi-dimensional models. Experimental results are provided for two image segmentation tasks.

-- Alex Graves, Santiago Fernandez, Jurgen Schmidhuber


Example: 2D LSTM Architecture

How to get started?

git clone git@github.com:philipperemy/tensorflow-multi-dimensional-lstm.git
cd tensorflow-multi-dimensional-lstm

# create a new virtual python environment
deactivate
virtualenv -p python3 venv
source venv/bin/activate

pip3 install -r requirements.txt

# start the training with MD-LSTM. 0 is for LSTM, 1 is for MD-LSTM.
python3 main.py 1

Special Thanks

  • A big thank you to Mosnoi Ion who provided the first skeleton of this MD LSTM.