pytagi.nn.lstm#

Classes#

LSTM

A temporal LSTM layer that processes sequences with an explicit

Module Contents#

class pytagi.nn.lstm.LSTM(input_size: int, output_size: int, last_timestep: bool = False, seq_len: int = 1, bias: bool = True, gain_weight: float = 1.0, gain_bias: float = 1.0, init_method: str = 'He')[source]#

Bases: pytagi.nn.base_layer.BaseLayer

A temporal LSTM layer that processes sequences with an explicit time loop, correctly propagating hidden states between timesteps.

Initializes the BaseLayer with a C++ backend instance.

get_layer_info() str[source]#

Retrieves detailed information about the layer.

Returns:

A string containing the layer’s information.

Return type:

str

get_layer_name() str[source]#

Retrieves the name of the layer.

Returns:

The name of the layer.

Return type:

str

init_weight_bias()[source]#