'''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


_lowercase			:  List[Any]   							=	logging.get_logger(__name__)

_lowercase			:  str   							=	{
    "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 			lowerCAmelCase__       (  _UpperCAmelCase					):
					lowerCAmelCase_					       =					"levit"






					def __init__(       self    ,							__SCREAMING_SNAKE_CASE=2_24    ,							__SCREAMING_SNAKE_CASE=3    ,							__SCREAMING_SNAKE_CASE=3    ,							__SCREAMING_SNAKE_CASE=2    ,							__SCREAMING_SNAKE_CASE=1    ,							__SCREAMING_SNAKE_CASE=16    ,							__SCREAMING_SNAKE_CASE=[1_28, 2_56, 3_84]    ,							__SCREAMING_SNAKE_CASE=[4, 8, 12]    ,							__SCREAMING_SNAKE_CASE=[4, 4, 4]    ,							__SCREAMING_SNAKE_CASE=[16, 16, 16]    ,							__SCREAMING_SNAKE_CASE=0    ,							__SCREAMING_SNAKE_CASE=[2, 2, 2]    ,							__SCREAMING_SNAKE_CASE=[2, 2, 2]    ,							__SCREAMING_SNAKE_CASE=0.02    ,							**__SCREAMING_SNAKE_CASE    ,							):


											"""simple docstring"""





											super().__init__(**_UpperCAmelCase		)
											lowercase_     :					List[Any]													=	image_size
											lowercase_     :					Union[str, Any]													=	num_channels
											lowercase_     :					List[Any]													=	kernel_size
											lowercase_     :					Optional[int]													=	stride
											lowercase_     :					Optional[int]													=	padding
											lowercase_     :					Optional[int]													=	hidden_sizes
											lowercase_     :					List[Any]													=	num_attention_heads
											lowercase_     :					Any													=	depths
											lowercase_     :					List[str]													=	key_dim
											lowercase_     :					Tuple													=	drop_path_rate
											lowercase_     :					int													=	patch_size
											lowercase_     :					Any													=	attention_ratio
											lowercase_     :					Dict													=	mlp_ratio
											lowercase_     :					List[str]													=	initializer_range
											lowercase_     :					Optional[Any]													=	[
											    ['''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 			lowerCAmelCase__       (  _UpperCAmelCase					):
					lowerCAmelCase_					       =					version.parse('''1.11'''					)






					@property
					def      _snake_case   (       self		):


											"""simple docstring"""





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






					@property
					def      _snake_case   (       self		):


											"""simple docstring"""





											return 1E-4





'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowercase			:  List[Any]   							=	{
    "configuration_x_clip": [
        "XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "XCLIPConfig",
        "XCLIPTextConfig",
        "XCLIPVisionConfig",
    ],
    "processing_x_clip": ["XCLIPProcessor"],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							_lowercase			:  int   							=	[
							    "XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST",
							    "XCLIPModel",
							    "XCLIPPreTrainedModel",
							    "XCLIPTextModel",
							    "XCLIPVisionModel",
							]

if TYPE_CHECKING:
							from .configuration_x_clip import (
							    XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    XCLIPConfig,
							    XCLIPTextConfig,
							    XCLIPVisionConfig,
							)
							from .processing_x_clip import XCLIPProcessor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_x_clip import (
														    XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
														    XCLIPModel,
														    XCLIPPreTrainedModel,
														    XCLIPTextModel,
														    XCLIPVisionModel,
														)

else:
							import sys

							_lowercase			:  List[str]   							=	_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



