class_docstr: Example encoder, consisting of an embedding layer and a 1-layer LSTM with the
  specified hidden size.
  
  Pay particular attention to the ``forward`` output.
class_docstr_tok: ["Example","encoder",",","consisting","of","an","embedding","layer","and","a","1-layer","LSTM","with","the","specified","hidden","size",".","Pay","particular","attention","to","the","``","forward","``","output","."]
docstr: Initialization.
  
  Arguments here can be used to provide hyperparameters.
docstr_tok: ["Initialization",".","Arguments","here","can","be","used","to","provide","hyperparameters","."]
code: def __init__(self, embeddings, hidden_size):
      """
      Initialization.
  
      Arguments here can be used to provide hyperparameters.
      """
      # must call super on all nn.Modules.
      super().__init__()
  
      self.embeddings = embeddings
      self.lstm = nn.LSTM(
          input_size=hidden_size,
          hidden_size=hidden_size,
          num_layers=1,
          batch_first=True,
      )
  
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 Encoder object from inherited base classes: nn with example: obj = Encoder(embeddings, hidden_size)