



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    :		Union[str, Any]  =logging.get_logger(__name__)

__snake_case    :		Optional[int]  ={
    '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__      (							lowerCamelCase__):




		'''simple docstring'''



		snake_case_     ="""beit"""



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

						"""simple docstring"""






						super().__init__(**__lowerCamelCase			)

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

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



class 	lowerCamelCase__      (							lowerCamelCase__):




		'''simple docstring'''



		snake_case_     =version.parse("""1.11""")



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

						"""simple docstring"""






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



		@property
		def 		lowerCAmelCase__				(self			)					->      float:

						"""simple docstring"""






						return 1e-4






__snake_case    :		Any  ='\n# Transformers installation\n! pip install transformers datasets\n# To install from source instead of the last release, comment the command above and uncomment the following one.\n# ! pip install git+https://github.com/huggingface/transformers.git\n'

__snake_case    :		Tuple  =[{'type': 'code', 'content': INSTALL_CONTENT}]
__snake_case    :		Tuple  ={
    '{processor_class}': 'FakeProcessorClass',
    '{model_class}': 'FakeModelClass',
    '{object_class}': 'FakeObjectClass',
}

