






class        a__      :





		class        a__      :
				UpperCAmelCase_							:       Dict 					= '_prev', '_data', '_next'






				def __init__(      self							, lowercase__							, lowercase__							, lowercase__						)				->				List[Any]:
						__A    =							link_p
						__A    =							element
						__A    =							link_n






				def 					_lowerCamelCase					(      self						)				->				Optional[Any]:
						return (
						    F""" Prev -> {self._prev is not None}, Next -> {self._next is not None}"""
						)






		def __init__(      self						)				->				Union[str, Any]:
				__A    =							self._Node(lowercase__							, lowercase__							, lowercase__						)
				__A    =							self._Node(lowercase__							, lowercase__							, lowercase__						)
				__A    =							self._trailer
				__A    =							self._header
				__A    =							0






		def __len__(      self						)				->				Tuple:
				return self._size






		def 					_lowerCamelCase					(      self						)				->				List[str]:
				return self.__len__() == 0






		def 					_lowerCamelCase					(      self							, lowercase__							, lowercase__							, lowercase__						)				->				str:
				# Create new_node by setting it's prev.link -> header
				# setting it's next.link -> trailer
				__A    =							self._Node(lowercase__							, lowercase__							, lowercase__						)
				__A    =							new_node
				__A    =							new_node
				self._size += 1
				return self






		def 					_lowerCamelCase					(      self							, lowercase__						)				->				Tuple:
				__A    =							node._prev
				__A    =							node._next

				__A    =							successor
				__A    =							predecessor
				self._size -= 1
				__A    =							node._data
				__A    =							__A    =							__A    =							None
				del node
				return temp





class        a__      (	_DoublyLinkedBase		):






		def 					_lowerCamelCase					(      self						)				->				int:
				if self.is_empty():
						raise Exception("List is empty"						)
				return self._header._next._data






		def 					_lowerCamelCase					(      self						)				->				Optional[int]:
				if self.is_empty():
						raise Exception("List is empty"						)
				return self._trailer._prev._data






		def 					_lowerCamelCase					(      self							, lowercase__						)				->				List[str]:
				return self._insert(self._header							, lowercase__							, self._header._next						)






		def 					_lowerCamelCase					(      self							, lowercase__						)				->				int:
				return self._insert(self._trailer._prev							, lowercase__							, self._trailer						)






		def 					_lowerCamelCase					(      self						)				->				Tuple:
				if self.is_empty():
						raise IndexError("remove_first from empty list"						)
				return self._delete(self._header._next						)






		def 					_lowerCamelCase					(      self						)				->				List[str]:
				if self.is_empty():
						raise IndexError("remove_first from empty list"						)
				return self._delete(self._trailer._prev						)









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

