class_docstr: Implementation of the ResNet Bottleneck Block.
  
  Attributes:
      in_planes:
          Number of input channels.
      planes:
          Number of channels.
      stride:
          Stride of the first convolutional.
class_docstr_tok: ["Implementation","of","the","ResNet","Bottleneck","Block",".","Attributes",":","in_planes",":","Number","of","input","channels",".","planes",":","Number","of","channels",".","stride",":","Stride","of","the","first","convolutional","."]
code: def __init__(
      self,
      in_planes: int,
      planes: int,
      stride: int = 1,
      num_splits: int = 0,
  ):
      super(Bottleneck, self).__init__()
  
      self.conv1 = nn.Conv2d(
          in_planes, planes, kernel_size=1, bias=False
      )
      self.bn1 = get_norm_layer(planes, num_splits)
  
      self.conv2 = nn.Conv2d(
          planes,
          planes,
          kernel_size=3,
          stride=stride,
          padding=1,
          bias=False,
      )
      self.bn2 = get_norm_layer(planes, num_splits)
  
      self.conv3 = nn.Conv2d(
          planes, self.expansion * planes, kernel_size=1, bias=False
      )
      self.bn3 = get_norm_layer(self.expansion * planes, num_splits)
  
      self.shortcut = nn.Sequential()
      if stride != 1 or in_planes != self.expansion * planes:
          self.shortcut = nn.Sequential(
              nn.Conv2d(
                  in_planes,
                  self.expansion * planes,
                  kernel_size=1,
                  stride=stride,
                  bias=False,
              ),
              get_norm_layer(self.expansion * planes, num_splits),
          )
  
imports: from __future__ import annotations
  from typing import List
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from lightly.models.batchnorm import get_norm_layer
label_desc: Use image node_id 1 to create a new Bottleneck object from inherited base classes: nn with example: obj = Bottleneck(in_planes, planes, stride, num_splits)