




from __future__ import annotations

import os
import tempfile
import unittest

from transformers import ConvBertConfig, is_tf_available
from transformers.testing_utils import require_tf, slow

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
	import tensorflow as tf

	from transformers import (
	    TFConvBertForMaskedLM,
	    TFConvBertForMultipleChoice,
	    TFConvBertForQuestionAnswering,
	    TFConvBertForSequenceClassification,
	    TFConvBertForTokenClassification,
	    TFConvBertModel,
	)







class   A:



	'''simple docstring'''


	def __init__(    self :  Any						,							A_ :  Optional[Any]						,							A_ :  Optional[Any]=13						,							A_ :  int=7						,							A_ :  int=True						,							A_ :  int=True						,							A_ :  str=True						,							A_ :  int=True						,							A_ :  Optional[Any]=99						,							A_ :  Union[str, Any]=32						,							A_ :  str=2						,							A_ :  int=4						,							A_ :  Any=37						,							A_ :  Union[str, Any]="gelu"						,							A_ :  Union[str, Any]=0.1						,							A_ :  Any=0.1						,							A_ :  Dict=512						,							A_ :  str=16						,							A_ :  List[str]=2						,							A_ :  Dict=0.02						,							A_ :  Any=3						,							A_ :  str=4						,							A_ :  Tuple=None						,							)       ->     Optional[Any]:

							"""simple docstring"""






							lowerCamelCase_							=   parent
							lowerCamelCase_							=   13
							lowerCamelCase_							=   7
							lowerCamelCase_							=   True
							lowerCamelCase_							=   True
							lowerCamelCase_							=   True
							lowerCamelCase_							=   True
							lowerCamelCase_							=   99
							lowerCamelCase_							=   384
							lowerCamelCase_							=   2
							lowerCamelCase_							=   4
							lowerCamelCase_							=   37
							lowerCamelCase_							=   'gelu'
							lowerCamelCase_							=   0.1
							lowerCamelCase_							=   0.1
							lowerCamelCase_							=   512
							lowerCamelCase_							=   16
							lowerCamelCase_							=   2
							lowerCamelCase_							=   0.02
							lowerCamelCase_							=   3
							lowerCamelCase_							=   4
							lowerCamelCase_							=   128
							lowerCamelCase_							=   2
							lowerCamelCase_							=   9
							lowerCamelCase_							=   1
							lowerCamelCase_							=   None

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

							"""simple docstring"""






							lowerCamelCase_							=   ids_tensor([self.batch_size, self.seq_length]						,							self.vocab_size  )

							lowerCamelCase_							=   None
							if self.use_input_mask:
													lowerCamelCase_							=   random_attention_mask([self.batch_size, self.seq_length]  )

							lowerCamelCase_							=   None
							if self.use_token_type_ids:
													lowerCamelCase_							=   ids_tensor([self.batch_size, self.seq_length]						,							self.type_vocab_size  )

							lowerCamelCase_							=   None
							lowerCamelCase_							=   None
							lowerCamelCase_							=   None
							if self.use_labels:
													lowerCamelCase_							=   ids_tensor([self.batch_size]						,							self.type_sequence_label_size  )
													lowerCamelCase_							=   ids_tensor([self.batch_size, self.seq_length]						,							self.num_labels  )
													lowerCamelCase_							=   ids_tensor([self.batch_size]						,							self.num_choices  )

							lowerCamelCase_							=   ConvBertConfig(
							    vocab_size=self.vocab_size						,							hidden_size=self.hidden_size						,							num_hidden_layers=self.num_hidden_layers						,							num_attention_heads=self.num_attention_heads						,							intermediate_size=self.intermediate_size						,							hidden_act=self.hidden_act						,							hidden_dropout_prob=self.hidden_dropout_prob						,							attention_probs_dropout_prob=self.attention_probs_dropout_prob						,							max_position_embeddings=self.max_position_embeddings						,							type_vocab_size=self.type_vocab_size						,							initializer_range=self.initializer_range						,							return_dict=A_						,							)

							return config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels

	def     a__			(    self :  str						,							A_ :  Union[str, Any]						,							A_ :  Any						,							A_ :  Any						,							A_ :  List[str]						,							A_ :  Tuple						,							A_ :  str						,							A_ :  Dict  )       ->     str:

							"""simple docstring"""






							lowerCamelCase_							=   TFConvBertModel(config=A_  )
							lowerCamelCase_							=   {'input_ids': input_ids, 'attention_mask': input_mask, 'token_type_ids': token_type_ids}

							lowerCamelCase_							=   [input_ids, input_mask]
							lowerCamelCase_							=   model(A_  )

							lowerCamelCase_							=   model(A_  )

							self.parent.assertEqual(result.last_hidden_state.shape						,							(self.batch_size, self.seq_length, self.hidden_size)  )

	def     a__			(    self :  str						,							A_ :  Tuple						,							A_ :  List[str]						,							A_ :  str						,							A_ :  int						,							A_ :  Union[str, Any]						,							A_ :  Any						,							A_ :  Optional[int]  )       ->     List[str]:

							"""simple docstring"""






							lowerCamelCase_							=   TFConvBertForMaskedLM(config=A_  )
							lowerCamelCase_							=   {
							    'input_ids': input_ids,
							    'attention_mask': input_mask,
							    'token_type_ids': token_type_ids,
							}
							lowerCamelCase_							=   model(A_  )
							self.parent.assertEqual(result.logits.shape						,							(self.batch_size, self.seq_length, self.vocab_size)  )

	def     a__			(    self :  Dict						,							A_ :  Tuple						,							A_ :  Tuple						,							A_ :  Optional[int]						,							A_ :  Dict						,							A_ :  str						,							A_ :  Union[str, Any]						,							A_ :  List[str]  )       ->     Union[str, Any]:

							"""simple docstring"""






							lowerCamelCase_							=   self.num_labels
							lowerCamelCase_							=   TFConvBertForSequenceClassification(config=A_  )
							lowerCamelCase_							=   {
							    'input_ids': input_ids,
							    'attention_mask': input_mask,
							    'token_type_ids': token_type_ids,
							}

							lowerCamelCase_							=   model(A_  )
							self.parent.assertEqual(result.logits.shape						,							(self.batch_size, self.num_labels)  )

	def     a__			(    self :  Union[str, Any]						,							A_ :  List[str]						,							A_ :  int						,							A_ :  Dict						,							A_ :  Optional[int]						,							A_ :  Union[str, Any]						,							A_ :  Optional[int]						,							A_ :  int  )       ->     Optional[int]:

							"""simple docstring"""






							lowerCamelCase_							=   self.num_choices
							lowerCamelCase_							=   TFConvBertForMultipleChoice(config=A_  )
							lowerCamelCase_							=   tf.tile(tf.expand_dims(A_						,							1  )						,							(1, self.num_choices, 1)  )
							lowerCamelCase_							=   tf.tile(tf.expand_dims(A_						,							1  )						,							(1, self.num_choices, 1)  )
							lowerCamelCase_							=   tf.tile(tf.expand_dims(A_						,							1  )						,							(1, self.num_choices, 1)  )
							lowerCamelCase_							=   {
							    'input_ids': multiple_choice_inputs_ids,
							    'attention_mask': multiple_choice_input_mask,
							    'token_type_ids': multiple_choice_token_type_ids,
							}
							lowerCamelCase_							=   model(A_  )
							self.parent.assertEqual(result.logits.shape						,							(self.batch_size, self.num_choices)  )

	def     a__			(    self :  int						,							A_ :  Optional[int]						,							A_ :  Any						,							A_ :  Optional[int]						,							A_ :  int						,							A_ :  List[Any]						,							A_ :  Union[str, Any]						,							A_ :  Optional[Any]  )       ->     List[Any]:

							"""simple docstring"""






							lowerCamelCase_							=   self.num_labels
							lowerCamelCase_							=   TFConvBertForTokenClassification(config=A_  )
							lowerCamelCase_							=   {
							    'input_ids': input_ids,
							    'attention_mask': input_mask,
							    'token_type_ids': token_type_ids,
							}
							lowerCamelCase_							=   model(A_  )
							self.parent.assertEqual(result.logits.shape						,							(self.batch_size, self.seq_length, self.num_labels)  )

	def     a__			(    self :  Optional[Any]						,							A_ :  Dict						,							A_ :  Optional[int]						,							A_ :  List[str]						,							A_ :  str						,							A_ :  Dict						,							A_ :  str						,							A_ :  Any  )       ->     Any:

							"""simple docstring"""






							lowerCamelCase_							=   TFConvBertForQuestionAnswering(config=A_  )
							lowerCamelCase_							=   {
							    'input_ids': input_ids,
							    'attention_mask': input_mask,
							    'token_type_ids': token_type_ids,
							}

							lowerCamelCase_							=   model(A_  )
							self.parent.assertEqual(result.start_logits.shape						,							(self.batch_size, self.seq_length)  )
							self.parent.assertEqual(result.end_logits.shape						,							(self.batch_size, self.seq_length)  )





	def     a__			(    self :  int  )       ->     Tuple:

							"""simple docstring"""






							lowerCamelCase_							=   self.prepare_config_and_inputs()
							(
							    (
							    lowerCamelCase_    
							)					,    (
							    lowerCamelCase_    
							)					,    (
							    lowerCamelCase_    
							)					,    (
							    lowerCamelCase_    
							)					,    (
							    lowerCamelCase_    
							)					,    (
							    lowerCamelCase_    
							)					,    (
							    lowerCamelCase_    
							)					,        
							)							=   config_and_inputs
							lowerCamelCase_							=   {'input_ids': input_ids, 'token_type_ids': token_type_ids, 'attention_mask': input_mask}
							return config, inputs_dict







@require_tf
class   A(						UpperCamelCase							,				UpperCamelCase							,				unittest.TestCase       ):



	'''simple docstring'''


	UpperCamelCase						       =						(
	    (
	        TFConvBertModel,
	        TFConvBertForMaskedLM,
	        TFConvBertForQuestionAnswering,
	        TFConvBertForSequenceClassification,
	        TFConvBertForTokenClassification,
	        TFConvBertForMultipleChoice,
	    )
	    if is_tf_available()
	    else ()
	)
	UpperCamelCase						       =						(
	    {
	        '''feature-extraction''': TFConvBertModel,
	        '''fill-mask''': TFConvBertForMaskedLM,
	        '''question-answering''': TFConvBertForQuestionAnswering,
	        '''text-classification''': TFConvBertForSequenceClassification,
	        '''token-classification''': TFConvBertForTokenClassification,
	        '''zero-shot''': TFConvBertForSequenceClassification,
	    }
	    if is_tf_available()
	    else {}
	)
	UpperCamelCase						       =						False
	UpperCamelCase						       =						False
	UpperCamelCase						       =						False

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

							"""simple docstring"""






							lowerCamelCase_							=   TFConvBertModelTester(self  )
							lowerCamelCase_							=   ConfigTester(self						,							config_class=A_						,							hidden_size=37  )

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

							"""simple docstring"""






							self.config_tester.run_common_tests()

	def     a__			(    self :  str  )       ->     Optional[int]:

							"""simple docstring"""






							lowerCamelCase_							=   self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_model(*A_  )

	def     a__			(    self :  Tuple  )       ->     int:

							"""simple docstring"""






							lowerCamelCase_							=   self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_masked_lm(*A_  )

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

							"""simple docstring"""






							lowerCamelCase_							=   self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_multiple_choice(*A_  )

	def     a__			(    self :  Dict  )       ->     str:

							"""simple docstring"""






							lowerCamelCase_							=   self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_question_answering(*A_  )

	def     a__			(    self :  Dict  )       ->     Optional[Any]:

							"""simple docstring"""






							lowerCamelCase_							=   self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_sequence_classification(*A_  )

	def     a__			(    self :  str  )       ->     Dict:

							"""simple docstring"""






							lowerCamelCase_							=   self.model_tester.prepare_config_and_inputs()
							self.model_tester.create_and_check_for_token_classification(*A_  )

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

							"""simple docstring"""






							lowerCamelCase_					,    lowerCamelCase_							=   self.model_tester.prepare_config_and_inputs_for_common()
							lowerCamelCase_							=   True
							lowerCamelCase_							=   True

							if hasattr(A_						,							'use_cache'  ):
													lowerCamelCase_							=   True

							lowerCamelCase_							=   getattr(self.model_tester						,							'encoder_seq_length'						,							self.model_tester.seq_length  )
							lowerCamelCase_							=   getattr(self.model_tester						,							'key_length'						,							A_  )

							for model_class in self.all_model_classes:
													lowerCamelCase_							=   self._prepare_for_class(A_						,							A_  )
													lowerCamelCase_							=   model_class(A_  )
													lowerCamelCase_							=   len(model(A_  )  )

													with tempfile.TemporaryDirectory() as tmpdirname:
																			model.save_pretrained(A_						,							saved_model=A_  )
																			lowerCamelCase_							=   os.path.join(A_						,							'saved_model'						,							'1'  )
																			lowerCamelCase_							=   tf.keras.models.load_model(A_  )
																			lowerCamelCase_							=   model(A_  )

																			if self.is_encoder_decoder:
																									lowerCamelCase_							=   outputs['encoder_hidden_states']
																									lowerCamelCase_							=   outputs['encoder_attentions']
																			else:
																									lowerCamelCase_							=   outputs['hidden_states']
																									lowerCamelCase_							=   outputs['attentions']

																			self.assertEqual(len(A_  )						,							A_  )

																			lowerCamelCase_							=   getattr(
																			    self.model_tester						,							'expected_num_hidden_layers'						,							self.model_tester.num_hidden_layers + 1  )

																			self.assertEqual(len(A_  )						,							A_  )
																			self.assertListEqual(
																			    list(output_hidden_states[0].shape[-2:]  )						,							[self.model_tester.seq_length, self.model_tester.hidden_size]						,							)

																			self.assertEqual(len(A_  )						,							self.model_tester.num_hidden_layers  )
																			self.assertListEqual(
																			    list(output_attentions[0].shape[-3:]  )						,							[self.model_tester.num_attention_heads / 2, encoder_seq_length, encoder_key_length]						,							)

	@slow
	def     a__			(    self :  str  )       ->     Optional[int]:

							"""simple docstring"""






							lowerCamelCase_							=   TFConvBertModel.from_pretrained('YituTech/conv-bert-base'  )
							self.assertIsNotNone(A_  )





	def     a__			(    self :  Dict  )       ->     List[str]:

							"""simple docstring"""






							lowerCamelCase_					,    lowerCamelCase_							=   self.model_tester.prepare_config_and_inputs_for_common()
							lowerCamelCase_							=   True
							lowerCamelCase_							=   getattr(self.model_tester						,							'decoder_seq_length'						,							self.model_tester.seq_length  )
							lowerCamelCase_							=   getattr(self.model_tester						,							'encoder_seq_length'						,							self.model_tester.seq_length  )
							lowerCamelCase_							=   getattr(self.model_tester						,							'key_length'						,							A_  )
							lowerCamelCase_							=   getattr(self.model_tester						,							'key_length'						,							A_  )

							def check_decoder_attentions_output(A_ :  Tuple  ):
													lowerCamelCase_							=   len(A_  )
													self.assertEqual(out_len % 2						,							0  )
													lowerCamelCase_							=   outputs.decoder_attentions
													self.assertEqual(len(A_  )						,							self.model_tester.num_hidden_layers  )
													self.assertListEqual(
													    list(decoder_attentions[0].shape[-3:]  )						,							[self.model_tester.num_attention_heads / 2, decoder_seq_length, decoder_key_length]						,							)

							def check_encoder_attentions_output(A_ :  int  ):
													lowerCamelCase_							=   [
													    t.numpy() for t in (outputs.encoder_attentions if config.is_encoder_decoder else outputs.attentions)
													]
													self.assertEqual(len(A_  )						,							self.model_tester.num_hidden_layers  )
													self.assertListEqual(
													    list(attentions[0].shape[-3:]  )						,							[self.model_tester.num_attention_heads / 2, encoder_seq_length, encoder_key_length]						,							)

							for model_class in self.all_model_classes:
													lowerCamelCase_							=   True
													lowerCamelCase_							=   False
													lowerCamelCase_							=   model_class(A_  )
													lowerCamelCase_							=   model(self._prepare_for_class(A_						,							A_  )  )
													lowerCamelCase_							=   len(A_  )
													self.assertEqual(config.output_hidden_states						,							A_  )
													check_encoder_attentions_output(A_  )

													if self.is_encoder_decoder:
																			lowerCamelCase_							=   model_class(A_  )
																			lowerCamelCase_							=   model(self._prepare_for_class(A_						,							A_  )  )
																			self.assertEqual(config.output_hidden_states						,							A_  )
																			check_decoder_attentions_output(A_  )

													# Check that output attentions can also be changed via the config
													del inputs_dict["output_attentions"]
													lowerCamelCase_							=   True
													lowerCamelCase_							=   model_class(A_  )
													lowerCamelCase_							=   model(self._prepare_for_class(A_						,							A_  )  )
													self.assertEqual(config.output_hidden_states						,							A_  )
													check_encoder_attentions_output(A_  )

													# Check attention is always last and order is fine
													lowerCamelCase_							=   True
													lowerCamelCase_							=   True
													lowerCamelCase_							=   model_class(A_  )
													lowerCamelCase_							=   model(self._prepare_for_class(A_						,							A_  )  )

													self.assertEqual(out_len + (2 if self.is_encoder_decoder else 1)						,							len(A_  )  )
													self.assertEqual(model.config.output_hidden_states						,							A_  )
													check_encoder_attentions_output(A_  )







@require_tf
class   A(						unittest.TestCase       ):



	'''simple docstring'''


	@slow
	def     a__			(    self :  Tuple  )       ->     List[Any]:

							"""simple docstring"""






							lowerCamelCase_							=   TFConvBertModel.from_pretrained('YituTech/conv-bert-base'  )
							lowerCamelCase_							=   tf.constant([[0, 1, 2, 3, 4, 5]]  )
							lowerCamelCase_							=   model(A_  )[0]

							lowerCamelCase_							=   [1, 6, 768]
							self.assertEqual(output.shape						,							A_  )

							lowerCamelCase_							=   tf.constant(
							    [
							        [
							            [-0.03475493, -0.4686034, -0.30638832],
							            [0.22637248, -0.26988646, -0.7423424],
							            [0.10324868, -0.45013508, -0.58280784],
							        ]
							    ]  )
							tf.debugging.assert_near(output[:, :3, :3]						,							A_						,							atol=1E-4  )









import warnings
from typing import List

import numpy as np

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding
from ...utils import is_flax_available, is_tf_available, is_torch_available







class   A(						UpperCamelCase       ):



 '''simple docstring'''


 UpperCamelCase						       =						['''image_processor''', '''tokenizer''']
 UpperCamelCase						       =						'''OwlViTImageProcessor'''
 UpperCamelCase						       =						('''CLIPTokenizer''', '''CLIPTokenizerFast''')

 def __init__(    self :  Optional[Any]						,							A_ :  Tuple=None						,							A_ :  Tuple=None						,							**A_ :  List[str]  )       ->     Any:

       """simple docstring"""






       lowerCamelCase_							=   None
       if "feature_extractor" in kwargs:
             warnings.warn(
                 'The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`'
                 ' instead.'						,							A_						,							)
             lowerCamelCase_							=   kwargs.pop('feature_extractor'  )

       lowerCamelCase_							=   image_processor if image_processor is not None else feature_extractor
       if image_processor is None:
             raise ValueError('You need to specify an `image_processor`.'  )
       if tokenizer is None:
             raise ValueError('You need to specify a `tokenizer`.'  )

       super().__init__(A_						,							A_  )

 def __call__(    self :  List[str]						,							A_ :  List[str]=None						,							A_ :  List[Any]=None						,							A_ :  Dict=None						,							A_ :  Tuple="max_length"						,							A_ :  int="np"						,							**A_ :  Union[str, Any]  )       ->     Union[str, Any]:

       """simple docstring"""






       if text is None and query_images is None and images is None:
             raise ValueError(
                 'You have to specify at least one text or query image or image. All three cannot be none.'  )

       if text is not None:
             if isinstance(A_						,							A_  ) or (isinstance(A_						,							A_  ) and not isinstance(text[0]						,							A_  )):
                   lowerCamelCase_							=   [self.tokenizer(A_						,							padding=A_						,							return_tensors=A_						,							**A_  )]

             elif isinstance(A_						,							A_  ) and isinstance(text[0]						,							A_  ):
                   lowerCamelCase_							=   []

                   # Maximum number of queries across batch
                   lowerCamelCase_							=   max([len(A_  ) for t in text]  )

                   # Pad all batch samples to max number of text queries
                   for t in text:
                         if len(A_  ) != max_num_queries:
                               lowerCamelCase_							=   t + [' '] * (max_num_queries - len(A_  ))

                         lowerCamelCase_							=   self.tokenizer(A_						,							padding=A_						,							return_tensors=A_						,							**A_  )
                         encodings.append(A_  )
             else:
                   raise TypeError('Input text should be a string, a list of strings or a nested list of strings'  )

             if return_tensors == "np":
                   lowerCamelCase_							=   np.concatenate([encoding['input_ids'] for encoding in encodings]						,							axis=0  )
                   lowerCamelCase_							=   np.concatenate([encoding['attention_mask'] for encoding in encodings]						,							axis=0  )

             elif return_tensors == "jax" and is_flax_available():
                   import jax.numpy as jnp

                   lowerCamelCase_							=   jnp.concatenate([encoding['input_ids'] for encoding in encodings]						,							axis=0  )
                   lowerCamelCase_							=   jnp.concatenate([encoding['attention_mask'] for encoding in encodings]						,							axis=0  )

             elif return_tensors == "pt" and is_torch_available():
                   import torch

                   lowerCamelCase_							=   torch.cat([encoding['input_ids'] for encoding in encodings]						,							dim=0  )
                   lowerCamelCase_							=   torch.cat([encoding['attention_mask'] for encoding in encodings]						,							dim=0  )

             elif return_tensors == "tf" and is_tf_available():
                   import tensorflow as tf

                   lowerCamelCase_							=   tf.stack([encoding['input_ids'] for encoding in encodings]						,							axis=0  )
                   lowerCamelCase_							=   tf.stack([encoding['attention_mask'] for encoding in encodings]						,							axis=0  )

             else:
                   raise ValueError('Target return tensor type could not be returned'  )

             lowerCamelCase_							=   BatchEncoding()
             lowerCamelCase_							=   input_ids
             lowerCamelCase_							=   attention_mask

       if query_images is not None:
             lowerCamelCase_							=   BatchEncoding()
             lowerCamelCase_							=   self.image_processor(
                 A_						,							return_tensors=A_						,							**A_  ).pixel_values
             lowerCamelCase_							=   query_pixel_values

       if images is not None:
             lowerCamelCase_							=   self.image_processor(A_						,							return_tensors=A_						,							**A_  )

       if text is not None and images is not None:
             lowerCamelCase_							=   image_features.pixel_values
             return encoding
       elif query_images is not None and images is not None:
             lowerCamelCase_							=   image_features.pixel_values
             return encoding
       elif text is not None or query_images is not None:
             return encoding
       else:
             return BatchEncoding(data=dict(**A_  )						,							tensor_type=A_  )

 def     a__			(    self :  Tuple						,							*A_ :  Dict						,							**A_ :  Dict  )       ->     Any:

       """simple docstring"""






       return self.image_processor.post_process(*A_						,							**A_  )

 def     a__			(    self :  List[str]						,							*A_ :  Any						,							**A_ :  List[Any]  )       ->     Optional[int]:

       """simple docstring"""






       return self.image_processor.post_process_object_detection(*A_						,							**A_  )

 def     a__			(    self :  Any						,							*A_ :  str						,							**A_ :  List[Any]  )       ->     Any:

       """simple docstring"""






       return self.image_processor.post_process_image_guided_detection(*A_						,							**A_  )

 def     a__			(    self :  Union[str, Any]						,							*A_ :  Any						,							**A_ :  Union[str, Any]  )       ->     str:

       """simple docstring"""






       return self.tokenizer.batch_decode(*A_						,							**A_  )

 def     a__			(    self :  Optional[int]						,							*A_ :  List[Any]						,							**A_ :  int  )       ->     int:

       """simple docstring"""






       return self.tokenizer.decode(*A_						,							**A_  )

 @property
 def     a__			(    self :  List[Any]  )       ->     List[Any]:

       """simple docstring"""






       warnings.warn(
           '`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.'						,							A_						,							)
       return self.image_processor_class





 @property
 def     a__			(    self :  str  )       ->     List[str]:

       """simple docstring"""






       warnings.warn(
           '`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.'						,							A_						,							)
       return self.image_processor



