code: def test_inference_image_classification_head(self):
      model = TFResNetForImageClassification.from_pretrained(
          TF_RESNET_PRETRAINED_MODEL_ARCHIVE_LIST[0]
      )
  
      image_processor = self.default_image_processor
      image = prepare_img()
      inputs = image_processor(images=image, return_tensors="tf")
  
      # forward pass
      outputs = model(**inputs)
  
      # verify the logits
      expected_shape = tf.TensorShape((1, 1000))
      self.assertEqual(outputs.logits.shape, expected_shape)
  
      expected_slice = tf.constant([-11.1069, -9.7877, -8.3777])
  
      self.assertTrue(
          np.allclose(
              outputs.logits[0, :3].numpy(), expected_slice, atol=1e-4
          )
      )
  
imports: from __future__ import annotations
  import inspect
  import unittest
  import numpy
  from transformers import ResNetConfig
  from transformers.testing_utils import require_tf, require_vision, slow
  from transformers.utils import cached_property, is_tf_available, is_vision_available
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_tf_common import TFModelTesterMixin, floats_tensor, ids_tensor
  from ...test_pipeline_mixin import PipelineTesterMixin
label_desc: Use image node_id 2 for calling the TFResNetModelIntegrationTest obj's underlying member method code with example usage: obj.test_inference_image_classification_head() without return types