docstr: labels (`tf.Tensor` or `np.ndarray` of shape `(batch_size,)`, *optional*):
      Labels for computing the image classification/regression loss. Indices should be in `[0, ...,
      config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
      `config.num_labels > 1` a classification loss is computed (Cross-Entropy).
  
  Returns:
  
  Examples:
  
  ```python
  >>> from transformers import ConvNextFeatureExtractor, TFConvNextForImageClassification
  >>> import tensorflow as tf
  >>> from PIL import Image
  >>> import requests
  
  >>> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
  >>> image = Image.open(requests.get(url, stream=True).raw)
  
  >>> feature_extractor = ConvNextFeatureExtractor.from_pretrained("facebook/convnext-tiny-224")
  >>> model = TFConvNextForImageClassification.from_pretrained("facebook/convnext-tiny-224")
  
  >>> inputs = feature_extractor(images=image, return_tensors="tf")
  >>> outputs = model(**inputs)
  >>> logits = outputs.logits
  >>> # model predicts one of the 1000 ImageNet classes
  >>> predicted_class_idx = tf.math.argmax(logits, axis=-1)[0]
  >>> print("Predicted class:", model.config.id2label[int(predicted_class_idx)])
  ```
docstr_tok: ["labels","(","`","tf.Tensor","`","or","`","np.ndarray","`","of","shape","`","(","batch_size",",",")","`",",","*","optional","*",")",":","Labels","for","computing","the","image","classification\/regression","loss",".","Indices","should","be","in","`","[","0",",","...",",","config.num_labels","-","1","]","`",".","If","`","config.num_labels","==","1","`","a","regression","loss","is","computed","(","Mean-Square","loss",")",",","If","`","config.num_labels",">","1","`","a","classification","loss","is","computed","(","Cross-Entropy",")",".","Returns",":","Examples",":","``","`","python",">",">",">","from","transformers","import","ConvNextFeatureExtractor",",","TFConvNextForImageClassification",">",">",">","import","tensorflow","as","tf",">",">",">","from","PIL","import","Image",">",">",">","import","requests",">",">",">","url","=","``","http",":","\/\/images.cocodataset.org\/val2017\/000000039769.jpg","''",">",">",">","image","=","Image.open","(","requests.get","(","url",",","stream=True",")",".raw",")",">",">",">","feature_extractor","=","ConvNextFeatureExtractor.from_pretrained","(","``","facebook\/convnext-tiny-224","''",")",">",">",">","model","=","TFConvNextForImageClassification.from_pretrained","(","``","facebook\/convnext-tiny-224","''",")",">",">",">","inputs","=","feature_extractor","(","images=image",",","return_tensors=","''","tf","''",")",">",">",">","outputs","=","model","(","*","*","inputs",")",">",">",">","logits","=","outputs.logits",">",">",">","#","model","predicts","one","of","the","1000","ImageNet","classes",">",">",">","predicted_class_idx","=","tf.math.argmax","(","logits",",","axis=-1",")","[","0","]",">",">",">","print","(","``","Predicted","class",":","''",",","model.config.id2label","[","int","(","predicted_class_idx",")","]",")","``","`"]
code: def call(
      self,
      pixel_values: Optional[TFModelInputType] = None,
      output_hidden_states: Optional[bool] = None,
      return_dict: Optional[bool] = None,
      labels: Optional[Union[np.ndarray, tf.Tensor]] = None,
      training: Optional[bool] = False,
  ) -> Union[TFSequenceClassifierOutput, Tuple[tf.Tensor]]:
      r"""
      labels (`tf.Tensor` or `np.ndarray` of shape `(batch_size,)`, *optional*):
          Labels for computing the image classification/regression loss. Indices should be in `[0, ...,
          config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
          `config.num_labels > 1` a classification loss is computed (Cross-Entropy).
  
      Returns:
  
      Examples:
  
      ```python
      >>> from transformers import ConvNextFeatureExtractor, TFConvNextForImageClassification
      >>> import tensorflow as tf
      >>> from PIL import Image
      >>> import requests
  
      >>> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
      >>> image = Image.open(requests.get(url, stream=True).raw)
  
      >>> feature_extractor = ConvNextFeatureExtractor.from_pretrained("facebook/convnext-tiny-224")
      >>> model = TFConvNextForImageClassification.from_pretrained("facebook/convnext-tiny-224")
  
      >>> inputs = feature_extractor(images=image, return_tensors="tf")
      >>> outputs = model(**inputs)
      >>> logits = outputs.logits
      >>> # model predicts one of the 1000 ImageNet classes
      >>> predicted_class_idx = tf.math.argmax(logits, axis=-1)[0]
      >>> print("Predicted class:", model.config.id2label[int(predicted_class_idx)])
      ```"""
      output_hidden_states = (
          output_hidden_states
          if output_hidden_states is not None
          else self.config.output_hidden_states
      )
      return_dict = (
          return_dict
          if return_dict is not None
          else self.config.use_return_dict
      )
  
      if pixel_values is None:
          raise ValueError("You have to specify pixel_values")
  
      outputs = self.convnext(
          pixel_values,
          output_hidden_states=output_hidden_states,
          return_dict=return_dict,
          training=training,
      )
  
      pooled_output = (
          outputs.pooler_output if return_dict else outputs[1]
      )
  
      logits = self.classifier(pooled_output)
      loss = (
          None
          if labels is None
          else self.hf_compute_loss(labels=labels, logits=logits)
      )
  
      if not return_dict:
          output = (logits,) + outputs[2:]
          return ((loss,) + output) if loss is not None else output
  
      return TFSequenceClassifierOutput(
          loss=loss,
          logits=logits,
          hidden_states=outputs.hidden_states,
      )
  
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 2 for calling the TFConvNextForImageClassification obj's underlying member method code with example usage: obj.call(pixel_values, output_hidden_states, return_dict, labels, training) and returns: TFSequenceClassifierOutput, unknown