docstr: :param models:
  :param reduction: Reduction key ('mean', 'sum', 'gmean', 'hmean' or None)
  :param outputs: Name of model outputs to average and return from Ensembler.
      If None, all outputs from the first model will be used.
docstr_tok: [":","param","models",":",":","param","reduction",":","Reduction","key","(","'mean","'",",","'sum","'",",","'gmean","'",",","'hmean","'","or","None",")",":","param","outputs",":","Name","of","model","outputs","to","average","and","return","from","Ensembler",".","If","None",",","all","outputs","from","the","first","model","will","be","used","."]
code: def __init__(
      self,
      models: List[nn.Module],
      reduction: str = "mean",
      outputs: Optional[Iterable[str]] = None,
  ):
      """
  
      :param models:
      :param reduction: Reduction key ('mean', 'sum', 'gmean', 'hmean' or None)
      :param outputs: Name of model outputs to average and return from Ensembler.
          If None, all outputs from the first model will be used.
      """
      super().__init__()
      self.return_some_outputs = outputs is not None
      self.outputs = tuple(outputs) if outputs else tuple()
      self.models = nn.ModuleList(models)
      self.reduction = reduction
  
imports: import torch
  from torch import nn, Tensor
  from typing import List, Union, Iterable, Optional, Dict, Tuple
  from pytorch_toolbelt.inference.tta import _deaugment_averaging
label_desc: Use image node_id 1 to create a new Ensembler object from inherited base classes: nn with example: obj = Ensembler(models, reduction, outputs)