code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      stride: int,
      shortcut: bool,
  ) -> None:
      KORNIA_CHECK(stride in {1, 2})
      super().__init__()
      expanded_out_channels = out_channels * self.expansion
      self.convs = nn.Sequential(
          ConvNormAct(in_channels, out_channels, 1),
          ConvNormAct(out_channels, out_channels, 3, stride=stride),
          ConvNormAct(
              out_channels, expanded_out_channels, 1, act="none"
          ),
      )
      self.shortcut = (
          nn.Identity()
          if shortcut
          else _make_shortcut(
              in_channels, expanded_out_channels, stride
          )
      )
      self.relu = nn.ReLU(inplace=True)
  
file_path: kornia/kornia/contrib/models/rt_detr/architecture/resnet_d.py
imports: from __future__ import annotations
  from torch import nn
  from kornia.contrib.models.common import ConvNormAct
  from kornia.core import Module, Tensor
  from kornia.core.check import KORNIA_CHECK
label_desc: Use image node_id 1 to create a new BottleneckD object from inherited base classes: Module with example: obj = BottleneckD(in_channels, out_channels, stride, shortcut)