flambe.nlp.language_modeling.model
¶
Module Contents¶
-
class
flambe.nlp.language_modeling.model.
LanguageModel
(embedder: Embedder, output_layer: Module, dropout: float = 0, pad_index: int = 0, tie_weights: bool = False, tie_weight_attr: str = 'embedding')[source]¶ Bases:
flambe.nn.Module
Implement an LanguageModel model for sequential classification.
This model can be used to language modeling, as well as other sequential classification tasks. The full sequence predictions are produced by the model, effectively making the number of examples the batch size multiplied by the sequence length.