class_docstr: ExampleModel implements the abstract methods of TorchGeneratorModel to define how to
  re-order encoder states and decoder incremental states.
  
  It also instantiates the embedding table, encoder, and decoder, and defines the
  final output layer.
class_docstr_tok: ["ExampleModel","implements","the","abstract","methods","of","TorchGeneratorModel","to","define","how","to","re-order","encoder","states","and","decoder","incremental","states",".","It","also","instantiates","the","embedding","table",",","encoder",",","and","decoder",",","and","defines","the","final","output","layer","."]
code: def __init__(self, dictionary, hidden_size=1024):
      super().__init__(
          padding_idx=dictionary[dictionary.null_token],
          start_idx=dictionary[dictionary.start_token],
          end_idx=dictionary[dictionary.end_token],
          unknown_idx=dictionary[dictionary.unk_token],
      )
      self.embeddings = nn.Embedding(len(dictionary), hidden_size)
      self.encoder = Encoder(self.embeddings, hidden_size)
      self.decoder = Decoder(self.embeddings, hidden_size)
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  import torch.nn
  import torch.nn.functional
  import parlai.core.torch_generator_agent
label_desc: Use image node_id 1 to create a new ExampleModel object from inherited base classes: tga with example: obj = ExampleModel(dictionary, hidden_size)