




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				:				List[Any]       							=		logging.get_logger(__name__)

_snake_case				:				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       A   (		_lowercase   ):
							lowercase_          =    'vit'







							def __init__(  self	:  List[Any]							,      lowerCAmelCase_	:  Any=7_68							,      lowerCAmelCase_	:  List[str]=12							,      lowerCAmelCase_	:  int=12							,      lowerCAmelCase_	:  Optional[Any]=30_72							,      lowerCAmelCase_	:  Union[str, Any]="gelu"							,      lowerCAmelCase_	:  List[Any]=0.0							,      lowerCAmelCase_	:  str=0.0							,      lowerCAmelCase_	:  Dict=0.0_2							,      lowerCAmelCase_	:  List[str]=1e-12							,      lowerCAmelCase_	:  List[Any]=2_24							,      lowerCAmelCase_	:  Optional[Any]=16							,      lowerCAmelCase_	:  str=3							,      lowerCAmelCase_	:  str=True							,      lowerCAmelCase_	:  Dict=16							,      **lowerCAmelCase_	:  Any							,      )      ->							Tuple:


														"""simple docstring"""


														super().__init__(**__UpperCamelCase )

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



class       A   (		_lowercase   ):
							lowercase_          =    version.parse('1.11'   )







							@property
							def        __lowerCAmelCase      (  self	:  Any )      ->							Mapping[str, Mapping[int, str]]:


														"""simple docstring"""


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







							@property
							def        __lowerCAmelCase      (  self	:  int )      ->							float:


														"""simple docstring"""


														return 1e-4







'''simple docstring'''


from ..utils import DummyObject, requires_backends

class       A   (		metaclass=_a   ):
							lowercase_          =    ['torch', 'scipy']







							def __init__(  self	:  Tuple							,      *lowerCAmelCase_	:  str							,      **lowerCAmelCase_	:  Any )      ->							Tuple:


														"""simple docstring"""


														requires_backends(self							,      ['''torch''', '''scipy'''] )







							@classmethod
							def        __lowerCAmelCase      (  cls	:  Dict							,      *lowerCAmelCase_	:  Dict							,      **lowerCAmelCase_	:  str )      ->							Tuple:


														"""simple docstring"""


														requires_backends(cls							,      ['''torch''', '''scipy'''] )







							@classmethod
							def        __lowerCAmelCase      (  cls	:  Optional[int]							,      *lowerCAmelCase_	:  str							,      **lowerCAmelCase_	:  List[str] )      ->							str:


														"""simple docstring"""


														requires_backends(cls							,      ['''torch''', '''scipy'''] )

