class_docstr: An ensemble runs multiple instances of a model and selects an answer from the subresults via some
  ensembling strategy.
  
  Ensembles differ from most models in that they do not have a vocabulary or weights of their own
  (instead they rely on the vocabulary and weights from submodels).  Instead, the submodels are trained
  independently and the ensemble is created from the result.
code: def __init__(self, submodels):
      vocab = submodels[0].vocab
      for submodel in submodels:
          if submodel.vocab != vocab:
              raise ConfigurationError(
                  "Vocabularies in ensemble differ"
              )
  
      super(Ensemble, self).__init__(vocab, None)
  
      # Using ModuleList propagates calls to .eval() so dropout is disabled on the submodels in evaluation
      # and prediction.
      self.submodels = torch.nn.ModuleList(submodels)
  
file_path: magnitude/pymagnitude/third_party/allennlp/models/ensemble.py
imports: from __future__ import absolute_import
  import torch
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.params import Params
  from allennlp.models.model import Model
  from allennlp.models.model import remove_pretrained_embedding_params
label_desc: Use image node_id 1 to create a new Ensemble object from inherited base classes: Model with example: obj = Ensemble(submodels)