

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


_UpperCamelCase						:  str							       =				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 				_snake_case					(   a_			):
  SCREAMING_SNAKE_CASE			:       Optional[Any]				=     '''vit'''

  def __init__(				self      , _SCREAMING_SNAKE_CASE=7_68      , _SCREAMING_SNAKE_CASE=12      , _SCREAMING_SNAKE_CASE=12      , _SCREAMING_SNAKE_CASE=30_72      , _SCREAMING_SNAKE_CASE="gelu"      , _SCREAMING_SNAKE_CASE=0.0      , _SCREAMING_SNAKE_CASE=0.0      , _SCREAMING_SNAKE_CASE=0.02      , _SCREAMING_SNAKE_CASE=1e-12      , _SCREAMING_SNAKE_CASE=2_24      , _SCREAMING_SNAKE_CASE=16      , _SCREAMING_SNAKE_CASE=3      , _SCREAMING_SNAKE_CASE=True      , _SCREAMING_SNAKE_CASE=16      , **_SCREAMING_SNAKE_CASE      , ):





      '''simple docstring'''

      super().__init__(**_SCREAMING_SNAKE_CASE	)

      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 				_snake_case					(   a_			):
  SCREAMING_SNAKE_CASE			:       Optional[int]				=     version.parse('''1.11'''			)

  @property
  def   _SCREAMING_SNAKE_CASE				(				self	):





      '''simple docstring'''

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


  @property
  def   _SCREAMING_SNAKE_CASE				(				self	):





      '''simple docstring'''

      return 1e-4








'''simple docstring'''



from ..utils import DummyObject, requires_backends



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       int				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       List[Any]				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       int				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       Dict				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       List[Any]				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)



class 				_snake_case					(   metaclass=a_			):
  SCREAMING_SNAKE_CASE			:       Optional[Any]				=     ['''torch''', '''transformers''', '''onnx''']

  def __init__(				self      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(self      , ['torch', 'transformers', 'onnx']	)

  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)


  @classmethod
  def   _SCREAMING_SNAKE_CASE				(				cls      , *_SCREAMING_SNAKE_CASE      , **_SCREAMING_SNAKE_CASE	):





      '''simple docstring'''

      requires_backends(cls      , ['torch', 'transformers', 'onnx']	)





