class_docstr: This class implements the `X` block based on the ResNet bottleneck block. See figure 4 of RegNet
  paper `RegNet model <https://arxiv.org/pdf/2003.13678.pdf>`_
  
  Args:
      opts: command-line arguments
      width_in: The number of input channels
      width_out: The number of output channels
      stride: Stride for convolution
      groups: Number of groups for convolution
      bottleneck_multiplier: The number of in/out channels of the intermediate
          conv layer will be scaled by this value
      se_ratio: The numer squeeze-excitation ratio. The number of channels in the SE
          module will be scaled by this value
      stochastic_depth_prob: The stochastic depth probability
docstr: Forward pass for XRegNetBlock.
  
  Args:
      x: Batch of images
  
  Retruns:
      * output of XRegNetBlock including stochastic depth layer and
          residual.
  
  Shape:
      x: :math:`(N, C_{in}, H_{in}, W_{in})`
      Output: :math:`(N, C_{out}, H_{out}, W_{out})`
docstr_tok: ["Forward","pass","for","XRegNetBlock",".","Args",":","x",":","Batch","of","images","Retruns",":","*","output","of","XRegNetBlock","including","stochastic","depth","layer","and","residual",".","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 for XRegNetBlock.
  
      Args:
          x: Batch of images
  
      Retruns:
          * output of XRegNetBlock including stochastic depth layer and
              residual.
  
      Shape:
          x: :math:`(N, C_{in}, H_{in}, W_{in})`
          Output: :math:`(N, C_{out}, H_{out}, W_{out})`
      """
      out = self.block(x)
      out = self.stochastic_depth(out)
      res = self.down_sample(x)
      out = res + out
      return self.final_act(out)
  
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 XRegNetBlock obj's underlying member method code with example usage: obj.forward(x) and returns: self