





'''simple docstring'''







from __future__ import annotations

from enum import Enum


class        __a   (lowerCAmelCase__  ):
							__a       : List[str]          =							24
							__a       : str          =							21
							__a       : List[str]          =							18
							__a       : Dict          =							15
							__a       : Tuple          =							12
							__a       : Optional[int]          =							9
							__a       : List[Any]          =							6
							__a       : Any          =							3
							__a       : List[Any]          =							2
							__a       : Dict          =							1
							__a       : List[str]          =							-1
							__a       : List[str]          =							-2
							__a       : Any          =							-3
							__a       : Any          =							-6
							__a       : Dict          =							-9
							__a       : int          =							-12
							__a       : List[Any]          =							-15
							__a       : List[Any]          =							-18
							__a       : Dict          =							-21
							__a       : Optional[Any]          =							-24





class        __a   (lowerCAmelCase__  ):
							__a       : Optional[int]          =							8
							__a       : List[Any]          =							7
							__a       : List[str]          =							6
							__a       : Any          =							5
							__a       : Tuple          =							4
							__a       : int          =							3
							__a       : Union[str, Any]          =							2
							__a       : str          =							1





def 							lowerCamelCase_   (	SCREAMING_SNAKE_CASE__   :      List[Any],      SCREAMING_SNAKE_CASE__   :      Optional[int],      SCREAMING_SNAKE_CASE__   :      List[Any],      )			->						Optional[Any]:

						if isinstance(lowerCAmelCase__,      lowerCAmelCase__ ):
												UpperCAmelCase_      :   Optional[Any]      =	SIUnit[known_prefix.lower()]
						if isinstance(lowerCAmelCase__,      lowerCAmelCase__ ):
												UpperCAmelCase_      :   List[str]      =	SIUnit[unknown_prefix.lower()]
						UpperCAmelCase_      :   List[Any]      =	known_amount * (
						    10 ** (known_prefix.value - unknown_prefix.value)
						)
						return unknown_amount





def 							lowerCamelCase_   (	SCREAMING_SNAKE_CASE__   :      Optional[int],      SCREAMING_SNAKE_CASE__   :      Any,      SCREAMING_SNAKE_CASE__   :      str,      )			->						List[str]:

						if isinstance(lowerCAmelCase__,      lowerCAmelCase__ ):
												UpperCAmelCase_      :   Any      =	BinaryUnit[known_prefix.lower()]
						if isinstance(lowerCAmelCase__,      lowerCAmelCase__ ):
												UpperCAmelCase_      :   Union[str, Any]      =	BinaryUnit[unknown_prefix.lower()]
						UpperCAmelCase_      :   Dict      =	known_amount * (
						    2 ** ((known_prefix.value - unknown_prefix.value) * 10)
						)
						return unknown_amount


if __name__ == "__main__":
					import doctest

					doctest.testmod()













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_   :	Optional[Any]							      =logging.get_logger(__name__)

snake_case_   :	Any							      ={
    '''MBZUAI/swiftformer-xs''': '''https://huggingface.co/MBZUAI/swiftformer-xs/resolve/main/config.json''',
}





class        a__      (	lowerCAmelCase__		):
		UpperCAmelCase_							:       Union[str, Any] 					= 'swiftformer'






		def __init__(      self							, lowercase__=3							, lowercase__=[3, 3, 6, 4]							, lowercase__=[48, 56, 112, 220]							, lowercase__=4							, lowercase__=[True, True, True, True]							, lowercase__="gelu"							, lowercase__=3							, lowercase__=2							, lowercase__=1							, lowercase__=0.0							, lowercase__=True							, lowercase__=1e-5							, lowercase__=1e-5							, **lowercase__							, )				->				Optional[Any]:
				super().__init__(**lowercase__						)
				__A    =							num_channels
				__A    =							depths
				__A    =							embed_dims
				__A    =							mlp_ratio
				__A    =							downsamples
				__A    =							hidden_act
				__A    =							down_patch_size
				__A    =							down_stride
				__A    =							down_pad
				__A    =							drop_path_rate
				__A    =							use_layer_scale
				__A    =							layer_scale_init_value
				__A    =							batch_norm_eps





class        a__      (	lowerCAmelCase__		):
		UpperCAmelCase_							:       Union[str, Any] 					= version.parse('1.11'		)






		@property
		def 					_lowerCamelCase					(      self						)				->				Mapping[str, Mapping[int, str]]:
				return OrderedDict(
				    [
				        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
				    ]						)






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

