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

_UpperCAmelCase    :     Any         =       {
    '''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 lowercase_       (		_UpperCamelCase			):







   """simple docstring"""

   __lowerCAmelCase         =   "levit"
   def __init__(      self      :			List[Any], UpperCamelCase__      :			str=2_24, UpperCamelCase__      :			str=3, UpperCamelCase__      :			Dict=3, UpperCamelCase__      :			Any=2, UpperCamelCase__      :			str=1, UpperCamelCase__      :			List[str]=16, UpperCamelCase__      :			Any=[1_28, 2_56, 3_84], UpperCamelCase__      :			str=[4, 8, 12], UpperCamelCase__      :			Tuple=[4, 4, 4], UpperCamelCase__      :			int=[16, 16, 16], UpperCamelCase__      :			int=0, UpperCamelCase__      :			List[str]=[2, 2, 2], UpperCamelCase__      :			Union[str, Any]=[2, 2, 2], UpperCamelCase__      :			List[Any]=0.02, **UpperCamelCase__      :			int, )  ->			Any:
        super().__init__(**UpperCamelCase__     )
        _A    		=  image_size
        _A    		=  num_channels
        _A    		=  kernel_size
        _A    		=  stride
        _A    		=  padding
        _A    		=  hidden_sizes
        _A    		=  num_attention_heads
        _A    		=  depths
        _A    		=  key_dim
        _A    		=  drop_path_rate
        _A    		=  patch_size
        _A    		=  attention_ratio
        _A    		=  mlp_ratio
        _A    		=  initializer_range
        _A    		=  [
            ['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 lowercase_       (		_UpperCamelCase			):







   """simple docstring"""

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

   @property
   def 	__UpperCAmelCase   (      self      :			str     )  ->			float:
        return 1e-4






_lowerCAmelCase  :      int			 ="""
# Installazione di Transformers
! pip install transformers datasets
# Per installare dalla fonte invece dell'ultima versione rilasciata, commenta il comando sopra e
# rimuovi la modalità commento al comando seguente.
# ! pip install git+https://github.com/huggingface/transformers.git
"""

_lowerCAmelCase  :      List[str]			 =[{"""type""": """code""", """content""": INSTALL_CONTENT}]
_lowerCAmelCase  :      int			 ={
    """{processor_class}""": """FakeProcessorClass""",
    """{model_class}""": """FakeModelClass""",
    """{object_class}""": """FakeObjectClass""",
}