



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


__snake_case				:  str =       logging.get_logger(__name__)

__snake_case				:  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      A__  (    __SCREAMING_SNAKE_CASE				):




	'''simple docstring'''





	SCREAMING_SNAKE_CASE        =      'levit'

	def __init__(	self:						Dict			,     _SCREAMING_SNAKE_CASE:						Tuple=224			,     _SCREAMING_SNAKE_CASE:						List[str]=3			,     _SCREAMING_SNAKE_CASE:						List[str]=3			,     _SCREAMING_SNAKE_CASE:						List[Any]=2			,     _SCREAMING_SNAKE_CASE:						Tuple=1			,     _SCREAMING_SNAKE_CASE:						Tuple=16			,     _SCREAMING_SNAKE_CASE:						List[str]=[128, 256, 384]			,     _SCREAMING_SNAKE_CASE:						Dict=[4, 8, 12]			,     _SCREAMING_SNAKE_CASE:						Optional[Any]=[4, 4, 4]			,     _SCREAMING_SNAKE_CASE:						Optional[Any]=[16, 16, 16]			,     _SCREAMING_SNAKE_CASE:						Dict=0			,     _SCREAMING_SNAKE_CASE:						Union[str, Any]=[2, 2, 2]			,     _SCREAMING_SNAKE_CASE:						Optional[int]=[2, 2, 2]			,     _SCREAMING_SNAKE_CASE:						List[Any]=0.02			,     **_SCREAMING_SNAKE_CASE:						int			,     )							->			List[str]:

				"""simple docstring"""

				super().__init__(**_SCREAMING_SNAKE_CASE)
				__lowerCAmelCase :    int				=			image_size
				__lowerCAmelCase :    Dict				=			num_channels
				__lowerCAmelCase :    int				=			kernel_size
				__lowerCAmelCase :    Dict				=			stride
				__lowerCAmelCase :    Optional[Any]				=			padding
				__lowerCAmelCase :    str				=			hidden_sizes
				__lowerCAmelCase :    Any				=			num_attention_heads
				__lowerCAmelCase :    int				=			depths
				__lowerCAmelCase :    int				=			key_dim
				__lowerCAmelCase :    int				=			drop_path_rate
				__lowerCAmelCase :    Optional[int]				=			patch_size
				__lowerCAmelCase :    Any				=			attention_ratio
				__lowerCAmelCase :    List[str]				=			mlp_ratio
				__lowerCAmelCase :    int				=			initializer_range
				__lowerCAmelCase :    Optional[int]				=			[
				    ["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__  (    __SCREAMING_SNAKE_CASE				):




	'''simple docstring'''





	SCREAMING_SNAKE_CASE        =      version.parse('1.11'				)

	@property
	def 				_SCREAMING_SNAKE_CASE  (	self:						List[str])							->			Mapping[str, Mapping[int, str]]:

				"""simple docstring"""

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







	@property
	def 				_SCREAMING_SNAKE_CASE  (	self:						Any)							->			float:

				"""simple docstring"""

				return 1e-4




"""simple docstring"""






from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__snake_case				:  Tuple =       {
    'configuration_autoformer': [
        'AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'AutoformerConfig',
    ],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__snake_case				:  Optional[Any] =       [
	    'AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'AutoformerForPrediction',
	    'AutoformerModel',
	    'AutoformerPreTrainedModel',
	]


if TYPE_CHECKING:
	from .configuration_autoformer import (
	    AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    AutoformerConfig,
	)

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_autoformer import (
		    AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    AutoformerForPrediction,
		    AutoformerModel,
		    AutoformerPreTrainedModel,
		)

else:
	import sys

	__snake_case				:  Optional[int] =       _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)