class_docstr: Drop paths (Stochastic Depth) per sample
  (when applied in main path of residual blocks).
class_docstr_tok: ["Drop","paths","(","Stochastic","Depth",")","per","sample","(","when","applied","in","main","path","of","residual","blocks",")","."]
code: def forward(self, hidden_state):
      if self.drop_prob == 0.0 or not self.training:
          return hidden_state
      keep_prob = 1 - self.drop_prob
      # work with diff dim tensors, not just 2D ConvNets
      # hidden_state: [s, b, h]
      shape = (
          (1,)
          + (hidden_state.shape[1],)
          + (1,) * (hidden_state.ndim - 2)
      )
      random_tensor = keep_prob + torch.rand(
          shape, dtype=hidden_state.dtype, device=hidden_state.device
      )
      random_tensor.floor_()  # binarize
      output = hidden_state.div(keep_prob) * random_tensor
      return output
  
file_path: NeMo/nemo/collections/vision/modules/common/megatron/vision_transformer.py
imports: import torch
  from nemo.collections.nlp.modules.common.megatron.layer_type import LayerType
  from nemo.collections.nlp.modules.common.megatron.module import MegatronModule
  from nemo.collections.nlp.modules.common.megatron.transformer import ParallelTransformer, ParallelTransformerLayer_
  from nemo.collections.nlp.modules.common.megatron.utils import ApexGuardDefaults
label_desc: Use image node_id 2 for calling the DropPath obj's underlying member method code with example usage: obj.forward(hidden_state) and returns: output, hidden_state