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 - guoyanb/Nested-LSTM: Keras implementation of Nested LSTMs

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
images
images
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
imdb_nested_lstm.py
imdb_nested_lstm.py
 
 
nested_lstm.py
nested_lstm.py
 
 

Repository files navigation

Nested LSTM

Keras implementation of Nested LSTMs from the paper Nested LSTMs

From the paper:

Nested LSTMs add depth to LSTMs via nesting as opposed to stacking. The value of a memory cell in an NLSTM is computed by an LSTM cell, which has its own inner memory cell. Nested LSTMs outperform both stacked and single-layer LSTMs with similar numbers of parameters in our experiments on various character-level language modeling tasks, and the inner memories of an LSTM learn longer term dependencies compared with the higher-level units of a stacked LSTM

Usage

Via Cells

from nested_lstm import NestedLSTMCell
from keras.layers import RNN

ip = Input(shape=(nb_timesteps, input_dim))
x = RNN(NestedLSTMCell(units=64, depth=2))(ip)
...

Via Layer

from nested_lstm import NestedLSTM

ip = Input(shape=(nb_timesteps, input_dim))
x = NestedLSTM(units=64, depth=2)(ip)
...

Difference between Stacked LSTMs and Nested LSTMs (from the paper)

Cell diagram (depth = 2, from the paper)

Acknowledgements

Keras code heavily derived from the Tensorflow implementation - https://github.com/hannw/nlstm

Requirements

  • Keras 2.1.3+
  • Tensorflow 1.2+ or Theano. CNTK untested.

About

Keras implementation of Nested LSTMs

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

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