code: def __init__(self, config, **kwargs):
      super().__init__(**kwargs)
      self.stages = []
      drop_path_rates = tf.linspace(
          0.0, config.drop_path_rate, sum(config.depths)
      )
      drop_path_rates = tf.split(drop_path_rates, config.depths)
      drop_path_rates = [x.numpy().tolist() for x in drop_path_rates]
      prev_chs = config.hidden_sizes[0]
      for i in range(config.num_stages):
          out_chs = config.hidden_sizes[i]
          stage = TFConvNextStage(
              config,
              in_channels=prev_chs,
              out_channels=out_chs,
              stride=2 if i > 0 else 1,
              depth=config.depths[i],
              drop_path_rates=drop_path_rates[i],
              name=f"stages.{i}",
          )
          self.stages.append(stage)
          prev_chs = out_chs
  
imports: from typing import Dict, Optional, Tuple, Union
  import numpy
  import tensorflow
  from transformers import shape_list
  from ...activations_tf import get_tf_activation
  from ...modeling_tf_outputs import TFBaseModelOutput, TFBaseModelOutputWithPooling, TFSequenceClassifierOutput
  from ...modeling_tf_utils import TFModelInputType, TFPreTrainedModel, TFSequenceClassificationLoss, get_initializer, keras_serializable, unpack_inputs
  from ...utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from .configuration_convnext import ConvNextConfig
label_desc: Use image node_id 1 to create a new TFConvNextEncoder object from inherited base classes: tf.keras.layers with example: obj = TFConvNextEncoder(config)