code: 
  """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 A_			(SCREAMING_SNAKE_CASE__   ):
  
  
  
  
  		'''simple docstring'''
  		SCREAMING_SNAKE_CASE__    :		int						  =	"""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_       ,     ):
  
  					"""simple docstring"""
  					super().__init__(**lowercase_						)
  					UpperCAmelCase_      :      Optional[Any]      =					num_channels
  					UpperCAmelCase_      :      Any      =					depths
  					UpperCAmelCase_      :      List[Any]      =					embed_dims
  					UpperCAmelCase_      :      Dict      =					mlp_ratio
  					UpperCAmelCase_      :      Any      =					downsamples
  					UpperCAmelCase_      :      int      =					hidden_act
  					UpperCAmelCase_      :      Any      =					down_patch_size
  					UpperCAmelCase_      :      Any      =					down_stride
  					UpperCAmelCase_      :      Optional[Any]      =					down_pad
  					UpperCAmelCase_      :      List[str]      =					drop_path_rate
  					UpperCAmelCase_      :      Any      =					use_layer_scale
  					UpperCAmelCase_      :      Tuple      =					layer_scale_init_value
  					UpperCAmelCase_      :      Dict      =					batch_norm_eps
  
  
  
  
  class A_			(SCREAMING_SNAKE_CASE__   ):
  
  
  
  
  		'''simple docstring'''
  		SCREAMING_SNAKE_CASE__    :		str						  =	version.parse("""1.11"""   )
  
  
  
  
  
  
  
  		@property
  		def  UpperCamelCase__      (	self						):
  
  					"""simple docstring"""
  					return OrderedDict(
  					    [
  					        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
  					    ]						)
  
  
  
  
  
  
  
  		@property
  		def  UpperCamelCase__      (	self						):
  
  					"""simple docstring"""
  					return 1E-4
  
  
  
style_context: 
  """simple docstring"""
  
  
  
  
  
  from .hash_table import HashTable
  
  
  class A_			(lowercase__   ):
  
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
  
    def __init__(	self       ,     *lowercase_       ,     **lowercase_						):
  
       """simple docstring"""
       super().__init__(*lowercase_       ,     **lowercase_						)
  
  
  
  
  
  
  
    def  UpperCamelCase__      (	self       ,     lowercase_       ,     lowercase_=None						):
  
       """simple docstring"""
       UpperCAmelCase_      :      Tuple      =					1
       UpperCAmelCase_      :      List[str]      =					self.hash_function(key + i * i						)
  
       while self.values[new_key] is not None and self.values[new_key] != key:
          i += 1
          UpperCAmelCase_      :      List[Any]      =					(
              self.hash_function(key + i * i						)
              if not self.balanced_factor() >= self.lim_charge
              else None
          )
  
          if new_key is None:
             break
  
       return new_key
  
  
  