class_docstr: Ensemble class that uses bagging for ensembling document classification
  models.
docstr: Call `forward()` method of each document classification sub-model by
  passing all arguments and named arguments to the sub-models, collect the
  logits from them and average their values.
  
  Returns:
      torch.Tensor: Logits from the ensemble.
docstr_tok: ["Call","`","forward","(",")","`","method","of","each","document","classification","sub-model","by","passing","all","arguments","and","named","arguments","to","the","sub-models",",","collect","the","logits","from","them","and","average","their","values",".","Returns",":","torch.Tensor",":","Logits","from","the","ensemble","."]
code: def forward(self, *args, **kwargs) -> torch.Tensor:
      """Call `forward()` method of each document classification sub-model by
      passing all arguments and named arguments to the sub-models, collect the
      logits from them and average their values.
  
      Returns:
          torch.Tensor: Logits from the ensemble.
  
      """
      logit_d_list = torch.cat(
          tuple(
              model.forward(*args, **kwargs).unsqueeze(2)
              for model in self.models
          ),
          dim=2,
      )
  
      return torch.mean(logit_d_list, dim=2)
  
imports: from typing import List
  import torch
  from pytext.models.doc_model import DocModel
  from .ensemble import EnsembleModel
label_desc: Use image node_id 1 for calling the BaggingDocEnsembleModel obj's underlying member method code with example usage: obj.forward() and returns: torch