class_docstr: ResNet / ResNeXt / SE-ResNeXt / SE-Net
  
  This class implements all variants of ResNet, ResNeXt, SE-ResNeXt, and SENet that
    * have > 1 stride in the 3x3 conv layer of bottleneck
    * have conv-bn-act ordering
  
  This ResNet impl supports a number of stem and downsample options based on the v1c, v1d, v1e, and v1s
  variants included in the MXNet Gluon ResNetV1b model. The C and D variants are also discussed in the
  'Bag of Tricks' paper: https://arxiv.org/pdf/1812.01187. The B variant is equivalent to torchvision default.
  
  ResNet variants (the same modifications can be used in SE/ResNeXt models as well):
    * normal, b - 7x7 stem, stem_width = 64, same as torchvision ResNet, NVIDIA ResNet 'v1.5', Gluon v1b
    * c - 3 layer deep 3x3 stem, stem_width = 32 (32, 32, 64)
    * d - 3 layer deep 3x3 stem, stem_width = 32 (32, 32, 64), average pool in downsample
    * e - 3 layer deep 3x3 stem, stem_width = 64 (64, 64, 128), average pool in downsample
    * s - 3 layer deep 3x3 stem, stem_width = 64 (64, 64, 128)
    * t - 3 layer deep 3x3 stem, stem width = 32 (24, 48, 64), average pool in downsample
    * tn - 3 layer deep 3x3 stem, stem width = 32 (24, 32, 64), average pool in downsample
  
  ResNeXt
    * normal - 7x7 stem, stem_width = 64, standard cardinality and base widths
    * same c,d, e, s variants as ResNet can be enabled
  
  SE-ResNeXt
    * normal - 7x7 stem, stem_width = 64
    * same c, d, e, s variants as ResNet can be enabled
  
  SENet-154 - 3 layer deep 3x3 stem (same as v1c-v1s), stem_width = 64, cardinality=64,
      reduction by 2 on width of first bottleneck convolution, 3x3 downsample convs after first block
  
  Parameters
  ----------
  block : Block, class for the residual block. Options are BasicBlockGl, BottleneckGl.
  layers : list of int, number of layers in each block
  num_classes : int, default 1000, number of classification classes.
  in_chans : int, default 3, number of input (color) channels.
  output_stride : int, default 32, output stride of the network, 32, 16, or 8.
  global_pool : str, Global pooling type. One of 'avg', 'max', 'avgmax', 'catavgmax'
  cardinality : int, default 1, number of convolution groups for 3x3 conv in Bottleneck.
  base_width : int, default 64, factor determining bottleneck channels. `planes * base_width / 64 * cardinality`
  stem_width : int, default 64, number of channels in stem convolutions
  stem_type : str, default ''
      The type of stem:
        * '', default - a single 7x7 conv with a width of stem_width
        * 'deep' - three 3x3 convolution layers of widths stem_width, stem_width, stem_width * 2
        * 'deep_tiered' - three 3x3 conv layers of widths stem_width//4 * 3, stem_width, stem_width * 2
  block_reduce_first : int, default 1
      Reduction factor for first convolution output width of residual blocks, 1 for all archs except senets, where 2
  down_kernel_size : int, default 1, kernel size of residual block downsample path, 1x1 for most, 3x3 for senets
  avg_down : bool, default False, use average pooling for projection skip connection between stages/downsample.
  act_layer : nn.Module, activation layer
  norm_layer : nn.Module, normalization layer
  aa_layer : nn.Module, anti-aliasing layer
  drop_rate : float, default 0. Dropout probability before classifier, for training
code: def forward(self, x):
      x = self.forward_features(x)
      x = self.forward_head(x)
      return x
  
imports: import math
  from functools import partial
  import torch
  import torch.nn
  import torch.nn.functional
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.models.helpers import build_model_with_cfg
  from timm.models.layers import DropBlock2d, DropPath, AvgPool2dSame, BlurPool2d, GroupNorm, create_attn, get_attn, create_classifier
label_desc: Use image node_id 9 for calling the ResNet obj's underlying member method code with example usage: obj.forward(x) and returns: x