






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 	lowercase_      (			lowercase     ):






      '''simple docstring'''




      __snake_case  						=						'''swiftformer'''







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




       """simple docstring"""


       super().__init__(**__UpperCAmelCase						)
       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 	lowercase_      (			lowercase     ):






      '''simple docstring'''




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







      @property
      def    __lowerCAmelCase      (   self   :		int						)					->Mapping[str, Mapping[int, str]]:




       """simple docstring"""


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







      @property
      def    __lowerCAmelCase      (   self   :		Dict						)					->float:




       """simple docstring"""


       return 1e-4










from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCAmelCase__            =	{"configuration_visual_bert": ["VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "VisualBertConfig"]}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCAmelCase__            =	[
         "VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST",
         "VisualBertForMultipleChoice",
         "VisualBertForPreTraining",
         "VisualBertForQuestionAnswering",
         "VisualBertForRegionToPhraseAlignment",
         "VisualBertForVisualReasoning",
         "VisualBertLayer",
         "VisualBertModel",
         "VisualBertPreTrainedModel",
     ]


if TYPE_CHECKING:
     from .configuration_visual_bert import VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, VisualBertConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_visual_bert import (
              VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
              VisualBertForMultipleChoice,
              VisualBertForPreTraining,
              VisualBertForQuestionAnswering,
              VisualBertForRegionToPhraseAlignment,
              VisualBertForVisualReasoning,
              VisualBertLayer,
              VisualBertModel,
              VisualBertPreTrainedModel,
          )


else:
     import sys

     UpperCAmelCase__            =	_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


