


'''simple docstring'''


from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_UpperCamelCase 							=  {"""configuration_van""": ["""VAN_PRETRAINED_CONFIG_ARCHIVE_MAP""", """VanConfig"""]}


try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      _UpperCamelCase 							=  [
          """VAN_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """VanForImageClassification""",
          """VanModel""",
          """VanPreTrainedModel""",
      ]

if TYPE_CHECKING:
      from .configuration_van import VAN_PRETRAINED_CONFIG_ARCHIVE_MAP, VanConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_van import (
                VAN_PRETRAINED_MODEL_ARCHIVE_LIST,
                VanForImageClassification,
                VanModel,
                VanPreTrainedModel,
            )

else:
      import sys

      _UpperCamelCase 							=  _LazyModule(__name__, globals()["""__file__"""], _import_structure)





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


_UpperCamelCase 							=  logging.get_logger(__name__)

_UpperCamelCase 							=  {
    """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 							__magic_name__	(       lowerCAmelCase ):

     """simple docstring"""






     lowerCamelCase__       						=				'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			,     ):


          '''simple docstring'''





          super().__init__(**lowerCamelCase		)

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

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







class 							__magic_name__	(       lowerCAmelCase ):

     """simple docstring"""






     lowerCamelCase__       						=				version.parse('1.11' )


     @property
     def lowerCAmelCase__  (   self		):


          '''simple docstring'''





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


     @property
     def lowerCAmelCase__  (   self		):


          '''simple docstring'''





          return 1E-4

