





def     __UpperCamelCase						(_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE = False	)       ->     Any:




   if not isinstance(__lowercase	,		__lowercase	):
      lowercase__			    =						F"""Expected string as input, found {type(__lowercase	)}"""
      raise ValueError(__lowercase	)
   if not isinstance(__lowercase	,		__lowercase	):
      lowercase__			    =						F"""Expected boolean as use_pascal parameter, found {type(__lowercase	)}"""
      raise ValueError(__lowercase	)

   lowercase__			    =						input_str.split('_'	)

   lowercase__			    =						0 if use_pascal else 1

   lowercase__			    =						words[start_index:]

   lowercase__			    =						[word[0].upper() + word[1:] for word in words_to_capitalize]

   lowercase__			    =						'' if use_pascal else words[0]

   return "".join([initial_word, *capitalized_words]	)


if __name__ == "__main__":
      from doctest import testmod

      testmod()









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


lowercase_					     =	logging.get_logger(__name__)

lowercase_					     =	{
    """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        SCREAMING_SNAKE_CASE     (UpperCAmelCase   ):
   _UpperCamelCase					:	Any				      = 'deit'


   def __init__(					self    :       Any    ,  a    :       Union[str, Any]=768    ,  a    :       Optional[Any]=12    ,  a    :       Union[str, Any]=12    ,  a    :       Optional[int]=3_072    ,  a    :       Optional[int]="gelu"    ,  a    :       Optional[Any]=0.0    ,  a    :       List[Any]=0.0    ,  a    :       int=0.02    ,  a    :       List[str]=1E-1_2    ,  a    :       Optional[int]=224    ,  a    :       Tuple=16    ,  a    :       List[Any]=3    ,  a    :       List[str]=True    ,  a    :       Any=16    ,  **a    :       Union[str, Any]    ,  )->     int:





     """simple docstring"""







     super().__init__(**a )

     lowercase__			    =						hidden_size
     lowercase__			    =						num_hidden_layers
     lowercase__			    =						num_attention_heads
     lowercase__			    =						intermediate_size
     lowercase__			    =						hidden_act
     lowercase__			    =						hidden_dropout_prob
     lowercase__			    =						attention_probs_dropout_prob
     lowercase__			    =						initializer_range
     lowercase__			    =						layer_norm_eps
     lowercase__			    =						image_size
     lowercase__			    =						patch_size
     lowercase__			    =						num_channels
     lowercase__			    =						qkv_bias
     lowercase__			    =						encoder_stride






class        SCREAMING_SNAKE_CASE     (UpperCAmelCase   ):
   _UpperCamelCase					:	List[Any]				      = version.parse('1.11'   )


   @property
   def  SCREAMING_SNAKE_CASE_							(					self    :       int )->     Mapping[str, Mapping[int, str]]:





     """simple docstring"""







     return OrderedDict(
         [
             ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
         ] )


   @property
   def  SCREAMING_SNAKE_CASE_							(					self    :       Any )->     float:





     """simple docstring"""







     return 1E-4


