



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


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

_lowercase : Optional[Any]      						=						{
    "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        __SCREAMING_SNAKE_CASE	(      lowerCAmelCase_   ):


					'''simple docstring'''





					_a   			=							'vit'



					def __init__(       self							:  int,  lowerCamelCase							:  Any=768,  lowerCamelCase							:  int=12,  lowerCamelCase							:  Optional[Any]=12,  lowerCamelCase							:  Dict=3072,  lowerCamelCase							:  Any="gelu",  lowerCamelCase							:  Optional[Any]=0.0,  lowerCamelCase							:  Any=0.0,  lowerCamelCase							:  int=0.02,  lowerCamelCase							:  List[Any]=1E-12,  lowerCamelCase							:  Optional[Any]=224,  lowerCamelCase							:  List[str]=16,  lowerCamelCase							:  Optional[Any]=3,  lowerCamelCase							:  str=True,  lowerCamelCase							:  Union[str, Any]=16,  **lowerCamelCase							:  List[str],  )->					int:
								super().__init__(**lowerCamelCase     )

								lowerCamelCase__		:		str			=hidden_size
								lowerCamelCase__		:		str			=num_hidden_layers
								lowerCamelCase__		:		Any			=num_attention_heads
								lowerCamelCase__		:		Optional[Any]			=intermediate_size
								lowerCamelCase__		:		Tuple			=hidden_act
								lowerCamelCase__		:		str			=hidden_dropout_prob
								lowerCamelCase__		:		Tuple			=attention_probs_dropout_prob
								lowerCamelCase__		:		Union[str, Any]			=initializer_range
								lowerCamelCase__		:		Optional[int]			=layer_norm_eps
								lowerCamelCase__		:		Union[str, Any]			=image_size
								lowerCamelCase__		:		List[Any]			=patch_size
								lowerCamelCase__		:		Optional[int]			=num_channels
								lowerCamelCase__		:		Optional[int]			=qkv_bias
								lowerCamelCase__		:		List[Any]			=encoder_stride





class        __SCREAMING_SNAKE_CASE	(      lowerCAmelCase_   ):


					'''simple docstring'''





					_a   			=							version.parse('1.11'   )



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




					@property
					def 		snake_case       (       self							:  List[Any]     )->					float:
								return 1E-4









"""simple docstring"""






from typing import TYPE_CHECKING

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


_lowercase : List[Any]      						=						{
    "configuration_tapas": ["TAPAS_PRETRAINED_CONFIG_ARCHIVE_MAP", "TapasConfig"],
    "tokenization_tapas": ["TapasTokenizer"],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase : Optional[Any]      						=						[
		    "TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "TapasForMaskedLM",
		    "TapasForQuestionAnswering",
		    "TapasForSequenceClassification",
		    "TapasModel",
		    "TapasPreTrainedModel",
		    "load_tf_weights_in_tapas",
		]
try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_lowercase : str      						=						[
		    "TF_TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "TFTapasForMaskedLM",
		    "TFTapasForQuestionAnswering",
		    "TFTapasForSequenceClassification",
		    "TFTapasModel",
		    "TFTapasPreTrainedModel",
		]


if TYPE_CHECKING:
		from .configuration_tapas import TAPAS_PRETRAINED_CONFIG_ARCHIVE_MAP, TapasConfig
		from .tokenization_tapas import TapasTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tapas import (
				    TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TapasForMaskedLM,
				    TapasForQuestionAnswering,
				    TapasForSequenceClassification,
				    TapasModel,
				    TapasPreTrainedModel,
				    load_tf_weights_in_tapas,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_tapas import (
				    TF_TAPAS_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFTapasForMaskedLM,
				    TFTapasForQuestionAnswering,
				    TFTapasForSequenceClassification,
				    TFTapasModel,
				    TFTapasPreTrainedModel,
				)


else:
		import sys

		_lowercase : List[str]      						=						_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




