

'''simple docstring'''







import inspect
import unittest

from transformers import MobileViTVaConfig
from transformers.testing_utils import require_torch, require_torch_multi_gpu, require_vision, slow, torch_device
from transformers.utils import cached_property, is_torch_available, is_vision_available

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


if is_torch_available():
      import torch

      from transformers import MobileViTVaForImageClassification, MobileViTVaForSemanticSegmentation, MobileViTVaModel
      from transformers.models.mobilevitva.modeling_mobilevitva import (
          MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST,
          make_divisible,
      )


if is_vision_available():
      from PIL import Image

      from transformers import MobileViTImageProcessor


class    A__ ( _snake_case     ):



    def    snake_case_     (   self    )  -> Any:





           '''simple docstring'''
           A_		   = self.config_class(**self.inputs_dict    )
           self.parent.assertTrue(hasattr(UpperCamelCase__						,			"""width_multiplier"""    )    )


class    A__ :



    def __init__(   self						,			UpperCamelCase__						,			UpperCamelCase__=13						,			UpperCamelCase__=64						,			UpperCamelCase__=2						,			UpperCamelCase__=3						,			UpperCamelCase__="swish"						,			UpperCamelCase__=3						,			UpperCamelCase__=32						,			UpperCamelCase__=0.1						,			UpperCamelCase__=0.02						,			UpperCamelCase__=True						,			UpperCamelCase__=True						,			UpperCamelCase__=10						,			UpperCamelCase__=None						,			UpperCamelCase__=0.25						,			UpperCamelCase__=0.0						,			UpperCamelCase__=0.0						,			)  -> Tuple:





           '''simple docstring'''
           A_		   = parent
           A_		   = batch_size
           A_		   = image_size
           A_		   = patch_size
           A_		   = num_channels
           A_		   = make_divisible(512 * width_multiplier						,			divisor=8    )
           A_		   = hidden_act
           A_		   = conv_kernel_size
           A_		   = output_stride
           A_		   = classifier_dropout_prob
           A_		   = use_labels
           A_		   = is_training
           A_		   = num_labels
           A_		   = initializer_range
           A_		   = scope
           A_		   = width_multiplier
           A_		   = ffn_dropout
           A_		   = attn_dropout



    def    snake_case_     (   self    )  -> int:





           '''simple docstring'''
           A_		   = floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]    )

           A_		   = None
           A_		   = None
           if self.use_labels:
                  A_		   = ids_tensor([self.batch_size]						,			self.num_labels    )
                  A_		   = ids_tensor([self.batch_size, self.image_size, self.image_size]						,			self.num_labels    )

           A_		   = self.get_config()

           return config, pixel_values, labels, pixel_labels



    def    snake_case_     (   self    )  -> Dict:





           '''simple docstring'''
           return MobileViTVaConfig(
               image_size=self.image_size						,			patch_size=self.patch_size						,			num_channels=self.num_channels						,			hidden_act=self.hidden_act						,			conv_kernel_size=self.conv_kernel_size						,			output_stride=self.output_stride						,			classifier_dropout_prob=self.classifier_dropout_prob						,			initializer_range=self.initializer_range						,			width_multiplier=self.width_multiplier						,			ffn_dropout=self.ffn_dropout_prob						,			attn_dropout=self.attn_dropout_prob						,			)



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





           '''simple docstring'''
           A_		   = MobileViTVaModel(config=UpperCamelCase__    )
           model.to(UpperCamelCase__    )
           model.eval()
           A_		   = model(UpperCamelCase__    )
           self.parent.assertEqual(
               result.last_hidden_state.shape						,			(
                   self.batch_size,
                   self.last_hidden_size,
                   self.image_size // self.output_stride,
                   self.image_size // self.output_stride,
               )						,			)



    def    snake_case_     (   self						,			UpperCamelCase__						,			UpperCamelCase__						,			UpperCamelCase__						,			UpperCamelCase__    )  -> Dict:





           '''simple docstring'''
           A_		   = self.num_labels
           A_		   = MobileViTVaForImageClassification(UpperCamelCase__    )
           model.to(UpperCamelCase__    )
           model.eval()
           A_		   = model(UpperCamelCase__						,			labels=UpperCamelCase__    )
           self.parent.assertEqual(result.logits.shape						,			(self.batch_size, self.num_labels)    )



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





           '''simple docstring'''
           A_		   = self.num_labels
           A_		   = MobileViTVaForSemanticSegmentation(UpperCamelCase__    )
           model.to(UpperCamelCase__    )
           model.eval()
           A_		   = model(UpperCamelCase__    )
           self.parent.assertEqual(
               result.logits.shape						,			(
                   self.batch_size,
                   self.num_labels,
                   self.image_size // self.output_stride,
                   self.image_size // self.output_stride,
               )						,			)
           A_		   = model(UpperCamelCase__						,			labels=UpperCamelCase__    )
           self.parent.assertEqual(
               result.logits.shape						,			(
                   self.batch_size,
                   self.num_labels,
                   self.image_size // self.output_stride,
                   self.image_size // self.output_stride,
               )						,			)







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





           '''simple docstring'''
           A_		   = self.prepare_config_and_inputs()
           A_   ,     A_   ,     A_   ,     A_		   = config_and_inputs
           A_		   = {"""pixel_values""": pixel_values}
           return config, inputs_dict


@require_torch
class    A__ ( _snake_case  ,  _snake_case  ,  unittest.TestCase     ):
    lowercase		   =						(
        (MobileViTVaModel, MobileViTVaForImageClassification, MobileViTVaForSemanticSegmentation)
        if is_torch_available()
        else ()
    )

    lowercase		   =						(
        {
            "feature-extraction": MobileViTVaModel,
            "image-classification": MobileViTVaForImageClassification,
            "image-segmentation": MobileViTVaForSemanticSegmentation,
        }
        if is_torch_available()
        else {}
    )

    lowercase		   =						False
    lowercase		   =						False
    lowercase		   =						False
    lowercase		   =						False



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





           '''simple docstring'''
           A_		   = MobileViTVaModelTester(self    )
           A_		   = MobileViTVaConfigTester(self						,			config_class=UpperCamelCase__						,			has_text_modality=UpperCamelCase__    )



    def    snake_case_     (   self    )  -> List[Any]:





           '''simple docstring'''
           self.config_tester.run_common_tests()



    @unittest.skip(reason="""MobileViTV2 does not use inputs_embeds"""    )
    def    snake_case_     (   self    )  -> Union[str, Any]:





           '''simple docstring'''
           pass



    @unittest.skip(reason="""MobileViTV2 does not support input and output embeddings"""    )
    def    snake_case_     (   self    )  -> Optional[Any]:





           '''simple docstring'''
           pass



    @unittest.skip(reason="""MobileViTV2 does not output attentions"""    )
    def    snake_case_     (   self    )  -> Optional[int]:





           '''simple docstring'''
           pass



    @require_torch_multi_gpu
    @unittest.skip(reason="""Got `CUDA error: misaligned address` for tests after this one being run."""    )
    def    snake_case_     (   self    )  -> Optional[int]:





           '''simple docstring'''
           pass



    @unittest.skip("""Will be fixed soon by reducing the size of the model used for common tests."""    )
    def    snake_case_     (   self    )  -> Union[str, Any]:





           '''simple docstring'''
           pass



    def    snake_case_     (   self    )  -> Optional[int]:





           '''simple docstring'''
           A_   ,     A_		   = self.model_tester.prepare_config_and_inputs_for_common()

           for model_class in self.all_model_classes:
                  A_		   = model_class(UpperCamelCase__    )
                  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]						,			UpperCamelCase__    )



    def    snake_case_     (   self    )  -> Optional[int]:





           '''simple docstring'''
           A_		   = self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_model(*UpperCamelCase__    )



    def    snake_case_     (   self    )  -> str:





           '''simple docstring'''
           def check_hidden_states_output(UpperCamelCase__						,			UpperCamelCase__						,			UpperCamelCase__    ):
                  A_		   = model_class(UpperCamelCase__    )
                  model.to(UpperCamelCase__    )
                  model.eval()

                  with torch.no_grad():
                         A_		   = model(**self._prepare_for_class(UpperCamelCase__						,			UpperCamelCase__    )    )

                  A_		   = outputs.hidden_states

                  A_		   = 5
                  self.assertEqual(len(UpperCamelCase__    )						,			UpperCamelCase__    )

                  # MobileViTV2's feature maps are of shape (batch_size, num_channels, height, width)
                  # with the width and height being successively divided by 2.
                  A_		   = 2
                  for i in range(len(UpperCamelCase__    )    ):
                         self.assertListEqual(
                             list(hidden_states[i].shape[-2:]    )						,			[self.model_tester.image_size // divisor, self.model_tester.image_size // divisor]						,			)
                         divisor *= 2

                  self.assertEqual(self.model_tester.output_stride						,			divisor // 2    )

           A_   ,     A_		   = self.model_tester.prepare_config_and_inputs_for_common()

           for model_class in self.all_model_classes:
                  A_		   = True
                  check_hidden_states_output(UpperCamelCase__						,			UpperCamelCase__						,			UpperCamelCase__    )

                  # check that output_hidden_states also work using config
                  del inputs_dict["output_hidden_states"]
                  A_		   = True

                  check_hidden_states_output(UpperCamelCase__						,			UpperCamelCase__						,			UpperCamelCase__    )



    def    snake_case_     (   self    )  -> Optional[Any]:





           '''simple docstring'''
           A_		   = self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_for_image_classification(*UpperCamelCase__    )



    def    snake_case_     (   self    )  -> Optional[int]:





           '''simple docstring'''
           A_		   = self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_for_semantic_segmentation(*UpperCamelCase__    )







    @slow
    def    snake_case_     (   self    )  -> List[str]:





           '''simple docstring'''
           for model_name in MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
                  A_		   = MobileViTVaModel.from_pretrained(UpperCamelCase__    )
                  self.assertIsNotNone(UpperCamelCase__    )

def  UpperCAmelCase__      ( )     ->     List[Any]:
       A_		   = Image.open("""./tests/fixtures/tests_samples/COCO/000000039769.png"""			)
       return image







@require_torch
@require_vision
class    A__ ( unittest.TestCase     ):



    @cached_property
    def    snake_case_     (   self    )  -> str:





           '''simple docstring'''
           return (
               MobileViTImageProcessor.from_pretrained("""apple/mobilevitv2-1.0-imagenet1k-256"""    )
               if is_vision_available()
               else None
           )



    @slow
    def    snake_case_     (   self    )  -> Union[str, Any]:





           '''simple docstring'''
           A_		   = MobileViTVaForImageClassification.from_pretrained("""apple/mobilevitv2-1.0-imagenet1k-256"""    ).to(
               UpperCamelCase__    )

           A_		   = self.default_image_processor
           A_		   = prepare_img()
           A_		   = image_processor(images=UpperCamelCase__						,			return_tensors="""pt"""    ).to(UpperCamelCase__    )

           # forward pass
           with torch.no_grad():
                  A_		   = model(**UpperCamelCase__    )

           # verify the logits
           A_		   = torch.Size((1, 1000)    )
           self.assertEqual(outputs.logits.shape						,			UpperCamelCase__    )

           A_		   = torch.tensor([-1.6_3_3_6e0_0, -7.3_2_0_4e-0_2, -5.1_8_8_3e-0_1]    ).to(UpperCamelCase__    )

           self.assertTrue(torch.allclose(outputs.logits[0, :3]						,			UpperCamelCase__						,			atol=1e-4    )    )



    @slow
    def    snake_case_     (   self    )  -> Union[str, Any]:





           '''simple docstring'''
           A_		   = MobileViTVaForSemanticSegmentation.from_pretrained("""shehan97/mobilevitv2-1.0-voc-deeplabv3"""    )
           A_		   = model.to(UpperCamelCase__    )

           A_		   = MobileViTImageProcessor.from_pretrained("""shehan97/mobilevitv2-1.0-voc-deeplabv3"""    )

           A_		   = prepare_img()
           A_		   = image_processor(images=UpperCamelCase__						,			return_tensors="""pt"""    ).to(UpperCamelCase__    )

           # forward pass
           with torch.no_grad():
                  A_		   = model(**UpperCamelCase__    )
           A_		   = outputs.logits

           # verify the logits
           A_		   = torch.Size((1, 21, 32, 32)    )
           self.assertEqual(logits.shape						,			UpperCamelCase__    )

           A_		   = torch.tensor(
               [
                   [[7.0863, 7.1525, 6.8201], [6.6931, 6.8770, 6.8933], [6.2978, 7.0366, 6.9636]],
                   [[-3.7134, -3.6712, -3.6675], [-3.5825, -3.3549, -3.4777], [-3.3435, -3.3979, -3.2857]],
                   [[-2.9329, -2.8003, -2.7369], [-3.0564, -2.4780, -2.0207], [-2.6889, -1.9298, -1.7640]],
               ]						,			device=UpperCamelCase__						,			)

           self.assertTrue(torch.allclose(logits[0, :3, :3, :3]						,			UpperCamelCase__						,			atol=1e-4    )    )







    @slow
    def    snake_case_     (   self    )  -> Dict:





           '''simple docstring'''
           A_		   = MobileViTVaForSemanticSegmentation.from_pretrained("""shehan97/mobilevitv2-1.0-voc-deeplabv3"""    )
           A_		   = model.to(UpperCamelCase__    )

           A_		   = MobileViTImageProcessor.from_pretrained("""shehan97/mobilevitv2-1.0-voc-deeplabv3"""    )

           A_		   = prepare_img()
           A_		   = image_processor(images=UpperCamelCase__						,			return_tensors="""pt"""    ).to(UpperCamelCase__    )

           # forward pass
           with torch.no_grad():
                  A_		   = model(**UpperCamelCase__    )

           A_		   = outputs.logits.detach().cpu()

           A_		   = image_processor.post_process_semantic_segmentation(outputs=UpperCamelCase__						,			target_sizes=[(50, 60)]    )
           A_		   = torch.Size((50, 60)    )
           self.assertEqual(segmentation[0].shape						,			UpperCamelCase__    )

           A_		   = image_processor.post_process_semantic_segmentation(outputs=UpperCamelCase__    )
           A_		   = torch.Size((32, 32)    )
           self.assertEqual(segmentation[0].shape						,			UpperCamelCase__    )



'''simple docstring'''







import json
import os
import shutil
import tempfile
import unittest

import numpy as np
import pytest

from transformers import CLIPTokenizer, CLIPTokenizerFast
from transformers.models.clip.tokenization_clip import VOCAB_FILES_NAMES
from transformers.testing_utils import require_vision
from transformers.utils import IMAGE_PROCESSOR_NAME, is_vision_available


if is_vision_available():
      from PIL import Image

      from transformers import CLIPImageProcessor, CLIPProcessor


@require_vision
class    A__ ( unittest.TestCase     ):



    def    snake_case_     (   self    )  -> Any:





           '''simple docstring'''
           A_		   = tempfile.mkdtemp()

           # fmt: off
           A_		   = ["""l""", """o""", """w""", """e""", """r""", """s""", """t""", """i""", """d""", """n""", """lo""", """l</w>""", """w</w>""", """r</w>""", """t</w>""", """low</w>""", """er</w>""", """lowest</w>""", """newer</w>""", """wider""", """<unk>""", """<|startoftext|>""", """<|endoftext|>"""]
           # fmt: on
           A_		   = dict(zip(UpperCamelCase__						,			range(len(UpperCamelCase__    )    )    )    )
           A_		   = ["""#version: 0.2""", """l o""", """lo w</w>""", """e r</w>""", """"""]
           A_		   = {"""unk_token""": """<unk>"""}

           A_		   = os.path.join(self.tmpdirname						,			VOCAB_FILES_NAMES["""vocab_file"""]    )
           A_		   = os.path.join(self.tmpdirname						,			VOCAB_FILES_NAMES["""merges_file"""]    )
           with open(self.vocab_file						,			"""w"""						,			encoding="""utf-8"""    ) as fp:
                  fp.write(json.dumps(UpperCamelCase__    ) + """\n"""    )
           with open(self.merges_file						,			"""w"""						,			encoding="""utf-8"""    ) as fp:
                  fp.write("""\n""".join(UpperCamelCase__    )    )

           A_		   = {
               """do_resize""": True,
               """size""": 20,
               """do_center_crop""": True,
               """crop_size""": 18,
               """do_normalize""": True,
               """image_mean""": [0.48145466, 0.4578275, 0.40821073],
               """image_std""": [0.26862954, 0.26130258, 0.27577711],
           }
           A_		   = os.path.join(self.tmpdirname						,			UpperCamelCase__    )
           with open(self.image_processor_file						,			"""w"""						,			encoding="""utf-8"""    ) as fp:
                  json.dump(UpperCamelCase__						,			UpperCamelCase__    )



    def    snake_case_     (   self						,			**UpperCamelCase__    )  -> str:





           '''simple docstring'''
           return CLIPTokenizer.from_pretrained(self.tmpdirname						,			**UpperCamelCase__    )



    def    snake_case_     (   self						,			**UpperCamelCase__    )  -> Any:





           '''simple docstring'''
           return CLIPTokenizerFast.from_pretrained(self.tmpdirname						,			**UpperCamelCase__    )



    def    snake_case_     (   self						,			**UpperCamelCase__    )  -> Optional[Any]:





           '''simple docstring'''
           return CLIPImageProcessor.from_pretrained(self.tmpdirname						,			**UpperCamelCase__    )



    def    snake_case_     (   self    )  -> List[Any]:





           '''simple docstring'''
           shutil.rmtree(self.tmpdirname    )



    def    snake_case_     (   self    )  -> Any:





           '''simple docstring'''
           A_		   = [np.random.randint(255						,			size=(3, 30, 400)						,			dtype=np.uinta    )]

           A_		   = [Image.fromarray(np.moveaxis(UpperCamelCase__						,			0						,			-1    )    ) for x in image_inputs]

           return image_inputs



    def    snake_case_     (   self    )  -> Optional[int]:





           '''simple docstring'''
           A_		   = self.get_tokenizer()
           A_		   = self.get_rust_tokenizer()
           A_		   = self.get_image_processor()

           A_		   = CLIPProcessor(tokenizer=UpperCamelCase__						,			image_processor=UpperCamelCase__    )
           processor_slow.save_pretrained(self.tmpdirname    )
           A_		   = CLIPProcessor.from_pretrained(self.tmpdirname						,			use_fast=UpperCamelCase__    )

           A_		   = CLIPProcessor(tokenizer=UpperCamelCase__						,			image_processor=UpperCamelCase__    )
           processor_fast.save_pretrained(self.tmpdirname    )
           A_		   = CLIPProcessor.from_pretrained(self.tmpdirname    )

           self.assertEqual(processor_slow.tokenizer.get_vocab()						,			tokenizer_slow.get_vocab()    )
           self.assertEqual(processor_fast.tokenizer.get_vocab()						,			tokenizer_fast.get_vocab()    )
           self.assertEqual(tokenizer_slow.get_vocab()						,			tokenizer_fast.get_vocab()    )
           self.assertIsInstance(processor_slow.tokenizer						,			UpperCamelCase__    )
           self.assertIsInstance(processor_fast.tokenizer						,			UpperCamelCase__    )

           self.assertEqual(processor_slow.image_processor.to_json_string()						,			image_processor.to_json_string()    )
           self.assertEqual(processor_fast.image_processor.to_json_string()						,			image_processor.to_json_string()    )
           self.assertIsInstance(processor_slow.image_processor						,			UpperCamelCase__    )
           self.assertIsInstance(processor_fast.image_processor						,			UpperCamelCase__    )



    def    snake_case_     (   self    )  -> str:





           '''simple docstring'''
           A_		   = CLIPProcessor(tokenizer=self.get_tokenizer()						,			image_processor=self.get_image_processor()    )
           processor.save_pretrained(self.tmpdirname    )

           A_		   = self.get_tokenizer(bos_token="""(BOS)"""						,			eos_token="""(EOS)"""    )
           A_		   = self.get_image_processor(do_normalize=UpperCamelCase__						,			padding_value=1.0    )

           A_		   = CLIPProcessor.from_pretrained(
               self.tmpdirname						,			bos_token="""(BOS)"""						,			eos_token="""(EOS)"""						,			do_normalize=UpperCamelCase__						,			padding_value=1.0    )

           self.assertEqual(processor.tokenizer.get_vocab()						,			tokenizer_add_kwargs.get_vocab()    )
           self.assertIsInstance(processor.tokenizer						,			UpperCamelCase__    )

           self.assertEqual(processor.image_processor.to_json_string()						,			image_processor_add_kwargs.to_json_string()    )
           self.assertIsInstance(processor.image_processor						,			UpperCamelCase__    )



    def    snake_case_     (   self    )  -> str:





           '''simple docstring'''
           A_		   = self.get_image_processor()
           A_		   = self.get_tokenizer()

           A_		   = CLIPProcessor(tokenizer=UpperCamelCase__						,			image_processor=UpperCamelCase__    )

           A_		   = self.prepare_image_inputs()

           A_		   = image_processor(UpperCamelCase__						,			return_tensors="""np"""    )
           A_		   = processor(images=UpperCamelCase__						,			return_tensors="""np"""    )

           for key in input_image_proc.keys():
                  self.assertAlmostEqual(input_image_proc[key].sum()						,			input_processor[key].sum()						,			delta=1e-2    )



    def    snake_case_     (   self    )  -> Optional[int]:





           '''simple docstring'''
           A_		   = self.get_image_processor()
           A_		   = self.get_tokenizer()

           A_		   = CLIPProcessor(tokenizer=UpperCamelCase__						,			image_processor=UpperCamelCase__    )

           A_		   = """lower newer"""

           A_		   = processor(text=UpperCamelCase__    )

           A_		   = tokenizer(UpperCamelCase__    )

           for key in encoded_tok.keys():
                  self.assertListEqual(encoded_tok[key]						,			encoded_processor[key]    )



    def    snake_case_     (   self    )  -> Dict:





           '''simple docstring'''
           A_		   = self.get_image_processor()
           A_		   = self.get_tokenizer()

           A_		   = CLIPProcessor(tokenizer=UpperCamelCase__						,			image_processor=UpperCamelCase__    )

           A_		   = """lower newer"""
           A_		   = self.prepare_image_inputs()

           A_		   = processor(text=UpperCamelCase__						,			images=UpperCamelCase__    )

           self.assertListEqual(list(inputs.keys()    )						,			["""input_ids""", """attention_mask""", """pixel_values"""]    )

           # test if it raises when no input is passed
           with pytest.raises(UpperCamelCase__    ):
                  processor()



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





           '''simple docstring'''
           A_		   = self.get_image_processor()
           A_		   = self.get_tokenizer()

           A_		   = CLIPProcessor(tokenizer=UpperCamelCase__						,			image_processor=UpperCamelCase__    )

           A_		   = [[1, 4, 5, 8, 1, 0, 8], [3, 4, 3, 1, 1, 8, 9]]

           A_		   = processor.batch_decode(UpperCamelCase__    )
           A_		   = tokenizer.batch_decode(UpperCamelCase__    )

           self.assertListEqual(UpperCamelCase__						,			UpperCamelCase__    )







    def    snake_case_     (   self    )  -> Optional[int]:





           '''simple docstring'''
           A_		   = self.get_image_processor()
           A_		   = self.get_tokenizer()

           A_		   = CLIPProcessor(tokenizer=UpperCamelCase__						,			image_processor=UpperCamelCase__    )

           A_		   = """lower newer"""
           A_		   = self.prepare_image_inputs()

           A_		   = processor(text=UpperCamelCase__						,			images=UpperCamelCase__    )

           self.assertListEqual(list(inputs.keys()    )						,			processor.model_input_names    )
