class_docstr: Base class for ensemble models.
  
  Args:
      config (Config): Configuration object specifying all the parameters of
          Ensemble.
      models (List[Model]): List of sub-model objects.
  
  Attributes:
      output_layer (OutputLayerBase): Responsible for computing loss and predictions.
      models (nn.ModuleList]): ModuleList container for sub-model objects.
docstr: Factory method to construct an instance of Ensemble or one its derived
  classes from the module's config object and tensorizers
  It creates sub-models in the ensemble using the sub-model's configuration.
  
  Args:
      config (Config): Configuration object specifying all the
          parameters of Ensemble.
      tensorizers (Dict[str, Tensorizer]): Tensorizer specifying all the
          parameters of the input features to the model.
  
  Returns:
      type: An instance of Ensemble.
docstr_tok: ["Factory","method","to","construct","an","instance","of","Ensemble","or","one","its","derived","classes","from","the","module","'s","config","object","and","tensorizers","It","creates","sub-models","in","the","ensemble","using","the","sub-model","'s","configuration",".","Args",":","config","(","Config",")",":","Configuration","object","specifying","all","the","parameters","of","Ensemble",".","tensorizers","(","Dict","[","str",",","Tensorizer","]",")",":","Tensorizer","specifying","all","the","parameters","of","the","input","features","to","the","model",".","Returns",":","type",":","An","instance","of","Ensemble","."]
code: def from_config(
      cls,
      config: Config,
      tensorizers: Dict[str, Tensorizer],
      *args,
      **kwargs,
  ):
      """Factory method to construct an instance of Ensemble or one its derived
      classes from the module's config object and tensorizers
      It creates sub-models in the ensemble using the sub-model's configuration.
  
      Args:
          config (Config): Configuration object specifying all the
              parameters of Ensemble.
          tensorizers (Dict[str, Tensorizer]): Tensorizer specifying all the
              parameters of the input features to the model.
  
      Returns:
          type: An instance of Ensemble.
  
      """
      sub_models = []
      for sub_model_config in config.models:
          sub_model_config.init_from_saved_state = (
              config.init_from_saved_state
          )
          sub_models.append(
              create_model(
                  sub_model_config, tensorizers, *args, **kwargs
              )
          )
  
      return cls(config, sub_models, *args, **kwargs)
  
imports: from copy import deepcopy
  from typing import Any, Dict, List
  import torch.nn
  from pytext.config import ConfigBase
  from pytext.config.component import create_model
  from pytext.data.tensorizers import Tensorizer
  from pytext.exporters import ModelExporter
  from pytext.models.model import Model
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 1 for calling the EnsembleModel obj's underlying member method code with example usage: obj.from_config(cls, config, tensorizers) and returns: cls