lisbet.modeling.backbones.lstm#
LSTM Backbone for LISBET.
Classes
|
LSTM backbone for sequence modeling. |
- class lisbet.modeling.backbones.lstm.LSTMBackbone(feature_dim, embedding_dim, hidden_dim, num_layers)[source]#
LSTM backbone for sequence modeling.
- Parameters:
feature_dim (
int) – Dimension of the input features.embedding_dim (
int) – Dimension of the output embeddings.hidden_dim (
int) – Dimension of the LSTM hidden state.num_layers (
int) – Number of LSTM layers.
- __init__(feature_dim, embedding_dim, hidden_dim, num_layers)[source]#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(x)[source]#
Forward pass through the LSTM backbone.
- Parameters:
x (
Tensor) – Input tensor of shape (batch_size, sequence_length, feature_dim).- Returns:
Output tensor of shape (batch_size, sequence_length, embedding_dim).
- Return type:
Tensor
- get_config()[source]#
Get the configuration dictionary for this backbone.
- Return type:
dict[str,Any]