






'''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_				   =   {
    '''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   _UpperCAmelCase     (	__snake_case		):




   """simple docstring"""

   snake_case       							=		"""beit"""

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





         '''simple docstring'''





         super().__init__(**__SCREAMING_SNAKE_CASE						)

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

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





class   _UpperCAmelCase     (	__snake_case		):




   """simple docstring"""

   snake_case       							=		version.parse('''1.11'''		)

   @property
   def 		lowerCAmelCase					(						self					:      Any						):





         '''simple docstring'''





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

   @property
   def 		lowerCAmelCase					(						self					:      Tuple						):





         '''simple docstring'''





         return 1E-4













"""simple docstring"""





def 	lowerCamelCase__			(				_lowerCamelCase			:						str					) ->							bool:
  lowerCamelCase_       	=		0
  for ch in input_str:
    lowerCamelCase_       	=		ord(_lowerCamelCase					)
    lowerCamelCase_       	=		pow(2						,							_lowerCamelCase					)

    # If we already turned on bit for current character's unicode
    if bitmap >> ch_unicode & 1 == 1:
      return False
    bitmap |= ch_bit_index_on
  return True


if __name__ == "__main__":
  import doctest

  doctest.testmod()




