



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


SCREAMING_SNAKE_CASE				:     str          =	logging.get_logger(__name__)

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


class       __lowerCamelCase	(   __lowercase    ):
   __UpperCamelCase									=   'swiftformer'







   def __init__(self       ,	lowerCamelCase=3       ,	lowerCamelCase=[3, 3, 6, 4]       ,	lowerCamelCase=[48, 56, 112, 220]       ,	lowerCamelCase=4       ,	lowerCamelCase=[True, True, True, True]       ,	lowerCamelCase="gelu"       ,	lowerCamelCase=3       ,	lowerCamelCase=2       ,	lowerCamelCase=1       ,	lowerCamelCase=0.0       ,	lowerCamelCase=True       ,	lowerCamelCase=1e-5       ,	lowerCamelCase=1e-5       ,	**lowerCamelCase       ,	):




      '''simple docstring'''




      super().__init__(**lowerCamelCase				)
      _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	(   __lowercase    ):
   __UpperCamelCase									=   version.parse('1.11'    )







   @property
   def 							A__						(self				):




      '''simple docstring'''




      return OrderedDict(
          [
              ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
          ]				)







   @property
   def 							A__						(self				):




      '''simple docstring'''




      return 1e-4




"""simple docstring"""





from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


SCREAMING_SNAKE_CASE				:     Union[str, Any]          =	{
    '''configuration_align''': [
        '''ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''AlignConfig''',
        '''AlignTextConfig''',
        '''AlignVisionConfig''',
    ],
    '''processing_align''': ['''AlignProcessor'''],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  SCREAMING_SNAKE_CASE				:     Any          =	[
      '''ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''AlignModel''',
      '''AlignPreTrainedModel''',
      '''AlignTextModel''',
      '''AlignVisionModel''',
  ]

if TYPE_CHECKING:
  from .configuration_align import (
      ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP,
      AlignConfig,
      AlignTextConfig,
      AlignVisionConfig,
  )
  from .processing_align import AlignProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_align import (
        ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST,
        AlignModel,
        AlignPreTrainedModel,
        AlignTextModel,
        AlignVisionModel,
    )

else:
  import sys

  SCREAMING_SNAKE_CASE				:     Any          =	_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)