class_docstr: NMTModel Class
  Currently TransformerLMDecoder is the only LM decoder implemented
  
  Args:
      decoder (onmt.decoders.TransformerLMDecoder): a transformer decoder
class_docstr_tok: ["NMTModel","Class","Currently","TransformerLMDecoder","is","the","only","LM","decoder","implemented","Args",":","decoder","(","onmt.decoders.TransformerLMDecoder",")",":","a","transformer","decoder"]
code: def __init__(self, encoder=None, decoder=None):
      super(LanguageModel, self).__init__(encoder, decoder)
      if encoder is not None:
          raise ValueError(
              "LanguageModel should not be used" "with an encoder"
          )
      self.decoder = decoder
  
imports: import torch
  import torch.nn
  from glob import glob
label_desc: Use image node_id 1 to create a new LanguageModel object from inherited base classes: BaseModel with example: obj = LanguageModel(encoder, decoder)