docstr: Forward method that defines how the output of the adapter should be merged with the input, or if it
  should be merged at all.
  
  Also provides the module that called this strategy - thereby allowing access to all other
  adapters in the calling module. This can be useful if one adapter is a meta adapter, that
  combines the outputs of various adapters. In such a case, the input can be forwarded across
  all other adapters, collecting their outputs, and those outputs can then be merged via some
  strategy. For example, refer to :
  
  - [AdapterFusion: Non-Destructive Task Composition for Transfer Learning](https://arxiv.org/abs/2005.00247)
  - [Exploiting Adapters for Cross-lingual Low-resource Speech Recognition](https://arxiv.org/abs/2105.11905)
  
  Args:
      input: Original output tensor of the module, or the output of the previous adapter (if more than
          one adapters are enabled).
      adapter: The adapter module that is currently required to perform the forward pass.
      module: The calling module, in its entirety. It is a module that implements `AdapterModuleMixin`,
          therefore the strategy can access all other adapters in this module via `module.adapter_layer`.
  
  Returns:
      The result tensor, after one of the active adapters has finished its forward passes.
docstr_tok: ["Forward","method","that","defines","how","the","output","of","the","adapter","should","be","merged","with","the","input",",","or","if","it","should","be","merged","at","all",".","Also","provides","the","module","that","called","this","strategy","-","thereby","allowing","access","to","all","other","adapters","in","the","calling","module",".","This","can","be","useful","if","one","adapter","is","a","meta","adapter",",","that","combines","the","outputs","of","various","adapters",".","In","such","a","case",",","the","input","can","be","forwarded","across","all","other","adapters",",","collecting","their","outputs",",","and","those","outputs","can","then","be","merged","via","some","strategy",".","For","example",",","refer","to",":","-","[","AdapterFusion",":","Non-Destructive","Task","Composition","for","Transfer","Learning","]","(","https",":","\/\/arxiv.org\/abs\/2005.00247",")","-","[","Exploiting","Adapters","for","Cross-lingual","Low-resource","Speech","Recognition","]","(","https",":","\/\/arxiv.org\/abs\/2105.11905",")","Args",":","input",":","Original","output","tensor","of","the","module",",","or","the","output","of","the","previous","adapter","(","if","more","than","one","adapters","are","enabled",")",".","adapter",":","The","adapter","module","that","is","currently","required","to","perform","the","forward","pass",".","module",":","The","calling","module",",","in","its","entirety",".","It","is","a","module","that","implements","`","AdapterModuleMixin","`",",","therefore","the","strategy","can","access","all","other","adapters","in","this","module","via","`","module.adapter_layer","`",".","Returns",":","The","result","tensor",",","after","one","of","the","active","adapters","has","finished","its","forward","passes","."]
code: def forward(
      self,
      input: torch.Tensor,
      adapter: torch.nn.Module,
      *,
      module: "AdapterModuleMixin",
  ):
      """
      Forward method that defines how the output of the adapter should be merged with the input, or if it
      should be merged at all.
  
      Also provides the module that called this strategy - thereby allowing access to all other
      adapters in the calling module. This can be useful if one adapter is a meta adapter, that
      combines the outputs of various adapters. In such a case, the input can be forwarded across
      all other adapters, collecting their outputs, and those outputs can then be merged via some
      strategy. For example, refer to :
  
      - [AdapterFusion: Non-Destructive Task Composition for Transfer Learning](https://arxiv.org/abs/2005.00247)
      - [Exploiting Adapters for Cross-lingual Low-resource Speech Recognition](https://arxiv.org/abs/2105.11905)
  
      Args:
          input: Original output tensor of the module, or the output of the previous adapter (if more than
              one adapters are enabled).
          adapter: The adapter module that is currently required to perform the forward pass.
          module: The calling module, in its entirety. It is a module that implements `AdapterModuleMixin`,
              therefore the strategy can access all other adapters in this module via `module.adapter_layer`.
  
      Returns:
          The result tensor, after one of the active adapters has finished its forward passes.
      """
      raise NotImplementedError()
  
imports: from abc import ABC
  from dataclasses import dataclass
  from typing import Any, Dict, List, Tuple, Union
  import torch
  from nemo.core.classes.mixins import AccessMixin
label_desc: Use image node_id 1 for calling the AbstractAdapterStrategy obj's underlying member method code with example usage: obj.forward(input, adapter) without return types