BiLSTM.Config¶
Component: BiLSTM
-
class
BiLSTM.
Config
[source] Bases:
RepresentationBase.Config
,ConfigBase
Configuration class for BiLSTM.
-
dropout
¶ Dropout probability to use. Defaults to 0.4.
Type: float
-
lstm_dim
¶ Number of features in the hidden state of the LSTM. Defaults to 32.
Type: int
-
num_layers
¶ 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.
Type: int
-
bidirectional
¶ If True, becomes a bidirectional LSTM. Defaults to True.
Type: bool
-
disable_sort_in_jit
¶ If True, disable sort in pack_padded_sequence to allow inference on GPU. Defaults to False.
Type: bool
-
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
- pack_sequence: bool =
True
- disable_sort_in_jit: bool =
False
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,
"pack_sequence": true,
"disable_sort_in_jit": false
}