


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


A_														=      logging.get_logger(__name__)

A_														=      {
    "MBZUAI/swiftformer-xs": "https://huggingface.co/MBZUAI/swiftformer-xs/resolve/main/config.json",
}

class 						snake_case			(       UpperCamelCase__	):
			'''simple docstring'''

			UpperCAmelCase       :       str       = """swiftformer"""

			def __init__(	self     :     List[Any]							,							lowerCAmelCase_     :     int=3							,							lowerCAmelCase_     :     Dict=[3, 3, 6, 4]							,							lowerCAmelCase_     :     Optional[int]=[48, 56, 112, 220]							,							lowerCAmelCase_     :     Optional[int]=4							,							lowerCAmelCase_     :     int=[True, True, True, True]							,							lowerCAmelCase_     :     List[str]="gelu"							,							lowerCAmelCase_     :     int=3							,							lowerCAmelCase_     :     Any=2							,							lowerCAmelCase_     :     str=1							,							lowerCAmelCase_     :     Tuple=0.0							,							lowerCAmelCase_     :     str=True							,							lowerCAmelCase_     :     Optional[Any]=1e-5							,							lowerCAmelCase_     :     str=1e-5							,							**lowerCAmelCase_     :     List[str]							,							)					->					Tuple:




								"""simple docstring"""






								super().__init__(**snake_case_					)
								SCREAMING_SNAKE_CASE_	      =       num_channels
								SCREAMING_SNAKE_CASE_	      =       depths
								SCREAMING_SNAKE_CASE_	      =       embed_dims
								SCREAMING_SNAKE_CASE_	      =       mlp_ratio
								SCREAMING_SNAKE_CASE_	      =       downsamples
								SCREAMING_SNAKE_CASE_	      =       hidden_act
								SCREAMING_SNAKE_CASE_	      =       down_patch_size
								SCREAMING_SNAKE_CASE_	      =       down_stride
								SCREAMING_SNAKE_CASE_	      =       down_pad
								SCREAMING_SNAKE_CASE_	      =       drop_path_rate
								SCREAMING_SNAKE_CASE_	      =       use_layer_scale
								SCREAMING_SNAKE_CASE_	      =       layer_scale_init_value
								SCREAMING_SNAKE_CASE_	      =       batch_norm_eps

class 						snake_case			(       UpperCamelCase__	):
			'''simple docstring'''

			UpperCAmelCase       :       Tuple       = version.parse("""1.11"""	)

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




								"""simple docstring"""






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




			@property
			def _lowercase (	self     :     str					)					->					float:




								"""simple docstring"""






								return 1e-4






def 							UpperCAmelCase				(     UpperCAmelCase      )->		bool:







					'''simple docstring'''



					if not isinstance(UpperCAmelCase				,UpperCAmelCase      ):
										SCREAMING_SNAKE_CASE_	      =       f'''Input value of [number={number}] must be an integer'''
										raise TypeError(UpperCAmelCase      )
					if number < 0 or number % 2 == 1:
										return False
					SCREAMING_SNAKE_CASE_	      =       int(number**0.5      )
					return number == number_sqrt * (number_sqrt + 1)


if __name__ == "__main__":
		import doctest

		doctest.testmod()


