




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_  :      Any		=		logging.get_logger(__name__)

snake_case_  :      Dict		=		{
    "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 					snake_case_   (     snake_case__	):



				'''simple docstring'''
				lowerCamelCase       =  """beit"""





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

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

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





class 					snake_case_   (     snake_case__	):



				'''simple docstring'''
				lowerCamelCase       =  version.parse("1.11"	)





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





				@property
				def    __SCREAMING_SNAKE_CASE     (      self							:   List[str]							)							->			Union[str, Any]:
											return 1e-4








"""simple docstring"""





import numpy as np



def 					lowerCAmelCase_      (   SCREAMING_SNAKE_CASE							:				np.array ):


							'''simple docstring'''







							return 1 / (1 + np.exp(-vector ))


if __name__ == "__main__":
							import doctest

							doctest.testmod()




