class_docstr: Simple Linear Feedforward Adapter module with LayerNorm and singe hidden layer with activation function.
  Note: The adapter explicitly initializes its final layer with all zeros in order to avoid affecting the
  original model when all adapters are disabled.
  
  Args:
      in_features: Input dimension of the module. Note that for adapters, input_dim == output_dim.
      dim: Hidden dimension of the feed forward network.
      activation: Str name for an activation function.
      norm_position: Str, can be `pre` or `post`. Defaults to `pre`. Determines whether the normalization
          will occur in the first layer or the last layer. Certain architectures may prefer one over the other.
      dropout: float value, whether to perform dropout on the output of the last layer of the adapter.
      adapter_strategy: By default, ResidualAddAdapterStrategyConfig. An adapter composition function object.
class_docstr_tok: ["Simple","Linear","Feedforward","Adapter","module","with","LayerNorm","and","singe","hidden","layer","with","activation","function",".","Note",":","The","adapter","explicitly","initializes","its","final","layer","with","all","zeros","in","order","to","avoid","affecting","the","original","model","when","all","adapters","are","disabled",".","Args",":","in_features",":","Input","dimension","of","the","module",".","Note","that","for","adapters",",","input_dim","==","output_dim",".","dim",":","Hidden","dimension","of","the","feed","forward","network",".","activation",":","Str","name","for","an","activation","function",".","norm_position",":","Str",",","can","be","`","pre","`","or","`","post","`",".","Defaults","to","`","pre","`",".","Determines","whether","the","normalization","will","occur","in","the","first","layer","or","the","last","layer",".","Certain","architectures","may","prefer","one","over","the","other",".","dropout",":","float","value",",","whether","to","perform","dropout","on","the","output","of","the","last","layer","of","the","adapter",".","adapter_strategy",":","By","default",",","ResidualAddAdapterStrategyConfig",".","An","adapter","composition","function","object","."]
code: def reset_parameters(self):
      # Final layer initializations must be 0
      if self.norm_position == "pre":
          self.module[-1].weight.data *= 0
  
      elif self.norm_position == "post":
          self.module[-1].weight.data *= 0
          self.module[-1].bias.data *= 0
  
file_path: NeMo/nemo/collections/common/parts/adapter_modules.py
imports: from dataclasses import dataclass, field, is_dataclass
  from typing import Any, Optional
  from hydra.utils import instantiate
  from omegaconf import OmegaConf
  from torch import nn
  from nemo.collections.common.parts.utils import activation_registry
  from nemo.core.classes.mixins import access_mixins, adapter_mixin_strategies
label_desc: Use image node_id 2 for calling the LinearAdapter obj's underlying member method code with example usage: obj.reset_parameters() without return types