LSTM Cell

Description

Define the cell lstm layer according to its parameters. To be used for the RNN layer. Type : polymorphic.

 

Input parameters

 

Β Parameters :Β layer parameters.

Β units :Β integer, dimensionality of the output space.
Β ActivationΒ :Β cluster,Β applied to the candidate cell input. This function transforms the new information considered for updating the cell state.
Β Output ActivationΒ :Β cluster,Β applied to the updated cell state before producing the visible hidden output of the LSTM at each time step.

Β Recurrent ActivationΒ :Β cluster,Β applied to the input, forget, and output gates. It controls which parts of the past information are allowed to pass or be blocked.
Β use bias? :Β boolean, whether the layer uses a bias vector.
Default value β€œTrue”.
Β Input Weight InitializerΒ :Β cluster,Β initializer for theΒ kernelΒ weights matrix, used for the linear transformation of the inputs.
Β Hidden Weight InitializerΒ :Β cluster,Β initializer for theΒ recurrent_kernelΒ weights matrix, used for the linear transformation of the recurrent state.
Β Bias InitializerΒ :Β cluster,Β initializer for the bias vector.
Β unit forget bias? :Β boolean, if True, add 1 to the bias of the forget gate at initialization.
Default value β€œTrue”.
Β dropoutΒ :Β float, fraction of the units to drop for the linear transformation of the inputs.
Default value β€œ0.0”.
Β recurrent dropout :Β float, fraction of the units to drop for the linear transformation of the recurrent state.
Default value β€œ0.0”.
Β Input Weight RegularizerΒ :Β cluster,Β regularizer function applied to theΒ kernelΒ weights matrix.
Β Hidden Weight RegularizerΒ :Β cluster,Β regularizer function applied to theΒ recurrent_kernelΒ weights matrix.
Β Bias RegularizerΒ :Β cluster,Β regularizer function applied to the bias vector.
Β training?Β :Β boolean, whether the layer is in training mode (can store data for backward).
Default value β€œTrue”.
Β store?Β :Β boolean, whether the layer stores the last iteration gradient (accessible via the β€œget_gradients” function).
Default value β€œFalse”.
Β update?Β :Β boolean, whether the layer’s variables should be updated during backward. Equivalent to freeze the layer.
Default value β€œTrue”.

Output parameters

 

CellΒ : cluster, this cluster defines the recurrent cell type used in a recurrent layer.

enum :Β enum, an enumeration indicating the cell type (e.g., SimpleRNN, LSTM, GRU, etc.). If enum is set to CustomCell, the class on the right will be used. Otherwise, the selected cell type will be instantiated with default parameters.
Β Class :Β object, a custom RNN cell class instance.

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).

LSTM cell inside RNN layer

Tags:
Table of Contents