class_docstr: A trivial non-recurrent encoder. Simply applies mean pooling.
  
  Args:
     num_layers (int): number of replicated layers
     embeddings (onmt.modules.Embeddings): embedding module to use
docstr: Alternate constructor.
docstr_tok: ["Alternate","constructor","."]
code: def from_opt(cls, opt, embeddings):
      """Alternate constructor."""
      return cls(opt.enc_layers, embeddings)
  
file_path: OpenNMT-py/onmt/encoders/mean_encoder.py
imports: from onmt.encoders.encoder import EncoderBase
  from onmt.utils.misc import sequence_mask
  import torch
label_desc: Use image node_id 2 for calling the MeanEncoder obj's underlying member method code with example usage: obj.from_opt(cls, opt, embeddings) and returns: cls