class_docstr: A classic ResNet's bottleneck layer composed by three `3x3` convolutions.
  
  The first `1x1` convolution reduces the input by a factor of `reduction` in order to make the second `3x3`
  convolution faster. The last `1x1` convolution remaps the reduced features to `out_channels`.
class_docstr_tok: ["A","classic","ResNet","'s","bottleneck","layer","composed","by","three","`","3x3","`","convolutions",".","The","first","`","1x1","`","convolution","reduces","the","input","by","a","factor","of","`","reduction","`","in","order","to","make","the","second","`","3x3","`","convolution","faster",".","The","last","`","1x1","`","convolution","remaps","the","reduced","features","to","`","out_channels","`","."]
code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      stride: int = 1,
      activation: str = "relu",
      reduction: int = 4,
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
      should_apply_shortcut = in_channels != out_channels or stride != 1
      reduces_channels = out_channels // reduction
      self.conv0 = TFResNetConvLayer(
          reduces_channels, kernel_size=1, name="layer.0"
      )
      self.conv1 = TFResNetConvLayer(
          reduces_channels, stride=stride, name="layer.1"
      )
      self.conv2 = TFResNetConvLayer(
          out_channels, kernel_size=1, activation=None, name="layer.2"
      )
      self.shortcut = (
          TFResNetShortCut(out_channels, stride=stride, name="shortcut")
          if should_apply_shortcut
          else tf.keras.layers.Activation("linear", name="shortcut")
      )
      self.activation = ACT2FN[activation]
  
imports: from typing import Dict, Optional, Tuple, Union
  import tensorflow
  from ...activations_tf import ACT2FN
  from ...modeling_tf_outputs import TFBaseModelOutputWithNoAttention, TFBaseModelOutputWithPoolingAndNoAttention, TFImageClassifierOutputWithNoAttention
  from ...modeling_tf_utils import TFPreTrainedModel, TFSequenceClassificationLoss, keras_serializable, unpack_inputs
  from ...tf_utils import shape_list
  from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging
  from .configuration_resnet import ResNetConfig
label_desc: Use image node_id 1 to create a new TFResNetBottleNeckLayer object from inherited base classes: tf.keras.layers with example: obj = TFResNetBottleNeckLayer(in_channels, out_channels, stride, activation, reduction)