


"""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 snake_case      (  _UpperCamelCase):
		__UpperCamelCase           =			'beit'







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





						'''simple docstring'''







						super().__init__(**a__		)

						_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 snake_case      (  _UpperCamelCase):
		__UpperCamelCase           =			version.parse('1.11')







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





						'''simple docstring'''







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







		@property
		def  a_ (					self      :       Dict		)       ->						float:





						'''simple docstring'''







						return 1E-4



"""simple docstring"""


def      a__ (				__lowercase     ,			__lowercase   )	->	int:
				while a != 0:
								_A  ,		_A					  =			b % a, a
				return b






def      a__ (				__lowercase     ,			__lowercase   )	->	int:
				if gcd(__lowercase     ,			__lowercase   ) != 1:
								_A					  =			f"""mod inverse of {a!r} and {m!r} does not exist"""
								raise ValueError(__lowercase   )
				_A  ,		_A  ,		_A					  =			1, 0, a
				_A  ,		_A  ,		_A					  =			0, 1, m
				while va != 0:
								_A					  =			ua // va
								_A  ,		_A  ,		_A  ,		_A  ,		_A  ,		_A					  =			(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
				return ua % m