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


a_    					=       logging.get_logger(__name__)

a_    					=       {
    '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 		_lowercase						(					snake_case_       ):
 lowercase				     =   'beit'

 def __init__( self	:							Union[str, Any]   ,      snake_case	:							Optional[Any]=8_1_9_2   ,      snake_case	:							Dict=7_6_8   ,      snake_case	:							Dict=1_2   ,      snake_case	:							Optional[Any]=1_2   ,      snake_case	:							int=3_0_7_2   ,      snake_case	:							str="gelu"   ,      snake_case	:							List[str]=0.0   ,      snake_case	:							Optional[int]=0.0   ,      snake_case	:							Any=0.02   ,      snake_case	:							Any=1e-12   ,      snake_case	:							str=2_2_4   ,      snake_case	:							Optional[int]=1_6   ,      snake_case	:							Any=3   ,      snake_case	:							Any=False   ,      snake_case	:							str=False   ,      snake_case	:							Tuple=False   ,      snake_case	:							List[str]=False   ,      snake_case	:							Dict=0.1   ,      snake_case	:							List[str]=0.1   ,      snake_case	:							Optional[int]=True   ,      snake_case	:							Optional[Any]=[3, 5, 7, 1_1]   ,      snake_case	:							Optional[Any]=[1, 2, 3, 6]   ,      snake_case	:							Optional[Any]=True   ,      snake_case	:							Optional[Any]=0.4   ,      snake_case	:							Optional[Any]=2_5_6   ,      snake_case	:							str=1   ,      snake_case	:							str=False   ,      snake_case	:							Union[str, Any]=2_5_5   ,      **snake_case	:							Union[str, Any]   ,      )   ->						Optional[int]:

  """simple docstring"""





  super().__init__(**snake_case			)

  UpperCamelCase_					:						Tuple =					vocab_size
  UpperCamelCase_					:						int =					hidden_size
  UpperCamelCase_					:						str =					num_hidden_layers
  UpperCamelCase_					:						Union[str, Any] =					num_attention_heads
  UpperCamelCase_					:						Optional[Any] =					intermediate_size
  UpperCamelCase_					:						Optional[int] =					hidden_act
  UpperCamelCase_					:						List[Any] =					hidden_dropout_prob
  UpperCamelCase_					:						int =					attention_probs_dropout_prob
  UpperCamelCase_					:						List[str] =					initializer_range
  UpperCamelCase_					:						int =					layer_norm_eps

  UpperCamelCase_					:						List[Any] =					image_size
  UpperCamelCase_					:						int =					patch_size
  UpperCamelCase_					:						str =					num_channels
  UpperCamelCase_					:						Dict =					use_mask_token
  UpperCamelCase_					:						List[Any] =					use_absolute_position_embeddings
  UpperCamelCase_					:						Dict =					use_relative_position_bias
  UpperCamelCase_					:						int =					use_shared_relative_position_bias
  UpperCamelCase_					:						List[Any] =					layer_scale_init_value
  UpperCamelCase_					:						Optional[int] =					drop_path_rate
  UpperCamelCase_					:						int =					use_mean_pooling
  # decode head attributes (semantic segmentation)
  UpperCamelCase_					:						List[Any] =					out_indices
  UpperCamelCase_					:						Dict =					pool_scales
  # auxiliary head attributes (semantic segmentation)
  UpperCamelCase_					:						Dict =					use_auxiliary_head
  UpperCamelCase_					:						Optional[Any] =					auxiliary_loss_weight
  UpperCamelCase_					:						Optional[Any] =					auxiliary_channels
  UpperCamelCase_					:						str =					auxiliary_num_convs
  UpperCamelCase_					:						List[str] =					auxiliary_concat_input
  UpperCamelCase_					:						List[str] =					semantic_loss_ignore_index





class 		_lowercase						(					snake_case_       ):
 lowercase				     =   version.parse('1.11'       )

 @property
 def 						SCREAMING_SNAKE_CASE__   ( self	:							str			)   ->						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	:							int			)   ->						float:

  """simple docstring"""





  return 1e-4




from maths.prime_check import is_prime





def    __lowercase     (						lowerCamelCase					:     int	):
 if not isinstance(lowerCamelCase  ,  lowerCamelCase	):
  UpperCamelCase_					:						List[str] =					F"Input value of [number={number}] must be an integer"
  raise TypeError(lowerCamelCase	)
 if is_prime(lowerCamelCase	) and is_prime(number + 2	):
  return number + 2
 else:
  return -1


if __name__ == "__main__":
   import doctest

   doctest.testmod()



