





from __future__ import annotations

import copy
import inspect
import json
import math
import os
import tempfile
import unittest
from importlib import import_module

import numpy as np

from transformers import ViTMAEConfig
from transformers.file_utils import cached_property, is_tf_available, is_vision_available
from transformers.testing_utils import require_tf, require_vision, slow

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 TFViTMAEForPreTraining, TFViTMAEModel


if is_vision_available():
      from PIL import Image

      from transformers import ViTImageProcessor

class 	UpperCamelCase__				:



     '''simple docstring'''

     def __init__(							self		:					Optional[int]		,lowerCamelCase__		:					List[str]		,lowerCamelCase__		:					Tuple=13		,lowerCamelCase__		:					Optional[int]=30		,lowerCamelCase__		:					Optional[int]=2		,lowerCamelCase__		:					List[str]=3		,lowerCamelCase__		:					List[str]=True		,lowerCamelCase__		:					List[Any]=True		,lowerCamelCase__		:					Optional[int]=32		,lowerCamelCase__		:					Dict=2		,lowerCamelCase__		:					Any=4		,lowerCamelCase__		:					int=37		,lowerCamelCase__		:					Tuple="gelu"		,lowerCamelCase__		:					str=0.1		,lowerCamelCase__		:					Dict=0.1		,lowerCamelCase__		:					int=10		,lowerCamelCase__		:					List[Any]=0.02		,lowerCamelCase__		:					Optional[Any]=3		,lowerCamelCase__		:					Optional[int]=0.6		,lowerCamelCase__		:					Optional[int]=None		,)  ->	Optional[int]:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		parent
           SCREAMING_SNAKE_CASE	=		batch_size
           SCREAMING_SNAKE_CASE	=		image_size
           SCREAMING_SNAKE_CASE	=		patch_size
           SCREAMING_SNAKE_CASE	=		num_channels
           SCREAMING_SNAKE_CASE	=		is_training
           SCREAMING_SNAKE_CASE	=		use_labels
           SCREAMING_SNAKE_CASE	=		hidden_size
           SCREAMING_SNAKE_CASE	=		num_hidden_layers
           SCREAMING_SNAKE_CASE	=		num_attention_heads
           SCREAMING_SNAKE_CASE	=		intermediate_size
           SCREAMING_SNAKE_CASE	=		hidden_act
           SCREAMING_SNAKE_CASE	=		hidden_dropout_prob
           SCREAMING_SNAKE_CASE	=		attention_probs_dropout_prob
           SCREAMING_SNAKE_CASE	=		type_sequence_label_size
           SCREAMING_SNAKE_CASE	=		initializer_range
           SCREAMING_SNAKE_CASE	=		mask_ratio
           SCREAMING_SNAKE_CASE	=		scope

           # in ViTMAE, the expected sequence length = (num_patches + 1) * (1 - config.mask_ratio), rounded above
           # (we add 1 for the [CLS] token)
           SCREAMING_SNAKE_CASE	=		(image_size // patch_size) ** 2
           SCREAMING_SNAKE_CASE	=		int(math.ceil((1 - mask_ratio) * (num_patches + 1) ) )






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




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size] )

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

           SCREAMING_SNAKE_CASE	=		self.get_config()

           return config, pixel_values, labels






     def        SCREAMING_SNAKE_CASE__						(							self		:					Dict )  ->	str:




           '''simple docstring'''


           return ViTMAEConfig(
               image_size=self.image_size		,patch_size=self.patch_size		,num_channels=self.num_channels		,hidden_size=self.hidden_size		,num_hidden_layers=self.num_hidden_layers		,num_attention_heads=self.num_attention_heads		,intermediate_size=self.intermediate_size		,decoder_hidden_size=self.hidden_size		,decoder_num_hidden_layers=self.num_hidden_layers		,decoder_num_attention_heads=self.num_attention_heads		,decoder_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		,is_decoder=lowerCamelCase__		,initializer_range=self.initializer_range		,mask_ratio=self.mask_ratio		,)






     def        SCREAMING_SNAKE_CASE__						(							self		:					Optional[int]		,lowerCamelCase__		:					List[Any]		,lowerCamelCase__		:					Any		,lowerCamelCase__		:					Dict )  ->	Optional[Any]:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		TFViTMAEModel(config=lowerCamelCase__ )
           SCREAMING_SNAKE_CASE	=		model(lowerCamelCase__		,training=lowerCamelCase__ )
           self.parent.assertEqual(result.last_hidden_state.shape		,(self.batch_size, self.seq_length, self.hidden_size) )






     def        SCREAMING_SNAKE_CASE__						(							self		:					Dict		,lowerCamelCase__		:					Dict		,lowerCamelCase__		:					Optional[Any]		,lowerCamelCase__		:					Dict )  ->	List[Any]:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		TFViTMAEForPreTraining(lowerCamelCase__ )
           SCREAMING_SNAKE_CASE	=		model(lowerCamelCase__		,training=lowerCamelCase__ )
           # expected sequence length = num_patches
           SCREAMING_SNAKE_CASE	=		(self.image_size // self.patch_size) ** 2
           SCREAMING_SNAKE_CASE	=		self.patch_size**2 * self.num_channels
           self.parent.assertEqual(result.logits.shape		,(self.batch_size, num_patches, expected_num_channels) )

           # test greyscale images
           SCREAMING_SNAKE_CASE	=		1
           SCREAMING_SNAKE_CASE	=		TFViTMAEForPreTraining(lowerCamelCase__ )

           SCREAMING_SNAKE_CASE	=		floats_tensor([self.batch_size, 1, self.image_size, self.image_size] )
           SCREAMING_SNAKE_CASE	=		model(lowerCamelCase__		,training=lowerCamelCase__ )
           SCREAMING_SNAKE_CASE	=		self.patch_size**2
           self.parent.assertEqual(result.logits.shape		,(self.batch_size, num_patches, expected_num_channels) )






     def        SCREAMING_SNAKE_CASE__						(							self		:					List[Any] )  ->	str:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		self.prepare_config_and_inputs()
           ((SCREAMING_SNAKE_CASE),      (SCREAMING_SNAKE_CASE),      (SCREAMING_SNAKE_CASE))	=		config_and_inputs
           SCREAMING_SNAKE_CASE	=		{"""pixel_values""": pixel_values}
           return config, inputs_dict

@require_tf
class 	UpperCamelCase__				(   lowerCAmelCase_							,   lowerCAmelCase_							,   unittest.TestCase     ):



     '''simple docstring'''

     __snake_case					:			List[Any]				=    (TFViTMAEModel, TFViTMAEForPreTraining) if is_tf_available() else ()
     __snake_case					:			Optional[int]				=    {"feature-extraction": TFViTMAEModel} if is_tf_available() else {}

     __snake_case					:			Any				=    False
     __snake_case					:			Any				=    False
     __snake_case					:			List[str]				=    False
     __snake_case					:			Union[str, Any]				=    False






     def        SCREAMING_SNAKE_CASE__						(							self		:					Dict )  ->	Any:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		TFViTMAEModelTester(self )
           SCREAMING_SNAKE_CASE	=		ConfigTester(self		,config_class=lowerCamelCase__		,has_text_modality=lowerCamelCase__		,hidden_size=37 )






     def        SCREAMING_SNAKE_CASE__						(							self		:					int )  ->	Optional[Any]:




           '''simple docstring'''


           self.config_tester.run_common_tests()






     @unittest.skip(reason="""ViTMAE does not use inputs_embeds""" )
     def        SCREAMING_SNAKE_CASE__						(							self		:					Tuple )  ->	Dict:




           '''simple docstring'''


           pass






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




           '''simple docstring'''


           SCREAMING_SNAKE_CASE,      SCREAMING_SNAKE_CASE	=		self.model_tester.prepare_config_and_inputs_for_common()

           for model_class in self.all_model_classes:
                 SCREAMING_SNAKE_CASE	=		model_class(lowerCamelCase__ )
                 self.assertIsInstance(model.get_input_embeddings()		,(tf.keras.layers.Layer) )
                 SCREAMING_SNAKE_CASE	=		model.get_output_embeddings()
                 self.assertTrue(x is None or isinstance(lowerCamelCase__		,tf.keras.layers.Layer ) )






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




           '''simple docstring'''


           SCREAMING_SNAKE_CASE,      SCREAMING_SNAKE_CASE	=		self.model_tester.prepare_config_and_inputs_for_common()

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

                 SCREAMING_SNAKE_CASE	=		["""pixel_values"""]
                 self.assertListEqual(arg_names[:1]		,lowerCamelCase__ )






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




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_model(*lowerCamelCase__ )






     def        SCREAMING_SNAKE_CASE__						(							self		:					List[str] )  ->	Optional[Any]:




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_for_pretraining(*lowerCamelCase__ )






     def        SCREAMING_SNAKE_CASE__						(							self		:					Optional[Any] )  ->	Tuple:




           '''simple docstring'''


           np.random.seed(2 )

           SCREAMING_SNAKE_CASE,      SCREAMING_SNAKE_CASE	=		self.model_tester.prepare_config_and_inputs_for_common()

           SCREAMING_SNAKE_CASE	=		int((config.image_size // config.patch_size) ** 2 )
           SCREAMING_SNAKE_CASE	=		np.random.uniform(size=(self.model_tester.batch_size, num_patches) )

           for model_class in self.all_model_classes:
                 SCREAMING_SNAKE_CASE	=		model_class(lowerCamelCase__ )
                 SCREAMING_SNAKE_CASE	=		self._prepare_for_class(lowerCamelCase__		,lowerCamelCase__ )

                 SCREAMING_SNAKE_CASE	=		model(lowerCamelCase__		,noise=lowerCamelCase__ )

                 SCREAMING_SNAKE_CASE	=		copy.deepcopy(self._prepare_for_class(lowerCamelCase__		,lowerCamelCase__ ) )
                 SCREAMING_SNAKE_CASE	=		model(**lowerCamelCase__		,noise=lowerCamelCase__ )
                 SCREAMING_SNAKE_CASE	=		outputs_dict[0].numpy()
                 SCREAMING_SNAKE_CASE	=		outputs_keywords[0].numpy()

                 self.assertLess(np.sum(np.abs(output_dict - output_keywords ) )		,1e-6 )






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




           '''simple docstring'''


           np.random.seed(2 )

           SCREAMING_SNAKE_CASE,      SCREAMING_SNAKE_CASE	=		self.model_tester.prepare_config_and_inputs_for_common()

           SCREAMING_SNAKE_CASE	=		int((config.image_size // config.patch_size) ** 2 )
           SCREAMING_SNAKE_CASE	=		np.random.uniform(size=(self.model_tester.batch_size, num_patches) )

           def prepare_numpy_arrays(lowerCamelCase__		:					str ):
                 SCREAMING_SNAKE_CASE	=		{}
                 for k, v in inputs_dict.items():
                       if tf.is_tensor(lowerCamelCase__ ):
                             SCREAMING_SNAKE_CASE	=		v.numpy()
                       else:
                             SCREAMING_SNAKE_CASE	=		np.array(lowerCamelCase__ )

                 return inputs_np_dict

           for model_class in self.all_model_classes:
                 SCREAMING_SNAKE_CASE	=		model_class(lowerCamelCase__ )

                 SCREAMING_SNAKE_CASE	=		self._prepare_for_class(lowerCamelCase__		,lowerCamelCase__ )
                 SCREAMING_SNAKE_CASE	=		prepare_numpy_arrays(lowerCamelCase__ )

                 SCREAMING_SNAKE_CASE	=		model(lowerCamelCase__		,noise=lowerCamelCase__ )
                 SCREAMING_SNAKE_CASE	=		model(**lowerCamelCase__		,noise=lowerCamelCase__ )
                 self.assert_outputs_same(lowerCamelCase__		,lowerCamelCase__ )






     def        SCREAMING_SNAKE_CASE__						(							self		:					Union[str, Any]		,lowerCamelCase__		:					Union[str, Any]		,lowerCamelCase__		:					int		,lowerCamelCase__		:					Tuple )  ->	Union[str, Any]:




           '''simple docstring'''


           np.random.seed(2 )

           SCREAMING_SNAKE_CASE	=		int((tf_model.config.image_size // tf_model.config.patch_size) ** 2 )
           SCREAMING_SNAKE_CASE	=		np.random.uniform(size=(self.model_tester.batch_size, num_patches) )
           SCREAMING_SNAKE_CASE	=		tf.constant(lowerCamelCase__ )

           # Add `noise` argument.
           # PT inputs will be prepared in `super().check_pt_tf_models()` with this added `noise` argument
           SCREAMING_SNAKE_CASE	=		tf_noise

           super().check_pt_tf_models(lowerCamelCase__		,lowerCamelCase__		,lowerCamelCase__ )






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




           '''simple docstring'''


           np.random.seed(2 )

           SCREAMING_SNAKE_CASE,      SCREAMING_SNAKE_CASE	=		self.model_tester.prepare_config_and_inputs_for_common()

           SCREAMING_SNAKE_CASE	=		{
               module_member
               for model_class in self.all_model_classes
               for module in (import_module(model_class.__module__ ),)
               for module_member_name in dir(lowerCamelCase__ )
               if module_member_name.endswith("""MainLayer""" )
               # This condition is required, since `modeling_tf_clip.py` has 3 classes whose names end with `MainLayer`.
               and module_member_name[: -len("""MainLayer""" )] == model_class.__name__[: -len("""Model""" )]
               for module_member in (getattr(lowerCamelCase__		,lowerCamelCase__ ),)
               if isinstance(lowerCamelCase__		,lowerCamelCase__ )
               and tf.keras.layers.Layer in module_member.__bases__
               and getattr(lowerCamelCase__		,"""_keras_serializable"""		,lowerCamelCase__ )
           }

           SCREAMING_SNAKE_CASE	=		int((config.image_size // config.patch_size) ** 2 )
           SCREAMING_SNAKE_CASE	=		np.random.uniform(size=(self.model_tester.batch_size, num_patches) )
           SCREAMING_SNAKE_CASE	=		tf.convert_to_tensor(lowerCamelCase__ )
           inputs_dict.update({"""noise""": noise} )

           for main_layer_class in tf_main_layer_classes:
                 SCREAMING_SNAKE_CASE	=		main_layer_class(lowerCamelCase__ )

                 SCREAMING_SNAKE_CASE	=		{
                     name: tf.keras.Input(tensor.shape[1:]		,dtype=tensor.dtype ) for name, tensor in inputs_dict.items()
                 }

                 SCREAMING_SNAKE_CASE	=		tf.keras.Model(lowerCamelCase__		,outputs=main_layer(lowerCamelCase__ ) )
                 SCREAMING_SNAKE_CASE	=		model(lowerCamelCase__ )

                 with tempfile.TemporaryDirectory() as tmpdirname:
                       SCREAMING_SNAKE_CASE	=		os.path.join(lowerCamelCase__		,"""keras_model.h5""" )
                       model.save(lowerCamelCase__ )
                       SCREAMING_SNAKE_CASE	=		tf.keras.models.load_model(
                           lowerCamelCase__		,custom_objects={main_layer_class.__name__: main_layer_class} )
                       assert isinstance(lowerCamelCase__		,tf.keras.Model )
                       SCREAMING_SNAKE_CASE	=		model(lowerCamelCase__ )
                       self.assert_outputs_same(lowerCamelCase__		,lowerCamelCase__ )






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




           '''simple docstring'''


           np.random.seed(2 )

           SCREAMING_SNAKE_CASE,      SCREAMING_SNAKE_CASE	=		self.model_tester.prepare_config_and_inputs_for_common()

           SCREAMING_SNAKE_CASE	=		int((config.image_size // config.patch_size) ** 2 )
           SCREAMING_SNAKE_CASE	=		np.random.uniform(size=(self.model_tester.batch_size, num_patches) )

           for model_class in self.all_model_classes:
                 SCREAMING_SNAKE_CASE	=		model_class(lowerCamelCase__ )
                 SCREAMING_SNAKE_CASE	=		self._prepare_for_class(lowerCamelCase__		,lowerCamelCase__ )
                 SCREAMING_SNAKE_CASE	=		model(lowerCamelCase__		,noise=lowerCamelCase__ )

                 if model_class.__name__ == "TFViTMAEModel":
                       SCREAMING_SNAKE_CASE	=		outputs.last_hidden_state.numpy()
                       SCREAMING_SNAKE_CASE	=		0
                 else:
                       SCREAMING_SNAKE_CASE	=		outputs.logits.numpy()
                       SCREAMING_SNAKE_CASE	=		0

                 with tempfile.TemporaryDirectory() as tmpdirname:
                       model.save_pretrained(lowerCamelCase__		,saved_model=lowerCamelCase__ )
                       SCREAMING_SNAKE_CASE	=		model_class.from_pretrained(lowerCamelCase__ )
                       SCREAMING_SNAKE_CASE	=		model(lowerCamelCase__		,noise=lowerCamelCase__ )

                       if model_class.__name__ == "TFViTMAEModel":
                             SCREAMING_SNAKE_CASE	=		after_outputs["""last_hidden_state"""].numpy()
                             SCREAMING_SNAKE_CASE	=		0
                       else:
                             SCREAMING_SNAKE_CASE	=		after_outputs["""logits"""].numpy()
                             SCREAMING_SNAKE_CASE	=		0

                       SCREAMING_SNAKE_CASE	=		np.amax(np.abs(out_a - out_a ) )
                       self.assertLessEqual(lowerCamelCase__		,1e-5 )






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




           '''simple docstring'''


           np.random.seed(2 )

           SCREAMING_SNAKE_CASE,      SCREAMING_SNAKE_CASE	=		self.model_tester.prepare_config_and_inputs_for_common()

           SCREAMING_SNAKE_CASE	=		int((config.image_size // config.patch_size) ** 2 )
           SCREAMING_SNAKE_CASE	=		np.random.uniform(size=(self.model_tester.batch_size, num_patches) )

           for model_class in self.all_model_classes:
                 SCREAMING_SNAKE_CASE	=		model_class(lowerCamelCase__ )
                 SCREAMING_SNAKE_CASE	=		self._prepare_for_class(lowerCamelCase__		,lowerCamelCase__ )

                 SCREAMING_SNAKE_CASE	=		model(lowerCamelCase__		,noise=lowerCamelCase__ )
                 SCREAMING_SNAKE_CASE	=		model.get_config()
                 # make sure that returned config is jsonifiable, which is required by keras
                 json.dumps(lowerCamelCase__ )
                 SCREAMING_SNAKE_CASE	=		model_class.from_config(model.get_config() )
                 # make sure it also accepts a normal config
                 SCREAMING_SNAKE_CASE	=		model_class.from_config(model.config )
                 SCREAMING_SNAKE_CASE	=		new_model(lowerCamelCase__ )  # Build model
                 new_model.set_weights(model.get_weights() )
                 SCREAMING_SNAKE_CASE	=		new_model(lowerCamelCase__		,noise=lowerCamelCase__ )

                 self.assert_outputs_same(lowerCamelCase__		,lowerCamelCase__ )






     @unittest.skip(
         reason="""ViTMAE returns a random mask + ids_restore in each forward pass. See test_save_load
    to get deterministic results.""" )
     def        SCREAMING_SNAKE_CASE__						(							self		:					Dict )  ->	Any:




           '''simple docstring'''


           pass






     @unittest.skip(reason="""ViTMAE returns a random mask + ids_restore in each forward pass. See test_save_load""" )
     def        SCREAMING_SNAKE_CASE__						(							self		:					Tuple )  ->	int:




           '''simple docstring'''


           pass






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




           '''simple docstring'''


           SCREAMING_SNAKE_CASE	=		TFViTMAEModel.from_pretrained("""google/vit-base-patch16-224""" )
           self.assertIsNotNone(lowerCamelCase__ )



def      __lowercase     (   )				->     Dict:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE	=		Image.open("""./tests/fixtures/tests_samples/COCO/000000039769.png"""			)
      return image



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



     '''simple docstring'''

     @cached_property
     def        SCREAMING_SNAKE_CASE__						(							self		:					Tuple )  ->	str:




           '''simple docstring'''


           return ViTImageProcessor.from_pretrained("""facebook/vit-mae-base""" ) if is_vision_available() else None






     @slow
     def        SCREAMING_SNAKE_CASE__						(							self		:					Tuple )  ->	Dict:




           '''simple docstring'''


           np.random.seed(2 )

           SCREAMING_SNAKE_CASE	=		TFViTMAEForPreTraining.from_pretrained("""facebook/vit-mae-base""" )

           SCREAMING_SNAKE_CASE	=		self.default_image_processor
           SCREAMING_SNAKE_CASE	=		prepare_img()
           SCREAMING_SNAKE_CASE	=		image_processor(images=lowerCamelCase__		,return_tensors="""tf""" )

           # prepare a noise vector that will be also used for testing the TF model
           # (this way we can ensure that the PT and TF models operate on the same inputs)
           SCREAMING_SNAKE_CASE	=		ViTMAEConfig()
           SCREAMING_SNAKE_CASE	=		int((vit_mae_config.image_size // vit_mae_config.patch_size) ** 2 )
           SCREAMING_SNAKE_CASE	=		np.random.uniform(size=(1, num_patches) )

           # forward pass
           SCREAMING_SNAKE_CASE	=		model(**lowerCamelCase__		,noise=lowerCamelCase__ )

           # verify the logits
           SCREAMING_SNAKE_CASE	=		tf.convert_to_tensor([1, 196, 768] )
           self.assertEqual(outputs.logits.shape		,lowerCamelCase__ )

           SCREAMING_SNAKE_CASE	=		tf.convert_to_tensor(
               [[-0.0548, -1.7023, -0.9325], [0.3721, -0.5670, -0.2233], [0.8235, -1.3878, -0.3524]] )

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









import warnings

from ...utils import logging
from .image_processing_deformable_detr import DeformableDetrImageProcessor


SCREAMING_SNAKE_CASE_		     = logging.get_logger(__name__)

class 	UpperCamelCase__				(   lowerCAmelCase_     ):



     '''simple docstring'''

     def __init__(							self		:					int		,*lowerCamelCase__		:					int		,**lowerCamelCase__		:					List[Any] )  ->	None:




           '''simple docstring'''


           warnings.warn(
               """The class DeformableDetrFeatureExtractor is deprecated and will be removed in version 5 of Transformers."""
               """ Please use DeformableDetrImageProcessor instead."""		,lowerCamelCase__		,)
           super().__init__(*lowerCamelCase__		,**lowerCamelCase__ )


