class_docstr: An implementation of residual addition of an adapter module with its input.
  Supports stochastic depth regularization.
class_docstr_tok: ["An","implementation","of","residual","addition","of","an","adapter","module","with","its","input",".","Supports","stochastic","depth","regularization","."]
docstr: A basic strategy, comprising of a residual connection over the input, after forward pass by
  the underlying adapter.
  
  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: ["A","basic","strategy",",","comprising","of","a","residual","connection","over","the","input",",","after","forward","pass","by","the","underlying","adapter",".","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",
  ):
      """
      A basic strategy, comprising of a residual connection over the input, after forward pass by
      the underlying adapter.
  
      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.
      """
      out = self.compute_output(input, adapter, module=module)
  
      # If not in training mode, or probability of stochastic depth is 0, skip step.
      p = self.stochastic_depth
      if not module.training or p == 0.0:
          pass
      else:
          out = self.apply_stochastic_depth(
              out, input, adapter, module=module
          )
  
      # Return the residual connection output = input + adapter(input)
      result = input + out
  
      # If l2_lambda is activated, register the loss value
      self.compute_auxiliary_losses(
          result, input, adapter, module=module
      )
  
      return result
  
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 2 for calling the ResidualAddAdapterStrategy obj's underlying member method code with example usage: obj.forward(input, adapter) and returns: result