class_docstr: ConvNextV2 stage, consisting of an optional downsampling layer + multiple residual blocks.
  
  Args:
      config (`ConvNextV2V2Config`):
          Model configuration class.
      in_channels (`int`):
          Number of input channels.
      out_channels (`int`):
          Number of output channels.
      depth (`int`):
          Number of residual blocks.
      drop_path_rates(`List[float]`):
          Stochastic depth rates for each layer.
class_docstr_tok: ["ConvNextV2","stage",",","consisting","of","an","optional","downsampling","layer","+","multiple","residual","blocks",".","Args",":","config","(","`","ConvNextV2V2Config","`",")",":","Model","configuration","class",".","in_channels","(","`","int","`",")",":","Number","of","input","channels",".","out_channels","(","`","int","`",")",":","Number","of","output","channels",".","depth","(","`","int","`",")",":","Number","of","residual","blocks",".","drop_path_rates","(","`","List","[","float","]","`",")",":","Stochastic","depth","rates","for","each","layer","."]
code: def __init__(
      self,
      config: ConvNextV2Config,
      in_channels: int,
      out_channels: int,
      kernel_size: int = 2,
      stride: int = 2,
      depth: int = 2,
      drop_path_rates: Optional[List[float]] = None,
      **kwargs,
  ):
      super().__init__(**kwargs)
      if in_channels != out_channels or stride > 1:
          self.downsampling_layer = [
              tf.keras.layers.LayerNormalization(
                  epsilon=1e-6,
                  name="downsampling_layer.0",
              ),
              # Inputs to this layer will follow NHWC format since we
              # transposed the inputs from NCHW to NHWC in the `TFConvNextV2Embeddings`
              # layer. All the outputs throughout the model will be in NHWC
              # from this point on until the output where we again change to
              # NCHW.
              tf.keras.layers.Conv2D(
                  filters=out_channels,
                  kernel_size=kernel_size,
                  strides=stride,
                  kernel_initializer=get_initializer(
                      config.initializer_range
                  ),
                  bias_initializer=tf.keras.initializers.Zeros(),
                  name="downsampling_layer.1",
              ),
          ]
      else:
          self.downsampling_layer = [tf.identity]
  
      drop_path_rates = drop_path_rates or [0.0] * depth
      self.layers = [
          TFConvNextV2Layer(
              config,
              dim=out_channels,
              drop_path=drop_path_rates[j],
              name=f"layers.{j}",
          )
          for j in range(depth)
      ]
      self.in_channels = in_channels
      self.out_channels = out_channels
      self.stride = stride
  
imports: from __future__ import annotations
  from typing import List, Optional, Tuple, Union
  import numpy
  import tensorflow
  from ...activations_tf import get_tf_activation
  from ...modeling_tf_outputs import TFBaseModelOutputWithNoAttention, TFBaseModelOutputWithPooling, TFBaseModelOutputWithPoolingAndNoAttention, TFImageClassifierOutputWithNoAttention
  from ...modeling_tf_utils import TFModelInputType, TFPreTrainedModel, TFSequenceClassificationLoss, get_initializer, 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_convnextv2 import ConvNextV2Config
label_desc: Use image node_id 1 to create a new TFConvNextV2Stage object from inherited base classes: tf.keras.layers with example: obj = TFConvNextV2Stage(config, in_channels, out_channels, kernel_size, stride, depth, drop_path_rates)