






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   :   Tuple      =    logging.get_logger(__name__)

__UpperCamelCase   :   Optional[int]      =    {
    """google/vit-base-patch16-224""": """https://huggingface.co/vit-base-patch16-224/resolve/main/config.json""",
    # See all ViT models at https://huggingface.co/models?filter=vit
}


class 							__UpperCamelCase     (  _lowerCAmelCase ):
	__snake_case						:Optional[int] =							'vit'







	def __init__(	self   :				List[Any]							,					_lowerCAmelCase   :				int=768							,					_lowerCAmelCase   :				Tuple=12							,					_lowerCAmelCase   :				Any=12							,					_lowerCAmelCase   :				Optional[int]=3072							,					_lowerCAmelCase   :				int="gelu"							,					_lowerCAmelCase   :				List[Any]=0.0							,					_lowerCAmelCase   :				Union[str, Any]=0.0							,					_lowerCAmelCase   :				Tuple=0.02							,					_lowerCAmelCase   :				Optional[Any]=1e-12							,					_lowerCAmelCase   :				Optional[Any]=224							,					_lowerCAmelCase   :				Dict=16							,					_lowerCAmelCase   :				Union[str, Any]=3							,					_lowerCAmelCase   :				Union[str, Any]=True							,					_lowerCAmelCase   :				Optional[Any]=16							,					**_lowerCAmelCase   :				str							,					)		->			Tuple:
		"""simple docstring"""







		super().__init__(**_lowerCAmelCase      )

		__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   							=	qkv_bias
		__lowercase   							=	encoder_stride


class 							__UpperCamelCase     (  _lowerCAmelCase ):
	__snake_case						:List[Any] =							version.parse('1.11' )







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







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







	@property
	def 			_a (	self   :				Optional[int]      )		->			float:
		"""simple docstring"""







		return 1e-4







'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


UpperCAmelCase_					=   {
    "configuration_deberta": ["DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP", "DebertaConfig", "DebertaOnnxConfig"],
    "tokenization_deberta": ["DebertaTokenizer"],
}

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase_					=   ["DebertaTokenizerFast"]

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase_					=   [
      "DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST",
      "DebertaForMaskedLM",
      "DebertaForQuestionAnswering",
      "DebertaForSequenceClassification",
      "DebertaForTokenClassification",
      "DebertaModel",
      "DebertaPreTrainedModel",
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase_					=   [
      "TF_DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST",
      "TFDebertaForMaskedLM",
      "TFDebertaForQuestionAnswering",
      "TFDebertaForSequenceClassification",
      "TFDebertaForTokenClassification",
      "TFDebertaModel",
      "TFDebertaPreTrainedModel",
  ]


if TYPE_CHECKING:
  from .configuration_deberta import DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP, DebertaConfig, DebertaOnnxConfig
  from .tokenization_deberta import DebertaTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_deberta_fast import DebertaTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_deberta import (
        DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
        DebertaForMaskedLM,
        DebertaForQuestionAnswering,
        DebertaForSequenceClassification,
        DebertaForTokenClassification,
        DebertaModel,
        DebertaPreTrainedModel,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_deberta import (
        TF_DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFDebertaForMaskedLM,
        TFDebertaForQuestionAnswering,
        TFDebertaForSequenceClassification,
        TFDebertaForTokenClassification,
        TFDebertaModel,
        TFDebertaPreTrainedModel,
    )


else:
  import sys

  UpperCAmelCase_					=   _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



