class_docstr: See :func:`stochastic_depth`.
code: def __init__(self, p: float, mode: str) -> None:
      super().__init__()
      _log_api_usage_once(self)
      self.p = p
      self.mode = mode
  
file_path: vision/torchvision/ops/stochastic_depth.py
imports: import torch
  import torch.fx
  from torch import nn, Tensor
  from ..utils import _log_api_usage_once
label_desc: Use image node_id 1 to create a new StochasticDepth object from inherited base classes: nn with example: obj = StochasticDepth(p, mode)