





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 						=      {
    "facebook/levit-128S": "https://huggingface.co/facebook/levit-128S/resolve/main/config.json",
    # See all LeViT models at https://huggingface.co/models?filter=levit
}






class 					__A    (    lowerCAmelCase ):

			'''simple docstring'''







			lowerCAmelCase_							     =						"""levit"""





			def __init__(    self       ,  __lowerCAmelCase=2_2_4       ,  __lowerCAmelCase=3       ,  __lowerCAmelCase=3       ,  __lowerCAmelCase=2       ,  __lowerCAmelCase=1       ,  __lowerCAmelCase=1_6       ,  __lowerCAmelCase=[1_2_8, 2_5_6, 3_8_4]       ,  __lowerCAmelCase=[4, 8, 1_2]       ,  __lowerCAmelCase=[4, 4, 4]       ,  __lowerCAmelCase=[1_6, 1_6, 1_6]       ,  __lowerCAmelCase=0       ,  __lowerCAmelCase=[2, 2, 2]       ,  __lowerCAmelCase=[2, 2, 2]       ,  __lowerCAmelCase=0.02       ,  **__lowerCAmelCase       ,  ):



				'''simple docstring'''







				super().__init__(**__lowerCAmelCase							)
				lowerCamelCase__								=		image_size
				lowerCamelCase__								=		num_channels
				lowerCamelCase__								=		kernel_size
				lowerCamelCase__								=		stride
				lowerCamelCase__								=		padding
				lowerCamelCase__								=		hidden_sizes
				lowerCamelCase__								=		num_attention_heads
				lowerCamelCase__								=		depths
				lowerCamelCase__								=		key_dim
				lowerCamelCase__								=		drop_path_rate
				lowerCamelCase__								=		patch_size
				lowerCamelCase__								=		attention_ratio
				lowerCamelCase__								=		mlp_ratio
				lowerCamelCase__								=		initializer_range
				lowerCamelCase__								=		[
				    ['''Subsample''', key_dim[0], hidden_sizes[0] // key_dim[0], 4, 2, 2],
				    ['''Subsample''', key_dim[0], hidden_sizes[1] // key_dim[0], 4, 2, 2],
				]






class 					__A    (    lowerCAmelCase ):

			'''simple docstring'''







			lowerCAmelCase_							     =						version.parse("""1.11""" )





			@property
			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







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





			@property
			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







				return 1E-4










def lowerCAmelCase__(__snake_case							)				->      str:







	'''simple docstring'''







	return "".join(chr(ord(__snake_case							) - 32							) if '''a''' <= char <= '''z''' else char for char in word							)


if __name__ == "__main__":
			from doctest import testmod

			testmod()



