class_docstr: The standard bottleneck residual block without the last activation layer. It contains 3 conv layers with kernels
  1x1, 3x3, 1x1.
class_docstr_tok: ["The","standard","bottleneck","residual","block","without","the","last","activation","layer",".","It","contains","3","conv","layers","with","kernels","1x1",",","3x3",",","1x1","."]
docstr: Args:
      config (`VitDetConfig`):
          Model configuration.
      in_channels (`int`):
          Number of input channels.
      out_channels (`int`):
          Number of output channels.
      bottleneck_channels (`int`):
          Number of output channels for the 3x3 "bottleneck" conv layers.
docstr_tok: ["Args",":","config","(","`","VitDetConfig","`",")",":","Model","configuration",".","in_channels","(","`","int","`",")",":","Number","of","input","channels",".","out_channels","(","`","int","`",")",":","Number","of","output","channels",".","bottleneck_channels","(","`","int","`",")",":","Number","of","output","channels","for","the","3x3","``","bottleneck","''","conv","layers","."]
code: def __init__(
      self, config, in_channels, out_channels, bottleneck_channels
  ):
      """
      Args:
          config (`VitDetConfig`):
              Model configuration.
          in_channels (`int`):
              Number of input channels.
          out_channels (`int`):
              Number of output channels.
          bottleneck_channels (`int`):
              Number of output channels for the 3x3 "bottleneck" conv layers.
      """
      super().__init__()
      self.conv1 = nn.Conv2d(
          in_channels, bottleneck_channels, 1, bias=False
      )
      self.norm1 = VitDetLayerNorm(bottleneck_channels)
      self.act1 = ACT2FN[config.hidden_act]
  
      self.conv2 = nn.Conv2d(
          bottleneck_channels,
          bottleneck_channels,
          3,
          padding=1,
          bias=False,
      )
      self.norm2 = VitDetLayerNorm(bottleneck_channels)
      self.act2 = ACT2FN[config.hidden_act]
  
      self.conv3 = nn.Conv2d(
          bottleneck_channels, out_channels, 1, bias=False
      )
      self.norm3 = VitDetLayerNorm(out_channels)
  
imports: import collections.abc
  import math
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from ...activations import ACT2FN
  from ...modeling_outputs import BackboneOutput, BaseModelOutput
  from ...modeling_utils import PreTrainedModel
  from ...utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from ...utils.backbone_utils import BackboneMixin
  from .configuration_vitdet import VitDetConfig
label_desc: Use image node_id 1 to create a new VitDetResBottleneckBlock object from inherited base classes: nn with example: obj = VitDetResBottleneckBlock(config, in_channels, out_channels, bottleneck_channels)