src/transformers/models/convnext/modeling_tf_convnext.py/TFConvNextLayer/build
class TFConvNextLayer:    def build(self, input_shape: tf.TensorShape):
        # PT's `nn.Parameters` must be mapped to a TF layer weight to inherit the same name hierarchy (and vice-versa)
        self.layer_scale_parameter = (
            self.add_weight(
                shape=(self.dim,),
                initializer=tf.keras.initializers.Constant(value=self.config.layer_scale_init_value),
                trainable=True,
                name="layer_scale_parameter",
            )
            if self.config.layer_scale_init_value > 0
            else None
        )
        super().build(input_shape)