



'''simple docstring'''





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


_lowerCAmelCase      						=	logging.get_logger(__name__)

_lowerCAmelCase      						=	{
    '''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        lowerCAmelCase_(				lowerCamelCase_     ):
  '''simple docstring'''




  __lowercase							:      List[Any]				=      '''deit'''




  def __init__(    self  ,__UpperCAmelCase=768  ,__UpperCAmelCase=12  ,__UpperCAmelCase=12  ,__UpperCAmelCase=3072  ,__UpperCAmelCase="gelu"  ,__UpperCAmelCase=0.0  ,__UpperCAmelCase=0.0  ,__UpperCAmelCase=0.0_2  ,__UpperCAmelCase=1E-12  ,__UpperCAmelCase=224  ,__UpperCAmelCase=16  ,__UpperCAmelCase=3  ,__UpperCAmelCase=True  ,__UpperCAmelCase=16  ,**__UpperCAmelCase  ,)    ->		Any:
      super().__init__(**_lowercase      )

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







class        lowerCAmelCase_(				lowerCamelCase_     ):
  '''simple docstring'''




  __lowercase							:      Dict				=      version.parse('''1.11'''     )




  @property
  def 							UpperCAmelCase_	(    self      )    ->		Dict:
      return OrderedDict(
          [
              ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
          ]      )






  @property
  def 							UpperCAmelCase_	(    self      )    ->		Optional[int]:
      return 1E-4



def 	__SCREAMING_SNAKE_CASE  (					__UpperCamelCase    :       int ,     __UpperCamelCase    :       int	)							->					str:







  """simple docstring"""





  if a < 0 or b < 0:
    raise ValueError("""the value of both inputs must be positive"""	)

  SCREAMING_SNAKE_CASE__										=      str(bin(__UpperCamelCase	)	)[2:]  # remove the leading "0b"
  SCREAMING_SNAKE_CASE__										=      str(bin(__UpperCamelCase	)	)[2:]  # remove the leading "0b"

  SCREAMING_SNAKE_CASE__										=      max(len(__UpperCamelCase	) ,     len(__UpperCamelCase	)	)

  return "0b" + "".join(
      str(int(char_a != char_b	)	)
      for char_a, char_b in zip(a_binary.zfill(__UpperCamelCase	) ,     b_binary.zfill(__UpperCamelCase	)	)	)


if __name__ == "__main__":
   import doctest

   doctest.testmod()
