


from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


a_ :List[Any]  							=			logging.get_logger(__name__)

a_ :Dict  							=			{
    'facebook/deit-base-distilled-patch16-224': (
        'https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.json'
    ),
    # See all DeiT models at https://huggingface.co/models?filter=deit
}

class 							lowercase  (						_UpperCAmelCase			):
     lowerCamelCase			:			int      = '''deit'''







     def __init__(						self :						int   ,   _lowercase :						Optional[int]=7_68   ,   _lowercase :						List[Any]=12   ,   _lowercase :						Optional[Any]=12   ,   _lowercase :						Dict=30_72   ,   _lowercase :						Any="gelu"   ,   _lowercase :						Optional[Any]=0.0   ,   _lowercase :						List[Any]=0.0   ,   _lowercase :						Optional[Any]=0.02   ,   _lowercase :						List[str]=1E-12   ,   _lowercase :						Optional[int]=2_24   ,   _lowercase :						Optional[int]=16   ,   _lowercase :						int=3   ,   _lowercase :						int=True   ,   _lowercase :						Optional[int]=16   ,   **_lowercase :						Union[str, Any]   ,   ):
           super().__init__(**_lowercase      )

           SCREAMING_SNAKE_CASE__       :  Any						     =		hidden_size
           SCREAMING_SNAKE_CASE__       :  Tuple						     =		num_hidden_layers
           SCREAMING_SNAKE_CASE__       :  Dict						     =		num_attention_heads
           SCREAMING_SNAKE_CASE__       :  Tuple						     =		intermediate_size
           SCREAMING_SNAKE_CASE__       :  int						     =		hidden_act
           SCREAMING_SNAKE_CASE__       :  Optional[Any]						     =		hidden_dropout_prob
           SCREAMING_SNAKE_CASE__       :  Dict						     =		attention_probs_dropout_prob
           SCREAMING_SNAKE_CASE__       :  List[Any]						     =		initializer_range
           SCREAMING_SNAKE_CASE__       :  str						     =		layer_norm_eps
           SCREAMING_SNAKE_CASE__       :  Tuple						     =		image_size
           SCREAMING_SNAKE_CASE__       :  Optional[Any]						     =		patch_size
           SCREAMING_SNAKE_CASE__       :  Dict						     =		num_channels
           SCREAMING_SNAKE_CASE__       :  int						     =		qkv_bias
           SCREAMING_SNAKE_CASE__       :  Union[str, Any]						     =		encoder_stride




class 							lowercase  (						_UpperCAmelCase			):
     lowerCamelCase			:			Any      = version.parse('''1.11'''			)







     @property
     def 							lowercase__       (						self :						Union[str, Any]      ):
           return OrderedDict(
               [
                   ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
               ]      )







     @property
     def 							lowercase__       (						self :						Any      ):
           return 1E-4














'''simple docstring'''



from ..utils import DummyObject, requires_backends
class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Dict  ,   *UpperCAmelCase      :		List[Any]  ,   **UpperCAmelCase      :		Union[str, Any]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Any  ,   *UpperCAmelCase      :		Dict  ,   **UpperCAmelCase      :		List[str]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Dict  ,   *UpperCAmelCase      :		str  ,   **UpperCAmelCase      :		Any		)	->	Any:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Union[str, Any]  ,   *UpperCAmelCase      :		Optional[Any]  ,   **UpperCAmelCase      :		str		)	->	Optional[int]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Tuple  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		List[Any]		)	->	int:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		List[Any]  ,   *UpperCAmelCase      :		Union[str, Any]  ,   **UpperCAmelCase      :		List[str]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Any  ,   *UpperCAmelCase      :		int  ,   **UpperCAmelCase      :		Optional[Any]		)	->	Any:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		str  ,   *UpperCAmelCase      :		Tuple  ,   **UpperCAmelCase      :		Union[str, Any]		)	->	Optional[int]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[int]  ,   *UpperCAmelCase      :		Dict  ,   **UpperCAmelCase      :		Optional[int]		)	->	List[str]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Union[str, Any]  ,   *UpperCAmelCase      :		Optional[Any]  ,   **UpperCAmelCase      :		int		)	->	Optional[int]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Tuple  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		Optional[int]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		int  ,   *UpperCAmelCase      :		int  ,   **UpperCAmelCase      :		Dict		)	->	Optional[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[int]  ,   *UpperCAmelCase      :		Dict  ,   **UpperCAmelCase      :		Union[str, Any]		)	->	List[str]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		str  ,   *UpperCAmelCase      :		Optional[int]  ,   **UpperCAmelCase      :		List[str]		)	->	str:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Dict  ,   *UpperCAmelCase      :		Union[str, Any]  ,   **UpperCAmelCase      :		List[Any]		)	->	Dict:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Union[str, Any]  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		Union[str, Any]		)	->	str:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[Any]  ,   *UpperCAmelCase      :		Optional[Any]  ,   **UpperCAmelCase      :		Optional[Any]		)	->	str:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[int]  ,   *UpperCAmelCase      :		Union[str, Any]  ,   **UpperCAmelCase      :		Dict		)	->	Dict:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		int  ,   *UpperCAmelCase      :		List[Any]  ,   **UpperCAmelCase      :		Tuple		)	->	Union[str, Any]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Any  ,   *UpperCAmelCase      :		int  ,   **UpperCAmelCase      :		Optional[Any]		)	->	str:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Union[str, Any]  ,   *UpperCAmelCase      :		List[str]  ,   **UpperCAmelCase      :		List[str]		)	->	Optional[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Union[str, Any]  ,   *UpperCAmelCase      :		Union[str, Any]  ,   **UpperCAmelCase      :		List[str]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[Any]  ,   *UpperCAmelCase      :		Optional[Any]  ,   **UpperCAmelCase      :		Any		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Dict  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		Optional[Any]		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[int]  ,   *UpperCAmelCase      :		Optional[int]  ,   **UpperCAmelCase      :		Any		)	->	Any:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Tuple  ,   *UpperCAmelCase      :		List[str]  ,   **UpperCAmelCase      :		Optional[int]		)	->	List[str]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Union[str, Any]  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		int		)	->	Tuple:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[int]  ,   *UpperCAmelCase      :		Union[str, Any]  ,   **UpperCAmelCase      :		Dict		)	->	int:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		List[str]  ,   *UpperCAmelCase      :		Dict  ,   **UpperCAmelCase      :		Dict		)	->	List[Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		str  ,   *UpperCAmelCase      :		Optional[Any]  ,   **UpperCAmelCase      :		str		)	->	int:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[int]  ,   *UpperCAmelCase      :		Any  ,   **UpperCAmelCase      :		Optional[int]		)	->	Optional[int]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[int]  ,   *UpperCAmelCase      :		Dict  ,   **UpperCAmelCase      :		Optional[Any]		)	->	Dict:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		str  ,   *UpperCAmelCase      :		str  ,   **UpperCAmelCase      :		Any		)	->	int:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[int]  ,   *UpperCAmelCase      :		str  ,   **UpperCAmelCase      :		Any		)	->	Optional[int]:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[int]  ,   *UpperCAmelCase      :		Tuple  ,   **UpperCAmelCase      :		Any		)	->	Dict:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Optional[int]  ,   *UpperCAmelCase      :		Optional[int]  ,   **UpperCAmelCase      :		Optional[Any]		)	->	Dict:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)





class UpperCAmelCase_       (     metaclass=__A					):




      """simple docstring"""




      UpperCamelCase_             =      ['''flax''']






      def __init__(			self      :		Optional[Any]  ,   *UpperCAmelCase      :		str  ,   **UpperCAmelCase      :		int		)	->	Tuple:


       '''simple docstring'''

       requires_backends(self  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Dict  ,   *UpperCAmelCase      :		List[Any]  ,   **UpperCAmelCase      :		Optional[int]		)	->	str:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)






      @classmethod
      def 					A__   (			cls      :		Union[str, Any]  ,   *UpperCAmelCase      :		List[Any]  ,   **UpperCAmelCase      :		Union[str, Any]		)	->	Union[str, Any]:


       '''simple docstring'''

       requires_backends(cls  ,   ['''flax''']		)



