






'''simple docstring'''

import os
from distutils.util import strtobool






def 	_UpperCAmelCase    (  a		:	Any						,			a		:	int							)			->			Any:





						"""simple docstring"""
						for e in env_keys:
												lowercase_      :   Optional[Any]        =			int(os.environ.get(a						,			-1							)							)
												if val >= 0:
																		return val
						return default






def 	_UpperCAmelCase    (  a		:	List[Any]						,			a		:	Dict=False							)			->			Optional[Any]:





						"""simple docstring"""
						lowercase_      :   Optional[int]        =			os.environ.get(a						,			str(a							)							)
						return strtobool(a							) == 1  # As its name indicates `strtobool` actually returns an int...






def 	_UpperCAmelCase    (  a		:	List[Any]						,			a		:	Dict="no"							)			->			str:





						"""simple docstring"""
						lowercase_      :   List[Any]        =			os.environ.get(a						,			str(a							)							)
						return value








'''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:      Dict  				=				logging.get_logger(__name__)

A:      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 							__magic_name__     (	UpperCAmelCase_				):







	"""simple docstring"""



	SCREAMING_SNAKE_CASE_					:      Optional[Any]        =  'vit'
	def __init__(							self  ,      _lowercase=768  ,      _lowercase=12  ,      _lowercase=12  ,      _lowercase=3072  ,      _lowercase="gelu"  ,      _lowercase=0.0  ,      _lowercase=0.0  ,      _lowercase=0.02  ,      _lowercase=1E-1_2  ,      _lowercase=224  ,      _lowercase=16  ,      _lowercase=3  ,      _lowercase=True  ,      _lowercase=16  ,      **_lowercase  ,      )						->  List[str]:
							super().__init__(**_lowercase       )

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






class 							__magic_name__     (	UpperCAmelCase_				):







	"""simple docstring"""



	SCREAMING_SNAKE_CASE_					:      Any        =  version.parse('1.11'				)
	@property
	def        lowerCamelCase__		(							self       )						->  Mapping[str, Mapping[int, str]]:
							return OrderedDict(
							    [
							        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
							    ]       )







	@property
	def        lowerCamelCase__		(							self       )						->  float:
							return 1E-4
