



"""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


lowercase__		:				Tuple          =	logging.get_logger(__name__)

lowercase__		:				Optional[Any]          =	{
    '''google/vit-base-patch16-224''': '''https://huggingface.co/vit-base-patch16-224/resolve/main/config.json''',
    # See all ViT models at https://huggingface.co/models?filter=vit
}







class       UpperCamelCase__   (	lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     "vit"



      def __init__(      self				:      Union[str, Any]    ,			SCREAMING_SNAKE_CASE_				:      Dict=7_6_8    ,			SCREAMING_SNAKE_CASE_				:      Tuple=1_2    ,			SCREAMING_SNAKE_CASE_				:      str=1_2    ,			SCREAMING_SNAKE_CASE_				:      Dict=3_0_7_2    ,			SCREAMING_SNAKE_CASE_				:      List[Any]="gelu"    ,			SCREAMING_SNAKE_CASE_				:      Optional[int]=0.0    ,			SCREAMING_SNAKE_CASE_				:      int=0.0    ,			SCREAMING_SNAKE_CASE_				:      Optional[Any]=0.02    ,			SCREAMING_SNAKE_CASE_				:      str=1E-12    ,			SCREAMING_SNAKE_CASE_				:      List[str]=2_2_4    ,			SCREAMING_SNAKE_CASE_				:      List[str]=1_6    ,			SCREAMING_SNAKE_CASE_				:      Union[str, Any]=3    ,			SCREAMING_SNAKE_CASE_				:      List[str]=True    ,			SCREAMING_SNAKE_CASE_				:      Optional[int]=1_6    ,			**SCREAMING_SNAKE_CASE_				:      Optional[Any]    ,			):
        super().__init__(**UpperCAmelCase__       )

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







class       UpperCamelCase__   (	lowercase_  ):




      """simple docstring"""




      _SCREAMING_SNAKE_CASE  				=     version.parse("""1.11"""  )



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





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









"""simple docstring"""







def    UpperCAmelCase__       (lowerCAmelCase_   ):




					'''simple docstring'''


					if number > 0:
										raise ValueError("input must be a negative integer"   )
					__SCREAMING_SNAKE_CASE						   =				len(bin(lowerCAmelCase_   )[3:]   )
					__SCREAMING_SNAKE_CASE						   =				bin(abs(lowerCAmelCase_   ) - (1 << binary_number_length)   )[3:]
					__SCREAMING_SNAKE_CASE						   =				(
					    (
					        "1"
					        + "0" * (binary_number_length - len(lowerCAmelCase_   ))
					        + twos_complement_number
					    )
					    if number < 0
					    else "0"
					)
					return "0b" + twos_complement_number


if __name__ == "__main__":
		import doctest

		doctest.testmod()
