


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


__SCREAMING_SNAKE_CASE							:      Optional[Any]						=      logging.get_logger(__name__)

__SCREAMING_SNAKE_CASE							:      List[str]						=      {
    '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        __A       (snake_case__):





							'''simple docstring'''

							__lowercase:						int							 =      """beit"""



							def __init__(			self							: Optional[Any]						,    UpperCAmelCase_							: str=8_192						,    UpperCAmelCase_							: Tuple=768						,    UpperCAmelCase_							: str=12						,    UpperCAmelCase_							: Any=12						,    UpperCAmelCase_							: Union[str, Any]=3_072						,    UpperCAmelCase_							: Any="gelu"						,    UpperCAmelCase_							: int=0.0						,    UpperCAmelCase_							: Dict=0.0						,    UpperCAmelCase_							: Union[str, Any]=0.02						,    UpperCAmelCase_							: Tuple=1E-12						,    UpperCAmelCase_							: Optional[Any]=224						,    UpperCAmelCase_							: List[Any]=16						,    UpperCAmelCase_							: Optional[int]=3						,    UpperCAmelCase_							: int=False						,    UpperCAmelCase_							: Dict=False						,    UpperCAmelCase_							: Optional[Any]=False						,    UpperCAmelCase_							: Optional[Any]=False						,    UpperCAmelCase_							: List[Any]=0.1						,    UpperCAmelCase_							: str=0.1						,    UpperCAmelCase_							: int=True						,    UpperCAmelCase_							: Optional[Any]=[3, 5, 7, 11]						,    UpperCAmelCase_							: Dict=[1, 2, 3, 6]						,    UpperCAmelCase_							: int=True						,    UpperCAmelCase_							: Optional[int]=0.4						,    UpperCAmelCase_							: Any=256						,    UpperCAmelCase_							: int=1						,    UpperCAmelCase_							: List[Any]=False						,    UpperCAmelCase_							: Optional[int]=255						,    **UpperCAmelCase_							: List[Any]						,    )   ->List[Any]:



														"""simple docstring"""



														super().__init__(**UpperCAmelCase_    )

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

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





class        __A       (snake_case__):





							'''simple docstring'''

							__lowercase:						Union[str, Any]							 =      version.parse("""1.11""")



							@property
							def 						lowerCAmelCase    (			self							: List[Any]    )   ->Mapping[str, Mapping[int, str]]:



														"""simple docstring"""



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



							@property
							def 						lowerCAmelCase    (			self							: Union[str, Any]    )   ->float:



														"""simple docstring"""



														return 1E-4







"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


__SCREAMING_SNAKE_CASE							:      Union[str, Any]						=      logging.get_logger(__name__)

__SCREAMING_SNAKE_CASE							:      int						=      {
    'google/canine-s': 'https://huggingface.co/google/canine-s/resolve/main/config.json',
    # See all CANINE models at https://huggingface.co/models?filter=canine
}





class        __A       (snake_case__):





							'''simple docstring'''

							__lowercase:						List[str]							 =      """canine"""



							def __init__(			self							: Union[str, Any]						,    UpperCAmelCase_							: str=768						,    UpperCAmelCase_							: Union[str, Any]=12						,    UpperCAmelCase_							: Optional[Any]=12						,    UpperCAmelCase_							: Optional[Any]=3_072						,    UpperCAmelCase_							: List[Any]="gelu"						,    UpperCAmelCase_							: int=0.1						,    UpperCAmelCase_							: Any=0.1						,    UpperCAmelCase_							: List[str]=16_384						,    UpperCAmelCase_							: Tuple=16						,    UpperCAmelCase_							: int=0.02						,    UpperCAmelCase_							: Tuple=1E-12						,    UpperCAmelCase_							: str=0						,    UpperCAmelCase_							: int=0XE000						,    UpperCAmelCase_							: Optional[int]=0XE001						,    UpperCAmelCase_							: Dict=4						,    UpperCAmelCase_							: List[Any]=4						,    UpperCAmelCase_							: List[Any]=8						,    UpperCAmelCase_							: Dict=16_384						,    UpperCAmelCase_							: Optional[int]=128						,    **UpperCAmelCase_							: Any						,    )   ->int:



														"""simple docstring"""



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

														snake_case_          =						max_position_embeddings
														snake_case_          =						hidden_size
														snake_case_          =						num_hidden_layers
														snake_case_          =						num_attention_heads
														snake_case_          =						intermediate_size
														snake_case_          =						hidden_act
														snake_case_          =						hidden_dropout_prob
														snake_case_          =						attention_probs_dropout_prob
														snake_case_          =						initializer_range
														snake_case_          =						type_vocab_size
														snake_case_          =						layer_norm_eps

														# Character config:
														snake_case_          =						downsampling_rate
														snake_case_          =						upsampling_kernel_size
														snake_case_          =						num_hash_functions
														snake_case_          =						num_hash_buckets
														snake_case_          =						local_transformer_stride



