





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


_lowerCamelCase					:						int					     =							logging.get_logger(__name__)

_lowerCamelCase					:						List[Any]					     =							{
    'MBZUAI/swiftformer-xs': 'https://huggingface.co/MBZUAI/swiftformer-xs/resolve/main/config.json',
}



class 				__UpperCAmelCase	(							__A    ):







		'''simple docstring'''







		__lowerCAmelCase								=     "swiftformer"







		def __init__(self    :   Optional[Any]   ,   _lowerCAmelCase    :   List[Any]=3   ,   _lowerCAmelCase    :   Tuple=[3, 3, 6, 4]   ,   _lowerCAmelCase    :   Dict=[48, 56, 112, 220]   ,   _lowerCAmelCase    :   str=4   ,   _lowerCAmelCase    :   Optional[Any]=[True, True, True, True]   ,   _lowerCAmelCase    :   Dict="gelu"   ,   _lowerCAmelCase    :   int=3   ,   _lowerCAmelCase    :   Optional[Any]=2   ,   _lowerCAmelCase    :   List[Any]=1   ,   _lowerCAmelCase    :   Tuple=0.0   ,   _lowerCAmelCase    :   Optional[Any]=True   ,   _lowerCAmelCase    :   Union[str, Any]=1e-5   ,   _lowerCAmelCase    :   Tuple=1e-5   ,   **_lowerCAmelCase    :   int   ,   ):
			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 				__UpperCAmelCase	(							__A    ):







		'''simple docstring'''







		__lowerCAmelCase								=     version.parse('''1.11'''    )







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







		@property
		def 							A  (self    :   Union[str, Any]   ):
			return 1e-4


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


UpperCamelCase    				=		{'''configuration_vit_hybrid''': ['''VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ViTHybridConfig''']}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase    				=		[
          '''VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST''',
          '''ViTHybridForImageClassification''',
          '''ViTHybridModel''',
          '''ViTHybridPreTrainedModel''',
      ]

try:
      if not is_vision_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase    				=		['''ViTHybridImageProcessor''']


if TYPE_CHECKING:
      from .configuration_vit_hybrid import VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTHybridConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_vit_hybrid import (
                VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST,
                ViTHybridForImageClassification,
                ViTHybridModel,
                ViTHybridPreTrainedModel,
            )

      try:
            if not is_vision_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .image_processing_vit_hybrid import ViTHybridImageProcessor


else:
      import sys

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



