


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      lowerCAmelCase__       (				a):




     '''simple docstring'''
     __SCREAMING_SNAKE_CASE  			= "beit"


     def __init__(						self ,						__lowerCamelCase=8_1_9_2 ,						__lowerCamelCase=7_6_8 ,						__lowerCamelCase=1_2 ,						__lowerCamelCase=1_2 ,						__lowerCamelCase=3_0_7_2 ,						__lowerCamelCase="gelu" ,						__lowerCamelCase=0.0 ,						__lowerCamelCase=0.0 ,						__lowerCamelCase=0.0_2 ,						__lowerCamelCase=1e-12 ,						__lowerCamelCase=2_2_4 ,						__lowerCamelCase=1_6 ,						__lowerCamelCase=3 ,						__lowerCamelCase=False ,						__lowerCamelCase=False ,						__lowerCamelCase=False ,						__lowerCamelCase=False ,						__lowerCamelCase=0.1 ,						__lowerCamelCase=0.1 ,						__lowerCamelCase=True ,						__lowerCamelCase=[3, 5, 7, 1_1] ,						__lowerCamelCase=[1, 2, 3, 6] ,						__lowerCamelCase=True ,						__lowerCamelCase=0.4 ,						__lowerCamelCase=2_5_6 ,						__lowerCamelCase=1 ,						__lowerCamelCase=False ,						__lowerCamelCase=2_5_5 ,						**__lowerCamelCase ,						)			->				str:
            super().__init__(**__lowerCamelCase)

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

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







class      lowerCAmelCase__       (				a):




     '''simple docstring'''
     __SCREAMING_SNAKE_CASE  			= version.parse("1.11")


     @property
     def  _lowerCamelCase (						self)			->				Mapping[str, Mapping[int, str]]:
            return OrderedDict(
                [
                    ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
                ])


     @property
     def  _lowerCamelCase (						self)			->				float:
            return 1e-4




import warnings

from ...utils import logging
from .image_processing_beit import BeitImageProcessor


lowerCAmelCase__      		= logging.get_logger(__name__)







class      lowerCAmelCase__       (				a):




     '''simple docstring'''


     def __init__(						self ,						*__lowerCamelCase ,						**__lowerCamelCase)			->				None:
            warnings.warn(
                "The class BeitFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"
                " use BeitImageProcessor instead." ,						__lowerCamelCase ,						)
            super().__init__(*__lowerCamelCase ,						**__lowerCamelCase)
