



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


lowercase_      :				List[Any]   					=    logging.get_logger(__name__)

lowercase_      :				Any   					=    {
    '''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      __UpperCamelCase       (_UpperCAmelCase			):
	__A			  =					'''beit'''







	def __init__(    self ,				_lowerCAmelCase=8192 ,				_lowerCAmelCase=768 ,				_lowerCAmelCase=12 ,				_lowerCAmelCase=12 ,				_lowerCAmelCase=3072 ,				_lowerCAmelCase="gelu" ,				_lowerCAmelCase=0.0 ,				_lowerCAmelCase=0.0 ,				_lowerCAmelCase=0.02 ,				_lowerCAmelCase=1E-12 ,				_lowerCAmelCase=224 ,				_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=256 ,				_lowerCAmelCase=1 ,				_lowerCAmelCase=False ,				_lowerCAmelCase=255 ,				**_lowerCAmelCase ,				)    ->    Any:
							'''simple docstring'''






							super().__init__(**_lowerCAmelCase						)

							lowercase        =							vocab_size
							lowercase        =							hidden_size
							lowercase        =							num_hidden_layers
							lowercase        =							num_attention_heads
							lowercase        =							intermediate_size
							lowercase        =							hidden_act
							lowercase        =							hidden_dropout_prob
							lowercase        =							attention_probs_dropout_prob
							lowercase        =							initializer_range
							lowercase        =							layer_norm_eps

							lowercase        =							image_size
							lowercase        =							patch_size
							lowercase        =							num_channels
							lowercase        =							use_mask_token
							lowercase        =							use_absolute_position_embeddings
							lowercase        =							use_relative_position_bias
							lowercase        =							use_shared_relative_position_bias
							lowercase        =							layer_scale_init_value
							lowercase        =							drop_path_rate
							lowercase        =							use_mean_pooling
							# decode head attributes (semantic segmentation)
							lowercase        =							out_indices
							lowercase        =							pool_scales
							# auxiliary head attributes (semantic segmentation)
							lowercase        =							use_auxiliary_head
							lowercase        =							auxiliary_loss_weight
							lowercase        =							auxiliary_channels
							lowercase        =							auxiliary_num_convs
							lowercase        =							auxiliary_concat_input
							lowercase        =							semantic_loss_ignore_index




class      __UpperCamelCase       (_UpperCAmelCase			):
	__A			  =					version.parse('''1.11'''			)







	@property
	def   _a   (    self						)    ->    Mapping[str, Mapping[int, str]]:
							'''simple docstring'''






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







	@property
	def   _a   (    self						)    ->    float:
							'''simple docstring'''






							return 1E-4







'''simple docstring'''


from ... import PretrainedConfig


lowercase_      :				int   					=    {
    '''sijunhe/nezha-cn-base''': '''https://huggingface.co/sijunhe/nezha-cn-base/resolve/main/config.json''',
}




class      __UpperCamelCase       (_UpperCAmelCase			):
	__A			  =					NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP
	__A			  =					'''nezha'''







	def __init__(    self ,				_lowerCAmelCase=2_1128 ,				_lowerCAmelCase=768 ,				_lowerCAmelCase=12 ,				_lowerCAmelCase=12 ,				_lowerCAmelCase=3072 ,				_lowerCAmelCase="gelu" ,				_lowerCAmelCase=0.1 ,				_lowerCAmelCase=0.1 ,				_lowerCAmelCase=512 ,				_lowerCAmelCase=64 ,				_lowerCAmelCase=2 ,				_lowerCAmelCase=0.02 ,				_lowerCAmelCase=1E-12 ,				_lowerCAmelCase=0.1 ,				_lowerCAmelCase=0 ,				_lowerCAmelCase=2 ,				_lowerCAmelCase=3 ,				_lowerCAmelCase=True ,				**_lowerCAmelCase ,				)    ->    int:
							'''simple docstring'''






							super().__init__(pad_token_id=_lowerCAmelCase ,				bos_token_id=_lowerCAmelCase ,				eos_token_id=_lowerCAmelCase ,				**_lowerCAmelCase						)

							lowercase        =							vocab_size
							lowercase        =							hidden_size
							lowercase        =							num_hidden_layers
							lowercase        =							num_attention_heads
							lowercase        =							hidden_act
							lowercase        =							intermediate_size
							lowercase        =							hidden_dropout_prob
							lowercase        =							attention_probs_dropout_prob
							lowercase        =							max_position_embeddings
							lowercase        =							max_relative_position
							lowercase        =							type_vocab_size
							lowercase        =							initializer_range
							lowercase        =							layer_norm_eps
							lowercase        =							classifier_dropout
							lowercase        =							use_cache


