Welcome to our Support Center

LSTM

Description

Returns the LSTM layer weights. Type : polymorphic.

 

Input parameters

 

 weights : cluster

 index : integer, index of layer.
 name : string, name of layer.
 weight : variant, weight of layer.

Output parameters

 

 weights_info : cluster

 index : integer, index of layer.
 name : string, name of layer.
 weights : cluster

 input_weights : array, 2D values. input_weights = [features, 4*units].
 hidden_weights : array, 2D values. hidden_weights = [units, 4*units].
biases : array, 1D values. biases = [4*units].

Dimension

  • input_weights = [features, 4*units]

The size depends on the LSTM layer input and the units parameter.
For example, if the input has a size of [batch = 10, timesteps = 8, features = 5] and units a value of 3 then input_weights will have a size of [features = 5, 4*units = 3].
Another example, if the input has a size of [batch = 15, timesteps = 8, features = 6] and units a value of 2 then input_weights will have a size of [features = 6, 4*units = 2].

 

  • hidden_weights = [units, 4*units].

The size depends on the units parameter of the LSTM layer.
For example, if units has a value of 6 then hidden_weights will have a size of [units = 6, 4*units = 6].
Another example, if units has a value of 3 then hidden_weights will have a size of [units = 3, 4*units = 3].

 

  • biases = [4*units]

The size depends on the units parameter of the LSTM layer.
For example, if units has a value of 6, then biases will have a size of [4*units = 6].
Another example, if units has a value of 3, then biases will have a size of [4*units = 3].

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 HAIBAL library to run it).

Table of Contents