

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 	lowercase    (				_lowercase							):


		"""simple docstring"""




		a__					       =  "beit"


		def __init__(				self	,       __snake_case=81_92	,       __snake_case=7_68	,       __snake_case=12	,       __snake_case=12	,       __snake_case=30_72	,       __snake_case="gelu"	,       __snake_case=0.0	,       __snake_case=0.0	,       __snake_case=0.0_2	,       __snake_case=1e-12	,       __snake_case=2_24	,       __snake_case=16	,       __snake_case=3	,       __snake_case=False	,       __snake_case=False	,       __snake_case=False	,       __snake_case=False	,       __snake_case=0.1	,       __snake_case=0.1	,       __snake_case=True	,       __snake_case=[3, 5, 7, 11]	,       __snake_case=[1, 2, 3, 6]	,       __snake_case=True	,       __snake_case=0.4	,       __snake_case=2_56	,       __snake_case=1	,       __snake_case=False	,       __snake_case=2_55	,       **__snake_case	,       ):
			super().__init__(**__snake_case)

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

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







class 	lowercase    (				_lowercase							):


		"""simple docstring"""




		a__					       =  version.parse("1.11"							)


		@property
		def 		A__					(				self):
			return OrderedDict(
			    [
			        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
			    ])






		@property
		def 		A__					(				self):
			return 1e-4







from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCAmelCase__								=		logging.get_logger(__name__)

lowerCAmelCase__								=		{
    """facebook/vit-mae-base""": """https://huggingface.co/facebook/vit-mae-base/resolve/main/config.json""",
    # See all ViT MAE models at https://huggingface.co/models?filter=vit-mae
}







class 	lowercase    (				_lowercase							):


		"""simple docstring"""




		a__					       =  "vit_mae"


		def __init__(				self	,       __snake_case=7_68	,       __snake_case=12	,       __snake_case=12	,       __snake_case=30_72	,       __snake_case="gelu"	,       __snake_case=0.0	,       __snake_case=0.0	,       __snake_case=0.0_2	,       __snake_case=1e-12	,       __snake_case=2_24	,       __snake_case=16	,       __snake_case=3	,       __snake_case=True	,       __snake_case=16	,       __snake_case=5_12	,       __snake_case=8	,       __snake_case=20_48	,       __snake_case=0.7_5	,       __snake_case=False	,       **__snake_case	,       ):
			super().__init__(**__snake_case)

			_UpperCamelCase   :		Optional[int]			=						hidden_size
			_UpperCamelCase   :		Optional[int]			=						num_hidden_layers
			_UpperCamelCase   :		Tuple			=						num_attention_heads
			_UpperCamelCase   :		List[str]			=						intermediate_size
			_UpperCamelCase   :		str			=						hidden_act
			_UpperCamelCase   :		List[str]			=						hidden_dropout_prob
			_UpperCamelCase   :		List[Any]			=						attention_probs_dropout_prob
			_UpperCamelCase   :		str			=						initializer_range
			_UpperCamelCase   :		Any			=						layer_norm_eps
			_UpperCamelCase   :		int			=						image_size
			_UpperCamelCase   :		Any			=						patch_size
			_UpperCamelCase   :		List[Any]			=						num_channels
			_UpperCamelCase   :		Union[str, Any]			=						qkv_bias
			_UpperCamelCase   :		str			=						decoder_num_attention_heads
			_UpperCamelCase   :		Union[str, Any]			=						decoder_hidden_size
			_UpperCamelCase   :		Union[str, Any]			=						decoder_num_hidden_layers
			_UpperCamelCase   :		Any			=						decoder_intermediate_size
			_UpperCamelCase   :		int			=						mask_ratio
			_UpperCamelCase   :		List[Any]			=						norm_pix_loss




