
"""simple docstring"""


from __future__ import annotations

from collections.abc import Iterator
from typing import Any




class    __lowerCamelCase     :




				def __init__(							self       ,	UpperCAmelCase      ):
							lowerCamelCase_ 		=     data
							lowerCamelCase_ 		=     None





				def __str__(							self      ):
							return f"{self.data}"




class    __lowerCamelCase     :




				def __init__(							self      ):
							lowerCamelCase_ 		=     None
							lowerCamelCase_ 		=     None




				def __iter__(							self      ):
							lowerCamelCase_ 		=     self.front
							while node:
										yield node.data
										lowerCamelCase_ 		=     node.next




				def __len__(							self      ):
							return len(tuple(iter(self      )      )      )




				def __str__(							self      ):
							return " <- ".join(str(UpperCAmelCase      ) for item in self      )




				def 					UpperCAmelCase__	(							self      ):
							return len(self      ) == 0




				def 					UpperCAmelCase__	(							self       ,	UpperCAmelCase      ):
							lowerCamelCase_ 		=     Node(UpperCAmelCase      )
							if self.is_empty():
										lowerCamelCase_ 		=     lowerCamelCase_ 		=     node
							else:
										assert isinstance(self.rear       ,	UpperCAmelCase      )
										lowerCamelCase_ 		=     node
										lowerCamelCase_ 		=     node




				def 					UpperCAmelCase__	(							self      ):
							if self.is_empty():
										raise IndexError('''dequeue from empty queue'''      )
							assert isinstance(self.front       ,	UpperCAmelCase      )
							lowerCamelCase_ 		=     self.front
							lowerCamelCase_ 		=     self.front.next
							if self.front is None:
										lowerCamelCase_ 		=     None
							return node.data





				def 					UpperCAmelCase__	(							self      ):
							lowerCamelCase_ 		=     lowerCamelCase_ 		=     None


if __name__ == "__main__":
						from doctest import testmod

						testmod()





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


A_						       =				logging.get_logger(__name__)

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




class    __lowerCamelCase     (   lowerCAmelCase ):
				a__:			Any									=						'swiftformer'




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




class    __lowerCamelCase     (   lowerCAmelCase ):
				a__:			str									=						version.parse('1.11' )




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





				@property
				def 					UpperCAmelCase__	(							self      ):
							return 1e-4



