class_docstr: Slightly modified BottleNeck block (extra relu and biases)
class_docstr_tok: ["Slightly","modified","BottleNeck","block","(","extra","relu","and","biases",")"]
code: def __init__(
      self, in_channels, out_channels, *, norm_layer, stride=1
  ):
      super().__init__()
  
      # See note in ResidualBlock for the reason behind bias=True
      self.convnormrelu1 = Conv2dNormActivation(
          in_channels,
          out_channels // 4,
          norm_layer=norm_layer,
          kernel_size=1,
          bias=True,
      )
      self.convnormrelu2 = Conv2dNormActivation(
          out_channels // 4,
          out_channels // 4,
          norm_layer=norm_layer,
          kernel_size=3,
          stride=stride,
          bias=True,
      )
      self.convnormrelu3 = Conv2dNormActivation(
          out_channels // 4,
          out_channels,
          norm_layer=norm_layer,
          kernel_size=1,
          bias=True,
      )
      self.relu = nn.ReLU(inplace=True)
  
      if stride == 1:
          self.downsample = nn.Identity()
      else:
          self.downsample = Conv2dNormActivation(
              in_channels,
              out_channels,
              norm_layer=norm_layer,
              kernel_size=1,
              stride=stride,
              bias=True,
              activation_layer=None,
          )
  
imports: from typing import List, Optional
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from torch.nn.modules.batchnorm import BatchNorm2d
  from torch.nn.modules.instancenorm import InstanceNorm2d
  from torchvision.ops import Conv2dNormActivation
  from ...transforms._presets import OpticalFlow
  from ...utils import _log_api_usage_once
  from .._api import register_model, Weights, WeightsEnum
  from .._utils import handle_legacy_interface
  from ._utils import grid_sample, make_coords_grid, upsample_flow
label_desc: Use image node_id 1 to create a new BottleneckBlock object from inherited base classes: nn with example: obj = BottleneckBlock(in_channels, out_channels)