




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


_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 _lowerCamelCase    (					a_						):
   _lowerCamelCase    :List[str]     				=     "beit"






   def __init__(		self       :		List[str]   ,     UpperCamelCase       :		str=81_92   ,     UpperCamelCase       :		Tuple=7_68   ,     UpperCamelCase       :		Any=12   ,     UpperCamelCase       :		Tuple=12   ,     UpperCamelCase       :		Tuple=30_72   ,     UpperCamelCase       :		Any="gelu"   ,     UpperCamelCase       :		Dict=0.0   ,     UpperCamelCase       :		Optional[int]=0.0   ,     UpperCamelCase       :		str=0.02   ,     UpperCamelCase       :		Any=1E-1_2   ,     UpperCamelCase       :		Optional[Any]=2_24   ,     UpperCamelCase       :		Dict=16   ,     UpperCamelCase       :		Optional[int]=3   ,     UpperCamelCase       :		Union[str, Any]=False   ,     UpperCamelCase       :		Any=False   ,     UpperCamelCase       :		Dict=False   ,     UpperCamelCase       :		List[Any]=False   ,     UpperCamelCase       :		List[Any]=0.1   ,     UpperCamelCase       :		Tuple=0.1   ,     UpperCamelCase       :		Tuple=True   ,     UpperCamelCase       :		Dict=[3, 5, 7, 11]   ,     UpperCamelCase       :		Optional[int]=[1, 2, 3, 6]   ,     UpperCamelCase       :		str=True   ,     UpperCamelCase       :		Optional[Any]=0.4   ,     UpperCamelCase       :		Tuple=2_56   ,     UpperCamelCase       :		int=1   ,     UpperCamelCase       :		List[Any]=False   ,     UpperCamelCase       :		Tuple=2_55   ,     **UpperCamelCase       :		Optional[int]   ,     )			->						Tuple:

         """simple docstring"""
         super().__init__(**UpperCamelCase   )

         lowerCAmelCase__      :			Optional[int]   =	vocab_size
         lowerCAmelCase__      :			List[str]   =	hidden_size
         lowerCAmelCase__      :			str   =	num_hidden_layers
         lowerCAmelCase__      :			Dict   =	num_attention_heads
         lowerCAmelCase__      :			List[str]   =	intermediate_size
         lowerCAmelCase__      :			int   =	hidden_act
         lowerCAmelCase__      :			Optional[int]   =	hidden_dropout_prob
         lowerCAmelCase__      :			List[Any]   =	attention_probs_dropout_prob
         lowerCAmelCase__      :			Dict   =	initializer_range
         lowerCAmelCase__      :			Any   =	layer_norm_eps

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






class _lowerCamelCase    (					a_						):
   _lowerCamelCase    :List[Any]     				=     version.parse("1.11"						)






   @property
   def 	_lowerCAmelCase   (		self       :		int   )			->						Mapping[str, Mapping[int, str]]:

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






   @property
   def 	_lowerCAmelCase   (		self       :		List[Any]   )			->						float:

         """simple docstring"""
         return 1E-4











"""simple docstring"""


# This is the module that test_patching.py uses to test patch_submodule()

import os  # noqa: this is just for tests
import os as renamed_os  # noqa: this is just for tests
from os import path  # noqa: this is just for tests
from os import path as renamed_path  # noqa: this is just for tests
from os.path import join  # noqa: this is just for tests
from os.path import join as renamed_join  # noqa: this is just for tests


_A													=      open  # noqa: we just need to have a builtin inside this module to test it properly





