Welcome to our Support Center

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