class_docstr: ResNet shortcut, used to project the residual features to the correct size. If needed, it is also used to
  downsample the input using `stride=2`.
class_docstr_tok: ["ResNet","shortcut",",","used","to","project","the","residual","features","to","the","correct","size",".","If","needed",",","it","is","also","used","to","downsample","the","input","using","`","stride=2","`","."]
code: def __init__(
      self,
      in_channels: int,
      out_channels: int,
      stride: int = 2,
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
      self.convolution = tf.keras.layers.Conv2D(
          out_channels,
          kernel_size=1,
          strides=stride,
          use_bias=False,
          name="convolution",
      )
      # Use same default momentum and epsilon as PyTorch equivalent
      self.normalization = tf.keras.layers.BatchNormalization(
          epsilon=1e-5, momentum=0.9, name="normalization"
      )
      self.in_channels = in_channels
      self.out_channels = out_channels
  
imports: from typing import 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 TFResNetShortCut object from inherited base classes: tf.keras.layers with example: obj = TFResNetShortCut(in_channels, out_channels, stride)