class_docstr: Ensemble class that uses bagging for ensembling intent-slot models.
  
  Args:
      config (Config): Configuration object specifying all the
          parameters of BaggingIntentSlotEnsemble.
      models (List[Model]): List of intent-slot model objects.
  
  Attributes:
      use_crf (bool): Whether to use CRF for word tagging task.
      output_layer (IntentSlotOutputLayer): Output layer of intent-slot
          model responsible for computing loss and predictions.
code: def load_state_dict(
      self,
      state_dict: Dict[str, torch.Tensor],
      strict: bool = True,
  ):
      super().load_state_dict(state_dict=state_dict, strict=strict)
      for i, m in enumerate(self.models):
          submodel_state_dict = {}
          for key, val in state_dict.items():
              split_key = key.split(".")
              if split_key[0] == "models" and int(split_key[1]) == i:
                  submodel_state_dict[".".join(split_key[2:])] = val
  
          m.load_state_dict(
              state_dict=submodel_state_dict, strict=strict
          )
  
file_path: pytext/pytext/models/ensembles/bagging_intent_slot_ensemble.py
imports: from typing import Dict, List, Tuple
  import torch
  from pytext.models.joint_model import IntentSlotModel
  from pytext.models.model import Model
  from pytext.models.output_layers import CRFOutputLayer
  from pytext.utils.usage import log_class_usage
  from .ensemble import EnsembleModel
label_desc: Use image node_id 5 for calling the BaggingIntentSlotEnsembleModel obj's underlying member method code with example usage: obj.load_state_dict(state_dict, strict) without return types