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


snake_case	=      logging.get_logger(__name__)

snake_case	=      {
    '''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 (					__a			):
  """simple docstring"""







  __A  =		"""vit"""



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


        """simple docstring"""



        super().__init__(**__lowerCAmelCase       )

        _lowerCAmelCase		 = hidden_size
        _lowerCAmelCase		 = num_hidden_layers
        _lowerCAmelCase		 = num_attention_heads
        _lowerCAmelCase		 = intermediate_size
        _lowerCAmelCase		 = hidden_act
        _lowerCAmelCase		 = hidden_dropout_prob
        _lowerCAmelCase		 = attention_probs_dropout_prob
        _lowerCAmelCase		 = initializer_range
        _lowerCAmelCase		 = layer_norm_eps
        _lowerCAmelCase		 = image_size
        _lowerCAmelCase		 = patch_size
        _lowerCAmelCase		 = num_channels
        _lowerCAmelCase		 = qkv_bias
        _lowerCAmelCase		 = encoder_stride





class 							SCREAMING_SNAKE_CASE (					__a			):
  """simple docstring"""







  __A  =		version.parse("1.11"			)



  @property
  def 	a (	self :       List[str]       ):


        """simple docstring"""



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



  @property
  def 	a (	self :       List[Any]       ):


        """simple docstring"""



        return 1e-4













"""simple docstring"""


from typing import TYPE_CHECKING

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


__SCREAMING_SNAKE_CASE   =   {
    'configuration_transfo_xl': ['TRANSFO_XL_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TransfoXLConfig'],
    'tokenization_transfo_xl': ['TransfoXLCorpus', 'TransfoXLTokenizer'],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE   =   [
		    'TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'AdaptiveEmbedding',
		    'TransfoXLForSequenceClassification',
		    'TransfoXLLMHeadModel',
		    'TransfoXLModel',
		    'TransfoXLPreTrainedModel',
		    'load_tf_weights_in_transfo_xl',
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE   =   [
		    'TF_TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'TFAdaptiveEmbedding',
		    'TFTransfoXLForSequenceClassification',
		    'TFTransfoXLLMHeadModel',
		    'TFTransfoXLMainLayer',
		    'TFTransfoXLModel',
		    'TFTransfoXLPreTrainedModel',
		]


if TYPE_CHECKING:
		from .configuration_transfo_xl import TRANSFO_XL_PRETRAINED_CONFIG_ARCHIVE_MAP, TransfoXLConfig
		from .tokenization_transfo_xl import TransfoXLCorpus, TransfoXLTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_transfo_xl import (
				    TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST,
				    AdaptiveEmbedding,
				    TransfoXLForSequenceClassification,
				    TransfoXLLMHeadModel,
				    TransfoXLModel,
				    TransfoXLPreTrainedModel,
				    load_tf_weights_in_transfo_xl,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_transfo_xl import (
				    TF_TRANSFO_XL_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFAdaptiveEmbedding,
				    TFTransfoXLForSequenceClassification,
				    TFTransfoXLLMHeadModel,
				    TFTransfoXLMainLayer,
				    TFTransfoXLModel,
				    TFTransfoXLPreTrainedModel,
				)

else:
		import sys

		__SCREAMING_SNAKE_CASE   =   _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)