BiLSTMDocAttention.Config

Component: BiLSTMDocAttention

class BiLSTMDocAttention.Config[source]

Bases: RepresentationBase.Config

Configuration class for BiLSTM.

dropout

float – Dropout probability to use. Defaults to 0.4.

lstm

BiLSTM.Config – Config for the BiLSTM.

pooling

ConfigBase – Config for the underlying pooling module.

mlp_decoder

MLPDecoder.Config – Config for the non-linear projection module.

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: BiLSTM.Config = BiLSTM.Config()
pooling: Union[SelfAttention.Config, MaxPool.Config, MeanPool.Config, NoPool.Config] = SelfAttention.Config()
mlp_decoder: Optional[MLPDecoder.Config] = None

Default JSON

{
    "load_path": null,
    "save_path": null,
    "freeze": false,
    "shared_module_key": null,
    "dropout": 0.4,
    "lstm": {
        "load_path": null,
        "save_path": null,
        "freeze": false,
        "shared_module_key": null,
        "dropout": 0.4,
        "lstm_dim": 32,
        "num_layers": 1,
        "bidirectional": true
    },
    "pooling": {
        "SelfAttention": {
            "attn_dimension": 64,
            "dropout": 0.4
        }
    },
    "mlp_decoder": null
}