





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


snake_case_				=			logging.get_logger(__name__)

snake_case_				=			{
    'microsoft/beit-base-patch16-224-pt22k': (
        'https://huggingface.co/microsoft/beit-base-patch16-224-pt22k/resolve/main/config.json'
    ),
    # See all BEiT models at https://huggingface.co/models?filter=beit
}

class 		SCREAMING_SNAKE_CASE__				(       _UpperCAmelCase  ):
      A_						:				List[str]							=    'beit'


      def __init__(self       :      Tuple				,			a__       :      int=8192				,			a__       :      Any=768				,			a__       :      List[Any]=12				,			a__       :      List[Any]=12				,			a__       :      Optional[Any]=3072				,			a__       :      Optional[Any]="gelu"				,			a__       :      List[str]=0.0				,			a__       :      Union[str, Any]=0.0				,			a__       :      Union[str, Any]=0.0_2				,			a__       :      Tuple=1E-12				,			a__       :      Union[str, Any]=224				,			a__       :      str=16				,			a__       :      Any=3				,			a__       :      Union[str, Any]=False				,			a__       :      Dict=False				,			a__       :      Union[str, Any]=False				,			a__       :      List[Any]=False				,			a__       :      Union[str, Any]=0.1				,			a__       :      Any=0.1				,			a__       :      List[str]=True				,			a__       :      int=[3, 5, 7, 11]				,			a__       :      str=[1, 2, 3, 6]				,			a__       :      Tuple=True				,			a__       :      Any=0.4				,			a__       :      Optional[int]=256				,			a__       :      str=1				,			a__       :      Tuple=False				,			a__       :      Tuple=255				,			**a__       :      Dict				,			):





         """simple docstring"""



         super().__init__(**a__      )

         __snake_case							       =   vocab_size
         __snake_case							       =   hidden_size
         __snake_case							       =   num_hidden_layers
         __snake_case							       =   num_attention_heads
         __snake_case							       =   intermediate_size
         __snake_case							       =   hidden_act
         __snake_case							       =   hidden_dropout_prob
         __snake_case							       =   attention_probs_dropout_prob
         __snake_case							       =   initializer_range
         __snake_case							       =   layer_norm_eps

         __snake_case							       =   image_size
         __snake_case							       =   patch_size
         __snake_case							       =   num_channels
         __snake_case							       =   use_mask_token
         __snake_case							       =   use_absolute_position_embeddings
         __snake_case							       =   use_relative_position_bias
         __snake_case							       =   use_shared_relative_position_bias
         __snake_case							       =   layer_scale_init_value
         __snake_case							       =   drop_path_rate
         __snake_case							       =   use_mean_pooling
         # decode head attributes (semantic segmentation)
         __snake_case							       =   out_indices
         __snake_case							       =   pool_scales
         # auxiliary head attributes (semantic segmentation)
         __snake_case							       =   use_auxiliary_head
         __snake_case							       =   auxiliary_loss_weight
         __snake_case							       =   auxiliary_channels
         __snake_case							       =   auxiliary_num_convs
         __snake_case							       =   auxiliary_concat_input
         __snake_case							       =   semantic_loss_ignore_index






class 		SCREAMING_SNAKE_CASE__				(       _UpperCAmelCase  ):
      A_						:				Dict							=    version.parse('1.11'  )


      @property
      def    a (self       :      Optional[Any]      ):





         """simple docstring"""



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


      @property
      def    a (self       :      int      ):





         """simple docstring"""



         return 1E-4








def lowerCamelCase__    (							snake_case_	:  int       )      ->				int:
   if not isinstance(snake_case_       ,      snake_case_       ) or number < 0:
      raise ValueError('''Input must be a non-negative integer'''       )

   __snake_case							       =   0
   while number:
      # This way we arrive at next set bit (next 1) instead of looping
      # through each bit and checking for 1s hence the
      # loop won't run 32 times it will only run the number of `1` times
      number &= number - 1
      count += 1
   return count


if __name__ == "__main__":
    import doctest

    doctest.testmod()

