class_docstr: ResNet as used in 'Deep Attentive Features for Prostate Segmentation in 3D Transrectal Ultrasound'
  <https://arxiv.org/pdf/1907.01743.pdf>.
  Uses two Daf3dResNetBottleneck blocks followed by two Daf3dResNetDilatedBottleneck blocks.
  
  Args:
      layers: how many layers to use.
      block_inplanes: determine the size of planes at each step. Also tunable with widen_factor.
      spatial_dims: number of spatial dimensions of the input image.
      n_input_channels: number of input channels for first convolutional layer.
      conv1_t_size: size of first convolution layer, determines kernel and padding.
      conv1_t_stride: stride of first convolution layer.
      no_max_pool: bool argument to determine if to use maxpool layer.
      shortcut_type: which downsample block to use. Options are 'A', 'B', default to 'B'.
          - 'A': using `self._downsample_basic_block`.
          - 'B': kernel_size 1 conv + norm.
      widen_factor: widen output for each layer.
      num_classes: number of output (classifications).
      feed_forward: whether to add the FC layer for the output, default to `True`.
      bias_downsample: whether to use bias term in the downsampling block when `shortcut_type` is 'B', default to `True`.
class_docstr_tok: ["ResNet","as","used","in","'Deep","Attentive","Features","for","Prostate","Segmentation","in","3D","Transrectal","Ultrasound'","<","https",":","\/\/arxiv.org\/pdf\/1907.01743.pdf",">",".","Uses","two","Daf3dResNetBottleneck","blocks","followed","by","two","Daf3dResNetDilatedBottleneck","blocks",".","Args",":","layers",":","how","many","layers","to","use",".","block_inplanes",":","determine","the","size","of","planes","at","each","step",".","Also","tunable","with","widen_factor",".","spatial_dims",":","number","of","spatial","dimensions","of","the","input","image",".","n_input_channels",":","number","of","input","channels","for","first","convolutional","layer",".","conv1_t_size",":","size","of","first","convolution","layer",",","determines","kernel","and","padding",".","conv1_t_stride",":","stride","of","first","convolution","layer",".","no_max_pool",":","bool","argument","to","determine","if","to","use","maxpool","layer",".","shortcut_type",":","which","downsample","block","to","use",".","Options","are","'","A","'",",","'","B","'",",","default","to","'","B","'",".","-","'","A","'",":","using","`","self._downsample_basic_block","`",".","-","'","B","'",":","kernel_size","1","conv","+","norm",".","widen_factor",":","widen","output","for","each","layer",".","num_classes",":","number","of","output","(","classifications",")",".","feed_forward",":","whether","to","add","the","FC","layer","for","the","output",",","default","to","`","True","`",".","bias_downsample",":","whether","to","use","bias","term","in","the","downsampling","block","when","`","shortcut_type","`","is","'","B","'",",","default","to","`","True","`","."]
code: def __init__(
      self,
      layers: list[int],
      block_inplanes: list[int],
      spatial_dims: int = 3,
      n_input_channels: int = 3,
      conv1_t_size: tuple[int] | int = 7,
      conv1_t_stride: tuple[int] | int = 1,
      no_max_pool: bool = False,
      shortcut_type: str = "B",
      widen_factor: float = 1.0,
      num_classes: int = 400,
      feed_forward: bool = True,
      bias_downsample: bool = True,  # for backwards compatibility (also see PR #5477)
  ):
      super().__init__(
          ResNetBottleneck,
          layers,
          block_inplanes,
          spatial_dims,
          n_input_channels,
          conv1_t_size,
          conv1_t_stride,
          no_max_pool,
          shortcut_type,
          widen_factor,
          num_classes,
          feed_forward,
          bias_downsample,
      )
  
      self.in_planes = 64
  
      conv_type: Callable = Conv[Conv.CONV, spatial_dims]
      norm_type: Callable = Norm[Norm.GROUP, spatial_dims]
  
      # adapt first convolution to work with new in_planes
      self.conv1 = conv_type(
          n_input_channels,
          self.in_planes,
          kernel_size=7,
          stride=(1, 2, 2),
          padding=(3, 3, 3),
          bias=False,
      )
      self.bn1 = norm_type(32, 64)
      self.relu = nn.PReLU()  # type: ignore
  
      # adapt layers to our needs
      self.layer1 = self._make_layer(
          Daf3dResNetBottleneck,
          block_inplanes[0],
          layers[0],
          spatial_dims,
          shortcut_type,
      )
      self.layer2 = self._make_layer(
          Daf3dResNetBottleneck,
          block_inplanes[1],
          layers[1],
          spatial_dims,
          shortcut_type,
          stride=(1, 2, 2),  # type: ignore
      )
      self.layer3 = self._make_layer(
          Daf3dResNetDilatedBottleneck,
          block_inplanes[2],
          layers[2],
          spatial_dims,
          shortcut_type,
          stride=1,
      )
      self.layer4 = self._make_layer(
          Daf3dResNetDilatedBottleneck,
          block_inplanes[3],
          layers[3],
          spatial_dims,
          shortcut_type,
          stride=1,
      )
  
imports: from __future__ import annotations
  from collections import OrderedDict
  from collections.abc import Callable, Sequence
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from monai.networks.blocks import ADN
  from monai.networks.blocks.aspp import SimpleASPP
  from monai.networks.blocks.backbone_fpn_utils import BackboneWithFPN
  from monai.networks.blocks.convolutions import Convolution
  from monai.networks.blocks.feature_pyramid_network import ExtraFPNBlock, FeaturePyramidNetwork
  from monai.networks.layers.factories import Conv, Norm
  from monai.networks.nets.resnet import ResNet, ResNetBottleneck
label_desc: Use image node_id 1 to create a new Daf3dResNet object from inherited base classes: ResNet with example: obj = Daf3dResNet(layers, block_inplanes, spatial_dims, n_input_channels, conv1_t_size, conv1_t_stride, no_max_pool, shortcut_type, widen_factor, num_classes, feed_forward, bias_downsample)