code: 
  
  
  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             =	logging.get_logger(__name__)
  
  __snake_case             =	{
      'MBZUAI/swiftformer-xs': 'https://huggingface.co/MBZUAI/swiftformer-xs/resolve/main/config.json',
  }
  
  
  
  class   __lowerCamelCase (lowercase_	):
         _lowercase       							=    """swiftformer"""
  
  
  
  
  
  
  
         def __init__( self:   List[str],A_:   Optional[int]=3,A_:   int=[3, 3, 6, 4],A_:   Tuple=[48, 56, 112, 220],A_:   Optional[Any]=4,A_:   str=[True, True, True, True],A_:   int="gelu",A_:   int=3,A_:   Optional[int]=2,A_:   int=1,A_:   Any=0.0,A_:   List[str]=True,A_:   Any=1E-5,A_:   List[str]=1E-5,**A_:   List[str],):
  
  
  
  
  
  
              '''simple docstring'''
  
  
  
  
              super().__init__(**A_				)
              __UpperCamelCase   = num_channels
              __UpperCamelCase   = depths
              __UpperCamelCase   = embed_dims
              __UpperCamelCase   = mlp_ratio
              __UpperCamelCase   = downsamples
              __UpperCamelCase   = hidden_act
              __UpperCamelCase   = down_patch_size
              __UpperCamelCase   = down_stride
              __UpperCamelCase   = down_pad
              __UpperCamelCase   = drop_path_rate
              __UpperCamelCase   = use_layer_scale
              __UpperCamelCase   = layer_scale_init_value
              __UpperCamelCase   = batch_norm_eps
  
  
  
  class   __lowerCamelCase (lowercase_	):
         _lowercase       							=    version.parse("""1.11"""	)
  
  
  
  
  
  
  
         @property
         def 		snake_case_  ( self:   str				):
  
  
  
  
  
  
              '''simple docstring'''
  
  
  
  
              return OrderedDict(
                  [
                      ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
                  ]				)
  
  
  
  
  
  
  
         @property
         def 		snake_case_  ( self:   Union[str, Any]				):
  
  
  
  
  
  
              '''simple docstring'''
  
  
  
  
              return 1E-4
  
  
  
style_context: 
  
  
  from ..utils import DummyObject, requires_backends
  
  
  
  class   __lowerCamelCase (metaclass=_a	):
         _lowercase       							=    ["""torch""", """transformers""", """k_diffusion"""]
  
  
  
  
  
  
  
         def __init__( self:   Tuple,*A_:   Union[str, Any],**A_:   Tuple				):
  
  
  
  
  
  
              '''simple docstring'''
  
  
  
  
              requires_backends(self,['torch', 'transformers', 'k_diffusion']				)
  
  
  
  
  
  
  
         @classmethod
         def 		snake_case_  ( cls:   int,*A_:   Optional[Any],**A_:   Tuple				):
  
  
  
  
  
  
              '''simple docstring'''
  
  
  
  
              requires_backends(cls,['torch', 'transformers', 'k_diffusion']				)
  
  
  
  
  
  
  
         @classmethod
         def 		snake_case_  ( cls:   int,*A_:   Tuple,**A_:   Tuple				):
  
  
  
  
  
  
              '''simple docstring'''
  
  
  
  
              requires_backends(cls,['torch', 'transformers', 'k_diffusion']				)
  
  
  