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


a=  logging.get_logger(__name__)

a=  {
    '''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 			__lowercase		(						_lowerCamelCase						):







     """simple docstring"""






     SCREAMING_SNAKE_CASE__		   =						'''vit'''







     def __init__(		self     ,			_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-1_2     ,			_lowerCamelCase=2_2_4     ,			_lowerCamelCase=1_6     ,			_lowerCamelCase=3     ,			_lowerCamelCase=True     ,			_lowerCamelCase=1_6     ,			**_lowerCamelCase     ,			):
         super().__init__(**_lowerCamelCase    )

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






class 			__lowercase		(						_lowerCamelCase						):







     """simple docstring"""






     SCREAMING_SNAKE_CASE__		   =						version.parse('''1.11'''						)







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







     @property
     def lowerCAmelCase     (		self    ):
         return 1E-4




'''simple docstring'''
from typing import TYPE_CHECKING

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


a=  {
    '''configuration_bridgetower''': [
        '''BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''BridgeTowerConfig''',
        '''BridgeTowerTextConfig''',
        '''BridgeTowerVisionConfig''',
    ],
    '''processing_bridgetower''': ['''BridgeTowerProcessor'''],
}

try:
  if not is_vision_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a=  ['''BridgeTowerImageProcessor''']

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a=  [
      '''BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''BridgeTowerForContrastiveLearning''',
      '''BridgeTowerForImageAndTextRetrieval''',
      '''BridgeTowerForMaskedLM''',
      '''BridgeTowerModel''',
      '''BridgeTowerPreTrainedModel''',
  ]


if TYPE_CHECKING:
  from .configuration_bridgetower import (
      BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP,
      BridgeTowerConfig,
      BridgeTowerTextConfig,
      BridgeTowerVisionConfig,
  )
  from .processing_bridgetower import BridgeTowerProcessor

  try:
    if not is_vision_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .image_processing_bridgetower import BridgeTowerImageProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_bridgetower import (
        BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST,
        BridgeTowerForContrastiveLearning,
        BridgeTowerForImageAndTextRetrieval,
        BridgeTowerForMaskedLM,
        BridgeTowerModel,
        BridgeTowerPreTrainedModel,
    )


else:
  import sys

  a=  _LazyModule(__name__, globals()['''__file__'''], _import_structure)



