LongShortTermMemoryLayer - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


DeepLearning

  

LongShortTermMemoryLayer

  

create LSTM layer

 

Calling Sequence

Parameters

Options

Description

Details

Examples

Compatibility

Calling Sequence

LongShortTermMemoryLayer(units,opts)

LSTMLayer(units,opts)

Parameters

units

-

positive integer

opts

-

(optional) one or more keyword options described below

Options

• 

inputshape : list of integers or the symbol auto

  

Shape of the input Tensor, not including the batch axis.

  

With the default value auto, the shape is inferred. If inference is not possible, an error is issued.

  

This option need only be specified when this layer is the first in a Sequential model.

Description

• 

LongShortTermMemoryLayer(units,opts) creates a long short-term memory (LSTM) layer for the units specified in units.

• 

LSTMLayer(units,opts) is equivalent to LongShortTermMemoryLayer(units,opts).

• 

This function is part of the DeepLearning package, so it can be used in the short form LongShortTermMemoryLayer(..) only after executing the command with(DeepLearning). However, it can always be accessed through the long form of the command by using DeepLearning[LongShortTermMemoryLayer](..).

Details

• 

The implementation of LongShortTermMemoryLayer uses tf.keras.layers.LSTM from the TensorFlow Python API. Consult the TensorFlow Python API documentation for tf.keras.layers.LSTM for more information.

Examples

withDeepLearning

AddMultiple,ApplyOperation,BatchNormalizationLayer,BidirectionalLayer,BucketizedColumn,CategoricalColumn,Classify,Concatenate,Constant,ConvolutionLayer,DNNClassifier,DNNLinearCombinedClassifier,DNNLinearCombinedRegressor,DNNRegressor,Dataset,DenseLayer,DropoutLayer,EinsteinSummation,EmbeddingLayer,Estimator,FeatureColumn,Fill,FlattenLayer,GRULayer,GatedRecurrentUnitLayer,GetDefaultGraph,GetDefaultSession,GetEagerExecution,GetVariable,GradientTape,IdentityMatrix,LSTMLayer,Layer,LinearClassifier,LinearRegressor,LongShortTermMemoryLayer,MaxPoolingLayer,Model,NumericColumn,OneHot,Ones,Operation,Optimizer,Placeholder,RandomTensor,ResetDefaultGraph,Restore,Save,Sequential,Session,SetEagerExecution,SetRandomSeed,SoftMaxLayer,SoftmaxLayer,Tensor,Variable,Variables,VariablesInitializer,Zeros

(1)

modelSequentialEmbeddingLayer1000,64,LSTMLayer128,DenseLayer10

modelDeepLearning Model<keras.src.engine.sequential.Sequential object at 0x7f27df825490>

(2)

model:-Compile

Compatibility

• 

The DeepLearning[LongShortTermMemoryLayer] command was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

See Also

DeepLearning Overview