class_docstr: Modified Aligned Xception
      
code: def __init__(
      self,
      block_cfg,
      num_classes=1000,
      in_chans=3,
      output_stride=32,
      preact=False,
      act_layer=nn.ReLU,
      norm_layer=nn.BatchNorm2d,
      drop_rate=0.0,
      global_pool="avg",
  ):
      super(XceptionAligned, self).__init__()
      assert output_stride in (8, 16, 32)
      self.num_classes = num_classes
      self.drop_rate = drop_rate
      self.grad_checkpointing = False
  
      layer_args = dict(act_layer=act_layer, norm_layer=norm_layer)
      self.stem = nn.Sequential(
          *[
              ConvNormAct(
                  in_chans, 32, kernel_size=3, stride=2, **layer_args
              ),
              create_conv2d(32, 64, kernel_size=3, stride=1)
              if preact
              else ConvNormAct(
                  32, 64, kernel_size=3, stride=1, **layer_args
              ),
          ]
      )
  
      curr_dilation = 1
      curr_stride = 2
      self.feature_info = []
      self.blocks = nn.Sequential()
      module_fn = PreXceptionModule if preact else XceptionModule
      for i, b in enumerate(block_cfg):
          b["dilation"] = curr_dilation
          if b["stride"] > 1:
              name = (
                  f"blocks.{i}.stack.conv2"
                  if preact
                  else f"blocks.{i}.stack.act3"
              )
              self.feature_info += [
                  dict(
                      num_chs=to_3tuple(b["out_chs"])[-2],
                      reduction=curr_stride,
                      module=name,
                  )
              ]
              next_stride = curr_stride * b["stride"]
              if next_stride > output_stride:
                  curr_dilation *= b["stride"]
                  b["stride"] = 1
              else:
                  curr_stride = next_stride
          self.blocks.add_module(str(i), module_fn(**b, **layer_args))
          self.num_features = self.blocks[-1].out_channels
  
      self.feature_info += [
          dict(
              num_chs=self.num_features,
              reduction=curr_stride,
              module="blocks." + str(len(self.blocks) - 1),
          )
      ]
      self.act = act_layer(inplace=True) if preact else nn.Identity()
      self.head = ClassifierHead(
          in_features=self.num_features,
          num_classes=num_classes,
          pool_type=global_pool,
          drop_rate=drop_rate,
      )
  
imports: from functools import partial
  import torch
  import torch.nn
  from timm.data import IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTION_STD
  from timm.layers import ClassifierHead, ConvNormAct, create_conv2d, get_norm_act_layer
  from timm.layers.helpers import to_3tuple
  from ._builder import build_model_with_cfg
  from ._manipulate import checkpoint_seq
  from ._registry import register_model, generate_default_cfgs
label_desc: Use image node_id 1 to create a new XceptionAligned object from inherited base classes: nn with example: obj = XceptionAligned(block_cfg, num_classes, in_chans, output_stride, preact, act_layer, norm_layer, drop_rate, global_pool)