class_docstr: Base class to apply hidden state transformations
class_docstr_tok: ["Base","class","to","apply","hidden","state","transformations"]
docstr: Apply a transformations on the inputs (hiddens is always assumed)
docstr_tok: ["Apply","a","transformations","on","the","inputs","(","hiddens","is","always","assumed",")"]
code: def transform(self, inputs, batch_data=None):
      """Apply a transformations on the inputs (hiddens is always assumed)"""
      # validate inputs
      self._validate_inputs(inputs)
  
      outputs = self._transform(inputs, batch_data=batch_data)
  
      return outputs
  
file_path: NeMo/nemo/collections/nlp/modules/common/megatron/hiddens/megatron_hidden_transform.py
imports: import math
  import torch
  from nemo.collections.nlp.modules.common.megatron.utils import ApexGuardDefaults, init_method_normal
label_desc: Use image node_id 7 for calling the MegatronBaseHiddenTransform obj's underlying member method code with example usage: obj.transform(inputs, batch_data) and returns: outputs