


lowerCAmelCase__ 						=					'\n# Transformers installation\n! pip install transformers datasets\n# To install from source instead of the last release, comment the command above and uncomment the following one.\n# ! pip install git+https://github.com/huggingface/transformers.git\n'

lowerCAmelCase__ 						=					[{'type': 'code', 'content': INSTALL_CONTENT}]
lowerCAmelCase__ 						=					{
    '{processor_class}': 'FakeProcessorClass',
    '{model_class}': 'FakeModelClass',
    '{object_class}': 'FakeObjectClass',
}

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

__UpperCAmelCase					={
    "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__ (  UpperCAmelCase__					):
     lowerCamelCase    :	Optional[Any]				="levit"






     def __init__(					self						:						Optional[int]    ,							a						:						int=2_24    ,							a						:						Union[str, Any]=3    ,							a						:						List[Any]=3    ,							a						:						Dict=2    ,							a						:						Tuple=1    ,							a						:						Optional[int]=16    ,							a						:						Optional[Any]=[1_28, 2_56, 3_84]    ,							a						:						Dict=[4, 8, 12]    ,							a						:						Optional[Any]=[4, 4, 4]    ,							a						:						Optional[int]=[16, 16, 16]    ,							a						:						Any=0    ,							a						:						List[Any]=[2, 2, 2]    ,							a						:						Optional[Any]=[2, 2, 2]    ,							a						:						Union[str, Any]=0.02    ,							**a						:						Optional[int]    ,							):





         """simple docstring"""



         super().__init__(**a       )
         __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__ (  UpperCAmelCase__					):
     lowerCamelCase    :	Tuple				=version.parse("1.11"					)






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						Optional[int]       ):





         """simple docstring"""



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






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						Union[str, Any]       ):





         """simple docstring"""



         return 1e-4
