class_docstr: Base class for all adaptation methods that require per-layer modules.
  
  Make sure the 'adapter_modules_name' attribute is overriden in derived classes.
class_docstr_tok: ["Base","class","for","all","adaptation","methods","that","require","per-layer","modules",".","Make","sure","the","'adapter_modules_name","'","attribute","is","overriden","in","derived","classes","."]
docstr: Averages a set of adapter modules into a new adapter module.
  
  Args:
      adapter_name (str): The name of the new (averaged) adapter module to add.
      input_adapters (Dict[str, float]): Either:
          - a list of adapter names (with equal weighting).
          - a dictionary of adapter names and their corresponding weights.
  
  Returns:
      bool: True if the adapter was added, False otherwise.
docstr_tok: ["Averages","a","set","of","adapter","modules","into","a","new","adapter","module",".","Args",":","adapter_name","(","str",")",":","The","name","of","the","new","(","averaged",")","adapter","module","to","add",".","input_adapters","(","Dict","[","str",",","float","]",")",":","Either",":","-","a","list","of","adapter","names","(","with","equal","weighting",")",".","-","a","dictionary","of","adapter","names","and","their","corresponding","weights",".","Returns",":","bool",":","True","if","the","adapter","was","added",",","False","otherwise","."]
code: def average_adapter(
      self, adapter_name: str, input_adapters: Dict[str, float]
  ) -> bool:
      """Averages a set of adapter modules into a new adapter module.
  
      Args:
          adapter_name (str): The name of the new (averaged) adapter module to add.
          input_adapters (Dict[str, float]): Either:
              - a list of adapter names (with equal weighting).
              - a dictionary of adapter names and their corresponding weights.
  
      Returns:
          bool: True if the adapter was added, False otherwise.
      """
      raise NotImplementedError()
  
imports: from abc import ABCMeta, abstractmethod
  from typing import Collection, Dict, List, NamedTuple, Union
  import numpy
  import torch
  from torch import nn
  from ..composition import ALLOWED_NESTINGS, AdapterCompositionBlock, Average, BatchSplit, Fuse, Parallel, Split, Stack
  from ..context import AdapterSetup, ForwardContext
label_desc: Use image node_id 8 for calling the AdapterLayerBase obj's underlying member method code with example usage: obj.average_adapter(adapter_name, input_adapters) without return types