


"""simple docstring"""







import inspect
import unittest

from transformers import SwinaSRConfig
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
from transformers.utils import is_torch_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, _config_zero_init, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
       import torch
       from torch import nn

       from transformers import SwinaSRForImageSuperResolution, SwinaSRModel
       from transformers.models.swinasr.modeling_swinasr import SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST

if is_vision_available():
       from PIL import Image

       from transformers import SwinaSRImageProcessor






class  __A							:






 """simple docstring"""




 def __init__(						self					,       __A					,       __A=13					,       __A=32					,       __A=1					,       __A=3					,       __A=16					,       __A=[1, 2, 1]					,       __A=[2, 2, 4]					,       __A=2					,       __A=2.0					,       __A=True					,       __A=0.0					,       __A=0.0					,       __A=0.1					,       __A="gelu"					,       __A=False					,       __A=True					,       __A=0.02					,       __A=1E-5					,       __A=True					,       __A=None					,       __A=False					,       __A=2					,       )   ->	Any:
     a											=parent
     a											=batch_size
     a											=image_size
     a											=patch_size
     a											=num_channels
     a											=embed_dim
     a											=depths
     a											=num_heads
     a											=window_size
     a											=mlp_ratio
     a											=qkv_bias
     a											=hidden_dropout_prob
     a											=attention_probs_dropout_prob
     a											=drop_path_rate
     a											=hidden_act
     a											=use_absolute_embeddings
     a											=patch_norm
     a											=layer_norm_eps
     a											=initializer_range
     a											=is_training
     a											=scope
     a											=use_labels
     a											=upscale

     # here we set some attributes to make tests pass
     a											=len(lowercase__		)
     a											=embed_dim
     a											=(image_size // patch_size) ** 2


 def  SCREAMING_SNAKE_CASE				(						self		)   ->	int:
     a											=floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]		)

     a											=None
     if self.use_labels:
         a											=ids_tensor([self.batch_size]					,       self.type_sequence_label_size		)

     a											=self.get_config()

     return config, pixel_values, labels


 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Tuple:
     return SwinaSRConfig(
         image_size=self.image_size					,       patch_size=self.patch_size					,       num_channels=self.num_channels					,       embed_dim=self.embed_dim					,       depths=self.depths					,       num_heads=self.num_heads					,       window_size=self.window_size					,       mlp_ratio=self.mlp_ratio					,       qkv_bias=self.qkv_bias					,       hidden_dropout_prob=self.hidden_dropout_prob					,       attention_probs_dropout_prob=self.attention_probs_dropout_prob					,       drop_path_rate=self.drop_path_rate					,       hidden_act=self.hidden_act					,       use_absolute_embeddings=self.use_absolute_embeddings					,       path_norm=self.patch_norm					,       layer_norm_eps=self.layer_norm_eps					,       initializer_range=self.initializer_range					,       upscale=self.upscale					,       )


 def  SCREAMING_SNAKE_CASE				(						self					,       __A					,       __A					,       __A		)   ->	Any:
     a											=SwinaSRModel(config=lowercase__		)
     model.to(lowercase__		)
     model.eval()
     a											=model(lowercase__		)

     self.parent.assertEqual(
         result.last_hidden_state.shape					,       (self.batch_size, self.embed_dim, self.image_size, self.image_size)		)


 def  SCREAMING_SNAKE_CASE				(						self					,       __A					,       __A					,       __A		)   ->	Union[str, Any]:
     a											=SwinaSRForImageSuperResolution(lowercase__		)
     model.to(lowercase__		)
     model.eval()
     a											=model(lowercase__		)

     a											=self.image_size * self.upscale
     self.parent.assertEqual(
         result.reconstruction.shape					,       (self.batch_size, self.num_channels, expected_image_size, expected_image_size)		)





 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Union[str, Any]:
     a											=self.prepare_config_and_inputs()
     a											=config_and_inputs
     a											={'''pixel_values''': pixel_values}
     return config, inputs_dict






@require_torch
class  __A							(			a__,       a__,       unittest.TestCase     ):






 """simple docstring"""




 __lowerCAmelCase					   =    (SwinaSRModel, SwinaSRForImageSuperResolution) if is_torch_available() else ()
 __lowerCAmelCase					   =    {"""feature-extraction""": SwinaSRModel} if is_torch_available() else {}

 __lowerCAmelCase					   =    False
 __lowerCAmelCase					   =    False
 __lowerCAmelCase					   =    False
 __lowerCAmelCase					   =    False
 __lowerCAmelCase					   =    False


 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Any:
     a											=SwinaSRModelTester(self		)
     a											=ConfigTester(self					,       config_class=lowercase__					,       embed_dim=37		)


 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Any:
     self.config_tester.create_and_test_config_to_json_string()
     self.config_tester.create_and_test_config_to_json_file()
     self.config_tester.create_and_test_config_from_and_save_pretrained()
     self.config_tester.create_and_test_config_with_num_labels()
     self.config_tester.check_config_can_be_init_without_params()
     self.config_tester.check_config_arguments_init()


 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Optional[int]:
     a											=self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_model(*lowercase__		)


 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Optional[Any]:
     a											=self.model_tester.prepare_config_and_inputs()
     self.model_tester.create_and_check_for_image_super_resolution(*lowercase__		)


 @unittest.skip(reason='''Got `CUDA error: misaligned address` with PyTorch 2.0.0.'''		)
 def  SCREAMING_SNAKE_CASE				(						self		)   ->	List[str]:
     pass


 @unittest.skip(reason='''Swin2SR does not use inputs_embeds'''		)
 def  SCREAMING_SNAKE_CASE				(						self		)   ->	int:
     pass


 @unittest.skip(reason='''Swin2SR does not support training yet'''		)
 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Optional[Any]:
     pass


 @unittest.skip(reason='''Swin2SR does not support training yet'''		)
 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Union[str, Any]:
     pass


 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Optional[int]:
     a											=self.model_tester.prepare_config_and_inputs_for_common()

     for model_class in self.all_model_classes:
         a											=model_class(lowercase__		)
         self.assertIsInstance(model.get_input_embeddings()					,       (nn.Module)		)
         a											=model.get_output_embeddings()
         self.assertTrue(x is None or isinstance(lowercase__					,       nn.Linear		)		)


 def  SCREAMING_SNAKE_CASE				(						self		)   ->	int:
     a											=self.model_tester.prepare_config_and_inputs_for_common()

     for model_class in self.all_model_classes:
         a											=model_class(lowercase__		)
         a											=inspect.signature(model.forward		)
         # signature.parameters is an OrderedDict => so arg_names order is deterministic
         a											=[*signature.parameters.keys()]

         a											=['''pixel_values''']
         self.assertListEqual(arg_names[:1]					,       lowercase__		)


 @slow
 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Any:





     for model_name in SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
         a											=SwinaSRModel.from_pretrained(lowercase__		)
         self.assertIsNotNone(lowercase__		)


 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Optional[Any]:
     a											=self.model_tester.prepare_config_and_inputs_for_common()

     a											=_config_zero_init(lowercase__		)
     for model_class in self.all_model_classes:
         a											=model_class(config=lowercase__		)
         for name, param in model.named_parameters():
             if "logit_scale" in name:
                 continue
             if param.requires_grad:
                 self.assertIn(
                     ((param.data.mean() * 1E9).round() / 1E9).item()					,       [0.0, 1.0]					,       msg=f'''Parameter {name} of model {model_class} seems not properly initialized'''					,       )





 def  SCREAMING_SNAKE_CASE				(						self		)   ->	str:
     a											=self.model_tester.prepare_config_and_inputs_for_common()
     a											=True

     for model_class in self.all_model_classes:
         a											=True
         a											=False
         a											=True
         a											=model_class(lowercase__		)
         model.to(lowercase__		)
         model.eval()
         with torch.no_grad():
             a											=model(**self._prepare_for_class(lowercase__					,       lowercase__		)		)
         a											=outputs.attentions
         a											=len(self.model_tester.depths		)
         self.assertEqual(len(lowercase__		)					,       lowercase__		)

         # check that output_attentions also work using config
         del inputs_dict["output_attentions"]
         a											=True
         a											=config.window_size**2
         a											=model_class(lowercase__		)
         model.to(lowercase__		)
         model.eval()
         with torch.no_grad():
             a											=model(**self._prepare_for_class(lowercase__					,       lowercase__		)		)
         a											=outputs.attentions
         self.assertEqual(len(lowercase__		)					,       lowercase__		)

         self.assertListEqual(
             list(attentions[0].shape[-3:]		)					,       [self.model_tester.num_heads[0], window_size_squared, window_size_squared]					,       )
         a											=len(lowercase__		)

         # Check attention is always last and order is fine
         a											=True
         a											=True
         a											=model_class(lowercase__		)
         model.to(lowercase__		)
         model.eval()
         with torch.no_grad():
             a											=model(**self._prepare_for_class(lowercase__					,       lowercase__		)		)

         self.assertEqual(out_len + 1					,       len(lowercase__		)		)

         a											=outputs.attentions

         self.assertEqual(len(lowercase__		)					,       lowercase__		)

         self.assertListEqual(
             list(self_attentions[0].shape[-3:]		)					,       [self.model_tester.num_heads[0], window_size_squared, window_size_squared]					,       )






@require_vision
@require_torch
@slow
class  __A							(			unittest.TestCase     ):






 """simple docstring"""




 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Optional[int]:
     a											=SwinaSRImageProcessor()
     a											=SwinaSRForImageSuperResolution.from_pretrained('''caidas/swin2SR-classical-sr-x2-64'''		).to(lowercase__		)

     a											=Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png'''		)
     a											=processor(images=lowercase__					,       return_tensors='''pt'''		).to(lowercase__		)

     # forward pass
     with torch.no_grad():
         a											=model(**lowercase__		)

     # verify the logits
     a											=torch.Size([1, 3, 976, 1296]		)
     self.assertEqual(outputs.reconstruction.shape					,       lowercase__		)
     a											=torch.tensor(
         [[0.5_458, 0.5_546, 0.5_638], [0.5_526, 0.5_565, 0.5_651], [0.5_396, 0.5_426, 0.5_621]]		).to(lowercase__		)
     self.assertTrue(torch.allclose(outputs.reconstruction[0, 0, :3, :3]					,       lowercase__					,       atol=1E-4		)		)






'''simple docstring'''

from __future__ import annotations

import inspect
import unittest
from typing import List, Tuple

from transformers import ConvNextConfig
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


if is_tf_available():
   import tensorflow as tf

   from transformers import TFConvNextForImageClassification, TFConvNextModel


if is_vision_available():
   from PIL import Image

   from transformers import ConvNextImageProcessor





class lowerCamelCase    :







  def __init__(		self  ,  lowercase__  ,  lowercase__=13  ,  lowercase__=32  ,  lowercase__=3  ,  lowercase__=4  ,  lowercase__=[10, 20, 30, 40]  ,  lowercase__=[2, 2, 3, 2]  ,  lowercase__=True  ,  lowercase__=True  ,  lowercase__=37  ,  lowercase__="gelu"  ,  lowercase__=10  ,  lowercase__=0.02  ,  lowercase__=3  ,  lowercase__=None  ,  )		->    Any:






        """simple docstring"""





        _snake_case		:						str         =  parent
        _snake_case		:						Any         =  batch_size
        _snake_case		:						Optional[Any]         =  image_size
        _snake_case		:						List[Any]         =  num_channels
        _snake_case		:						int         =  num_stages
        _snake_case		:						Any         =  hidden_sizes
        _snake_case		:						Dict         =  depths
        _snake_case		:						List[Any]         =  is_training
        _snake_case		:						Union[str, Any]         =  use_labels
        _snake_case		:						Dict         =  intermediate_size
        _snake_case		:						List[str]         =  hidden_act
        _snake_case		:						Optional[int]         =  type_sequence_label_size
        _snake_case		:						str         =  initializer_range
        _snake_case		:						Dict         =  scope







  def 					UpperCAmelCase_					(		self		)		->    List[str]:






        """simple docstring"""





        _snake_case		:						Dict         =  floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]		)

        _snake_case		:						int         =  None
        if self.use_labels:
              _snake_case		:						Optional[int]         =  ids_tensor([self.batch_size]  ,  self.type_sequence_label_size		)

        _snake_case		:						Union[str, Any]         =  self.get_config()

        return config, pixel_values, labels







  def 					UpperCAmelCase_					(		self		)		->    Union[str, Any]:






        """simple docstring"""





        return ConvNextConfig(
            num_channels=self.num_channels  ,  hidden_sizes=self.hidden_sizes  ,  depths=self.depths  ,  num_stages=self.num_stages  ,  hidden_act=self.hidden_act  ,  is_decoder=lowercase__  ,  initializer_range=self.initializer_range  ,  )







  def 					UpperCAmelCase_					(		self  ,  lowercase__  ,  lowercase__  ,  lowercase__		)		->    int:






        """simple docstring"""





        _snake_case		:						Tuple         =  TFConvNextModel(config=lowercase__		)
        _snake_case		:						Optional[int]         =  model(lowercase__  ,  training=lowercase__		)
        # expected last hidden states: B, C, H // 32, W // 32
        self.parent.assertEqual(
            result.last_hidden_state.shape  ,  (self.batch_size, self.hidden_sizes[-1], self.image_size // 32, self.image_size // 32)  ,  )







  def 					UpperCAmelCase_					(		self  ,  lowercase__  ,  lowercase__  ,  lowercase__		)		->    Optional[Any]:






        """simple docstring"""





        _snake_case		:						int         =  self.type_sequence_label_size
        _snake_case		:						Optional[int]         =  TFConvNextForImageClassification(lowercase__		)
        _snake_case		:						Dict         =  model(lowercase__  ,  labels=lowercase__  ,  training=lowercase__		)
        self.parent.assertEqual(result.logits.shape  ,  (self.batch_size, self.type_sequence_label_size)		)







  def 					UpperCAmelCase_					(		self		)		->    List[str]:






        """simple docstring"""





        _snake_case		:						Union[str, Any]         =  self.prepare_config_and_inputs()
        _snake_case  ,				_snake_case  ,				_snake_case		:						Union[str, Any]         =  config_and_inputs
        _snake_case		:						Optional[Any]         =  {'''pixel_values''': pixel_values}
        return config, inputs_dict





@require_tf
class lowerCamelCase    (a__    ,   a__    ,   unittest.TestCase       ):
  _lowercase	:						str							       =					(TFConvNextModel, TFConvNextForImageClassification) if is_tf_available() else ()
  _lowercase	:						List[str]							       =					(
      {"""feature-extraction""": TFConvNextModel, """image-classification""": TFConvNextForImageClassification}
      if is_tf_available()
      else {}
  )

  _lowercase	:						Optional[Any]							       =					False
  _lowercase	:						str							       =					False
  _lowercase	:						Tuple							       =					False
  _lowercase	:						Union[str, Any]							       =					False
  _lowercase	:						Dict							       =					False







  def 					UpperCAmelCase_					(		self		)		->    Any:






        """simple docstring"""





        _snake_case		:						List[str]         =  TFConvNextModelTester(self		)
        _snake_case		:						Tuple         =  ConfigTester(
            self  ,  config_class=lowercase__  ,  has_text_modality=lowercase__  ,  hidden_size=37  ,  )







  @unittest.skip(reason='''ConvNext does not use inputs_embeds'''		)
  def 					UpperCAmelCase_					(		self		)		->    int:






        """simple docstring"""





        pass







  @unittest.skipIf(
      not is_tf_available() or len(tf.config.list_physical_devices('''GPU'''		)		) == 0  ,  reason='''TF does not support backprop for grouped convolutions on CPU.'''  ,  )
  @slow
  def 					UpperCAmelCase_					(		self		)		->    int:






        """simple docstring"""





        super().test_keras_fit()







  @unittest.skip(reason='''ConvNext does not support input and output embeddings'''		)
  def 					UpperCAmelCase_					(		self		)		->    Any:






        """simple docstring"""





        pass







  def 					UpperCAmelCase_					(		self		)		->    Any:






        """simple docstring"""





        _snake_case  ,				_snake_case		:						Dict         =  self.model_tester.prepare_config_and_inputs_for_common()

        for model_class in self.all_model_classes:
              _snake_case		:						int         =  model_class(lowercase__		)
              _snake_case		:						Dict         =  inspect.signature(model.call		)
              # signature.parameters is an OrderedDict => so arg_names order is deterministic
              _snake_case		:						Optional[int]         =  [*signature.parameters.keys()]

              _snake_case		:						int         =  ['''pixel_values''']
              self.assertListEqual(arg_names[:1]  ,  lowercase__		)







  def 					UpperCAmelCase_					(		self		)		->    str:






        """simple docstring"""





        _snake_case		:						Dict         =  self.model_tester.prepare_config_and_inputs()
        self.model_tester.create_and_check_model(*lowercase__		)







  @unittest.skipIf(
      not is_tf_available() or len(tf.config.list_physical_devices('''GPU'''		)		) == 0  ,  reason='''TF does not support backprop for grouped convolutions on CPU.'''  ,  )
  def 					UpperCAmelCase_					(		self		)		->    Optional[Any]:






        """simple docstring"""





        super().test_dataset_conversion()







  def 					UpperCAmelCase_					(		self		)		->    List[str]:






        """simple docstring"""





        def check_hidden_states_output(lowercase__  ,  lowercase__  ,  lowercase__		):
              _snake_case		:						List[Any]         =  model_class(lowercase__		)

              _snake_case		:						Dict         =  model(**self._prepare_for_class(lowercase__  ,  lowercase__		)		)
              _snake_case		:						str         =  outputs.encoder_hidden_states if config.is_encoder_decoder else outputs.hidden_states

              _snake_case		:						List[Any]         =  self.model_tester.num_stages
              self.assertEqual(len(lowercase__		)  ,  expected_num_stages + 1		)

              # ConvNext's feature maps are of shape (batch_size, num_channels, height, width)
              self.assertListEqual(
                  list(hidden_states[0].shape[-2:]		)  ,  [self.model_tester.image_size // 4, self.model_tester.image_size // 4]  ,  )

        _snake_case  ,				_snake_case		:						Optional[Any]         =  self.model_tester.prepare_config_and_inputs_for_common()

        for model_class in self.all_model_classes:
              _snake_case		:						int         =  True
              check_hidden_states_output(lowercase__  ,  lowercase__  ,  lowercase__		)

              # check that output_hidden_states also work using config
              del inputs_dict["output_hidden_states"]
              _snake_case		:						Any         =  True

              check_hidden_states_output(lowercase__  ,  lowercase__  ,  lowercase__		)







  def 					UpperCAmelCase_					(		self		)		->    Any:






        """simple docstring"""





        _snake_case  ,				_snake_case		:						Dict         =  self.model_tester.prepare_config_and_inputs_for_common()

        def check_equivalence(lowercase__  ,  lowercase__  ,  lowercase__  ,  lowercase__={}		):
              _snake_case		:						Tuple         =  model(lowercase__  ,  return_dict=lowercase__  ,  **lowercase__		)
              _snake_case		:						Any         =  model(lowercase__  ,  return_dict=lowercase__  ,  **lowercase__		).to_tuple()

              def recursive_check(lowercase__  ,  lowercase__		):
                    if isinstance(lowercase__  ,  (List, Tuple)		):
                          for tuple_iterable_value, dict_iterable_value in zip(lowercase__  ,  lowercase__		):
                                recursive_check(lowercase__  ,  lowercase__		)
                    elif tuple_object is None:
                          return
                    else:
                          self.assertTrue(
                              all(tf.equal(lowercase__  ,  lowercase__		)		)  ,  msg=(
                                  '''Tuple and dict output are not equal. Difference:'''
                                  F''' {tf.math.reduce_max(tf.abs(tuple_object - dict_object		)		)}'''
                              )  ,  )

                    recursive_check(lowercase__  ,  lowercase__		)

        for model_class in self.all_model_classes:
              _snake_case		:						Dict         =  model_class(lowercase__		)

              _snake_case		:						Union[str, Any]         =  self._prepare_for_class(lowercase__  ,  lowercase__		)
              _snake_case		:						str         =  self._prepare_for_class(lowercase__  ,  lowercase__		)
              check_equivalence(lowercase__  ,  lowercase__  ,  lowercase__		)

              _snake_case		:						List[Any]         =  self._prepare_for_class(lowercase__  ,  lowercase__  ,  return_labels=lowercase__		)
              _snake_case		:						Any         =  self._prepare_for_class(lowercase__  ,  lowercase__  ,  return_labels=lowercase__		)
              check_equivalence(lowercase__  ,  lowercase__  ,  lowercase__		)

              _snake_case		:						List[str]         =  self._prepare_for_class(lowercase__  ,  lowercase__		)
              _snake_case		:						Union[str, Any]         =  self._prepare_for_class(lowercase__  ,  lowercase__		)
              check_equivalence(lowercase__  ,  lowercase__  ,  lowercase__  ,  {'''output_hidden_states''': True}		)

              _snake_case		:						Optional[int]         =  self._prepare_for_class(lowercase__  ,  lowercase__  ,  return_labels=lowercase__		)
              _snake_case		:						Any         =  self._prepare_for_class(lowercase__  ,  lowercase__  ,  return_labels=lowercase__		)
              check_equivalence(lowercase__  ,  lowercase__  ,  lowercase__  ,  {'''output_hidden_states''': True}		)







  def 					UpperCAmelCase_					(		self		)		->    Union[str, Any]:






        """simple docstring"""





        _snake_case		:						str         =  self.model_tester.prepare_config_and_inputs()
        self.model_tester.create_and_check_for_image_classification(*lowercase__		)







  @slow
  def 					UpperCAmelCase_					(		self		)		->    Optional[Any]:






        """simple docstring"""





        _snake_case		:						List[Any]         =  TFConvNextModel.from_pretrained('''facebook/convnext-tiny-224'''		)
        self.assertIsNotNone(lowercase__		)




def  _a     (				):





      """simple docstring"""



      _snake_case		:						List[str]         =  Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png'''						)
      return image





@require_tf
@require_vision
class lowerCamelCase    (unittest.TestCase       ):







  @cached_property
  def 					UpperCAmelCase_					(		self		)		->    Optional[int]:






        """simple docstring"""





        return ConvNextImageProcessor.from_pretrained('''facebook/convnext-tiny-224'''		) if is_vision_available() else None







  @slow
  def 					UpperCAmelCase_					(		self		)		->    Any:






        """simple docstring"""





        _snake_case		:						Dict         =  TFConvNextForImageClassification.from_pretrained('''facebook/convnext-tiny-224'''		)

        _snake_case		:						str         =  self.default_image_processor
        _snake_case		:						Optional[int]         =  prepare_img()
        _snake_case		:						str         =  image_processor(images=lowercase__  ,  return_tensors='''tf'''		)

        # forward pass
        _snake_case		:						Union[str, Any]         =  model(**lowercase__		)

        # verify the logits
        _snake_case		:						Union[str, Any]         =  tf.TensorShape((1, 1_000)		)
        self.assertEqual(outputs.logits.shape  ,  lowercase__		)

        _snake_case		:						List[str]         =  tf.constant([-0.0_260, -0.4_739, 0.1_911]		)

        tf.debugging.assert_near(outputs.logits[0, :3]  ,  lowercase__  ,  atol=1E-4		)


