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


UpperCamelCase    				=		logging.get_logger(__name__)

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



class     snake_case_			(						__A			):
   __A      :						List[Any]   =							"swiftformer"






   def __init__( self							:	Optional[Any]      ,		lowercase_							:	List[Any]=3      ,		lowercase_							:	Tuple=[3, 3, 6, 4]      ,		lowercase_							:	Dict=[48, 56, 1_12, 2_20]      ,		lowercase_							:	str=4      ,		lowercase_							:	Optional[Any]=[True, True, True, True]      ,		lowercase_							:	Dict="gelu"      ,		lowercase_							:	int=3      ,		lowercase_							:	Optional[Any]=2      ,		lowercase_							:	List[Any]=1      ,		lowercase_							:	Tuple=0.0      ,		lowercase_							:	Optional[Any]=True      ,		lowercase_							:	Union[str, Any]=1E-5      ,		lowercase_							:	Tuple=1E-5      ,		**lowercase_							:	int      ,		)   ->		List[str]:
       super().__init__(**lowercase_    )
       lowercase__					:  List[str]          =							num_channels
       lowercase__					:  Optional[Any]          =							depths
       lowercase__					:  Union[str, Any]          =							embed_dims
       lowercase__					:  Tuple          =							mlp_ratio
       lowercase__					:  str          =							downsamples
       lowercase__					:  Optional[Any]          =							hidden_act
       lowercase__					:  Dict          =							down_patch_size
       lowercase__					:  List[str]          =							down_stride
       lowercase__					:  List[str]          =							down_pad
       lowercase__					:  Optional[int]          =							drop_path_rate
       lowercase__					:  Optional[int]          =							use_layer_scale
       lowercase__					:  Optional[Any]          =							layer_scale_init_value
       lowercase__					:  Optional[int]          =							batch_norm_eps



class     snake_case_			(						__A			):
   __A      :						int   =							version.parse("1.11"			)






   @property
   def  __UpperCamelCase	( self							:	Optional[int]    )   ->		Mapping[str, Mapping[int, str]]:
       return OrderedDict(
           [
               ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
           ]    )







   @property
   def  __UpperCamelCase	( self							:	Union[str, Any]    )   ->		float:
       return 1E-4




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCamelCase    				=		{'''configuration_dinat''': ['''DINAT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''DinatConfig''']}


try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase    				=		[
          '''DINAT_PRETRAINED_MODEL_ARCHIVE_LIST''',
          '''DinatForImageClassification''',
          '''DinatModel''',
          '''DinatPreTrainedModel''',
          '''DinatBackbone''',
      ]

if TYPE_CHECKING:
      from .configuration_dinat import DINAT_PRETRAINED_CONFIG_ARCHIVE_MAP, DinatConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_dinat import (
                DINAT_PRETRAINED_MODEL_ARCHIVE_LIST,
                DinatBackbone,
                DinatForImageClassification,
                DinatModel,
                DinatPreTrainedModel,
            )

else:
      import sys

      UpperCamelCase    				=		_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



