StackedBidirectionalRNN.Config

Component: StackedBidirectionalRNN

class StackedBidirectionalRNN.Config[source]

Bases: Module.Config

Configuration class for StackedBidirectionalRNN.

hidden_size

Number of features in the hidden state of the RNN. Defaults to 32.

Type:int
num_layers

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

Type:int
dropout

Dropout probability to use. Defaults to 0.4.

Type:float
bidirectional

If True, becomes a bidirectional RNN. Defaults to True.

Type:bool
rnn_type

Which RNN type to use. Options: “rnn”, “lstm”, “gru”.

Type:str
concat_layers

Whether to concatenate the outputs of each layer of stacked RNN.

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
hidden_size: int = 32
num_layers: int = 1
dropout: float = 0.0
bidirectional: bool = True
rnn_type: RnnType = <RnnType.LSTM: 'lstm'>
concat_layers: bool = True

Default JSON

{
    "load_path": null,
    "save_path": null,
    "freeze": false,
    "shared_module_key": null,
    "hidden_size": 32,
    "num_layers": 1,
    "dropout": 0.0,
    "bidirectional": true,
    "rnn_type": "lstm",
    "concat_layers": true
}