LMLSTM.Config

Component: LMLSTM

class LMLSTM.Config[source]

Bases: ConfigBase

Configuration class for LMLSTM.

representation

BiLSTM.Config – Config for the BiLSTM representation.

decoder

MLPDecoder.Config – Config for the MLP Decoder.

output_layer

LMOutputLayer.Config – Config for the language model output layer.

tied_weights

bool – If True use a common weights matrix between the word embeddings and the decoder. Defaults to False.

stateful

bool – If True, do not reset hidden state of LSTM across batches.

All Attributes (including base classes)

representation: BiLSTM.Config = BiLSTM.Config(bidirectional=False)
decoder: MLPDecoder.Config = MLPDecoder.Config()
output_layer: LMOutputLayer.Config = LMOutputLayer.Config()
tied_weights: bool = False
stateful: bool = False

Default JSON

{
    "representation": {
        "load_path": null,
        "save_path": null,
        "freeze": false,
        "shared_module_key": null,
        "dropout": 0.4,
        "lstm_dim": 32,
        "num_layers": 1,
        "bidirectional": false
    },
    "decoder": {
        "load_path": null,
        "save_path": null,
        "freeze": false,
        "shared_module_key": null,
        "hidden_dims": []
    },
    "output_layer": {
        "load_path": null,
        "save_path": null,
        "freeze": false,
        "shared_module_key": null,
        "loss": {}
    },
    "tied_weights": false,
    "stateful": false
}