class_docstr: This class implements a 'stage' as defined in the `RegNet paper <https://arxiv.org/pdf/2003.13678.pdf>`_.
  It consists of a sequence of bottleneck blocks.
  
  Args:
      opts: command-line arguments
      depth: The number of XRegNetBlocks in the stage
      width_in: The number of input channels of the first block
      width_out: The number of output channels of each block
      stride: Stride for convolution of first block
      groups: Number of groups for the intermediate convolution (bottleneck) layer in each block
      bottleneck_multiplier: The number of in/out channels of the intermediate
          conv layer of each block will be scaled by this value
      se_ratio: The numer squeeze-excitation ratio. The number of channels in the SE
          module of each block will be scaled by this value
      stage_depths: A list of the number of blocks in each stage
      stage_index: The index of the current stage being constructed
      stochastic_depth_prob: The stochastic depth probability
docstr: Forward pass through all blocks in the stage.
  
  Args:
      x: Batch of images.
  
  Returns:
      * output of passing x through all blocks in the stage.
  
  Shape:
      x: :math:`(N, C_{in}, H_{in}, W_{in})`
      Output: :math:`(N, C_{out}, H_{out}, W_{out})`
docstr_tok: ["Forward","pass","through","all","blocks","in","the","stage",".","Args",":","x",":","Batch","of","images",".","Returns",":","*","output","of","passing","x","through","all","blocks","in","the","stage",".","Shape",":","x",":",":","math",":","`","(","N",",","C_","{","in","}",",","H_","{","in","}",",","W_","{","in","}",")","`","Output",":",":","math",":","`","(","N",",","C_","{","out","}",",","H_","{","out","}",",","W_","{","out","}",")","`"]
code: def forward(self, x: Tensor) -> Tensor:
      """Forward pass through all blocks in the stage.
  
      Args:
          x: Batch of images.
  
      Returns:
          * output of passing x through all blocks in the stage.
  
      Shape:
          x: :math:`(N, C_{in}, H_{in}, W_{in})`
          Output: :math:`(N, C_{out}, H_{out}, W_{out})`
      """
      return self.stage(x)
  
file_path: ml-cvnets/cvnets/modules/regnet_modules.py
imports: import argparse
  from typing import List, Optional, Tuple
  from torch import Tensor, nn
  from cvnets.layers import ConvLayer2d, Identity, StochasticDepth
  from cvnets.layers.activation import build_activation_layer
  from cvnets.modules import BaseModule, SqueezeExcitation
label_desc: Use image node_id 2 for calling the AnyRegNetStage obj's underlying member method code with example usage: obj.forward(x) and returns: self