




import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
						import ctypes
						import msvcrt  # noqa


						class  A		(  ctypes.Structure     ):
								# _fields is a specific attr expected by ctypes
								__snake_case									=   [('size', ctypes.c_int), ('visible', ctypes.c_byte)]





def __UpperCamelCase			(       ):
						if os.name == "nt":
												lowerCAmelCase_      			=  CursorInfo()
												lowerCAmelCase_      			=  ctypes.windll.kernelaa.GetStdHandle(-11  )
												ctypes.windll.kernelaa.GetConsoleCursorInfo(_A ,  ctypes.byref(_A  )  )
												lowerCAmelCase_      			=  False
												ctypes.windll.kernelaa.SetConsoleCursorInfo(_A ,  ctypes.byref(_A  )  )
						elif os.name == "posix":
												sys.stdout.write('''\033[?25l'''  )
												sys.stdout.flush()





def __UpperCamelCase			(       ):
						if os.name == "nt":
												lowerCAmelCase_      			=  CursorInfo()
												lowerCAmelCase_      			=  ctypes.windll.kernelaa.GetStdHandle(-11  )
												ctypes.windll.kernelaa.GetConsoleCursorInfo(_A ,  ctypes.byref(_A  )  )
												lowerCAmelCase_      			=  True
												ctypes.windll.kernelaa.SetConsoleCursorInfo(_A ,  ctypes.byref(_A  )  )
						elif os.name == "posix":
												sys.stdout.write('''\033[?25h'''  )
												sys.stdout.flush()






@contextmanager
def __UpperCamelCase			(       ):
						try:
												hide_cursor()
												yield
						finally:
												show_cursor()










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  A		(  __UpperCAmelCase     ):
		__snake_case									=   'vit'



		def __init__(     self,	UpperCamelCase__=768,	UpperCamelCase__=12,	UpperCamelCase__=12,	UpperCamelCase__=3072,	UpperCamelCase__="gelu",	UpperCamelCase__=0.0,	UpperCamelCase__=0.0,	UpperCamelCase__=0.02,	UpperCamelCase__=1E-12,	UpperCamelCase__=224,	UpperCamelCase__=16,	UpperCamelCase__=3,	UpperCamelCase__=True,	UpperCamelCase__=16,	**UpperCamelCase__,	):







								"""simple docstring"""



								super().__init__(**UpperCamelCase__   )

								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  A		(  __UpperCAmelCase     ):
		__snake_case									=   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




