WLJS LogoWLJS Notebook

LongShortTermMemoryLayer

LongShortTermMemoryLayer[n] represents a trainable recurrent layer that takes a sequence of vectors and produces a sequence of vectors, each of size n.

  • LongShortTermMemoryLayer[n, opts] includes options for weights and other parameters.

Examples

Create an LSTM layer with output size 5:

LongShortTermMemoryLayer[5]

Build a sequence classification network:

net = NetChain[{LongShortTermMemoryLayer[32], SequenceLastLayer[], LinearLayer[10], SoftmaxLayer[]}]

Please visit the official Wolfram Language Reference for more details.

On this page