class_docstr: Stochastic drop paths per sample for residual blocks.
  Based on:
  https://github.com/rwightman/pytorch-image-models
docstr: Args:
      drop_prob: drop path probability.
      scale_by_keep: scaling by non-dropped probability.
docstr_tok: ["Args",":","drop_prob",":","drop","path","probability",".","scale_by_keep",":","scaling","by","non-dropped","probability","."]
code: def __init__(
      self, drop_prob: float = 0.0, scale_by_keep: bool = True
  ) -> None:
      """
      Args:
          drop_prob: drop path probability.
          scale_by_keep: scaling by non-dropped probability.
      """
      super().__init__()
      self.drop_prob = drop_prob
      self.scale_by_keep = scale_by_keep
  
      if not (0 <= drop_prob <= 1):
          raise ValueError("Drop path prob should be between 0 and 1.")
  
imports: from __future__ import annotations
  import torch.nn
label_desc: Use image node_id 1 to create a new DropPath object from inherited base classes: nn with example: obj = DropPath(drop_prob, scale_by_keep)