docstr: See BertModel.add_fusion_layer
docstr_tok: ["See","BertModel.add_fusion_layer"]
code: def add_fusion_layer(self, adapter_names: Union[List, str]):
      """See BertModel.add_fusion_layer"""
      adapter_names = (
          adapter_names
          if isinstance(adapter_names, list)
          else adapter_names.split(",")
      )
      if self.adapters_config.common_config_value(
          adapter_names, self.location_key
      ):
          fusion_config = self.adapters_config.get_fusion(adapter_names)
          dropout_prob = fusion_config.dropout_prob or getattr(
              self.model_config, "attention_probs_dropout_prob", 0
          )
          fusion = BertFusion(
              fusion_config,
              self.model_config.hidden_size,
              dropout_prob,
          )
          fusion.train(
              self.training
          )  # make sure training mode is consistent
          self.adapter_fusion_layer[",".join(adapter_names)] = fusion
  
imports: from typing import Dict, List, Mapping, NamedTuple, Optional, Union
  import torch
  from torch import nn
  from ..composition import AdapterCompositionBlock, Average, BatchSplit, Fuse, Parallel, Split, Stack, adjust_tensors_for_parallel
  from ..configuration import BnConfig
  from ..context import ForwardContext
  from .adapter_layer_base import ComposableAdapterLayerBase
  from .modeling import Adapter, BertFusion, ParallelAdapter
label_desc: Use image node_id 6 for calling the BottleneckLayer obj's underlying member method code with example usage: obj.add_fusion_layer(adapter_names) without return types