Component: BiLSTM

class BiLSTM.Config[source]

Bases: RepresentationBase.Config, ConfigBase

Configuration class for BiLSTM.


float – Dropout probability to use. Defaults to 0.4.


int – Number of features in the hidden state of the LSTM. Defaults to 32.


int – Number of recurrent layers. Eg. setting num_layers=2 would mean stacking two LSTMs together to form a stacked LSTM, with the second LSTM taking in the outputs of the first LSTM and computing the final result. Defaults to 1.


bool – If True, becomes a bidirectional LSTM. Defaults to True.

All Attributes (including base classes)

load_path: Optional[str] = None
save_path: Optional[str] = None
freeze: bool = False
shared_module_key: Optional[str] = None
dropout: float = 0.4
lstm_dim: int = 32
num_layers: int = 1
bidirectional: bool = True

Default JSON

    "load_path": null,
    "save_path": null,
    "freeze": false,
    "shared_module_key": null,
    "dropout": 0.4,
    "lstm_dim": 32,
    "num_layers": 1,
    "bidirectional": true