





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


__A       : Optional[Any]						    = logging.get_logger(__name__)

__A       : Optional[int]						    = {
    "MBZUAI/swiftformer-xs": "https://huggingface.co/MBZUAI/swiftformer-xs/resolve/main/config.json",
}







class     lowerCamelCase(	a_  ):
     '''simple docstring'''


     __magic_name__        = 'swiftformer'




     def __init__(						self							,    snake_case_=3							,    snake_case_=[3, 3, 6, 4]							,    snake_case_=[48, 56, 112, 220]							,    snake_case_=4							,    snake_case_=[True, True, True, True]							,    snake_case_="gelu"							,    snake_case_=3							,    snake_case_=2							,    snake_case_=1							,    snake_case_=0.0							,    snake_case_=True							,    snake_case_=1E-5							,    snake_case_=1E-5							,    **snake_case_							,    ):
         super().__init__(**snake_case_       )
         _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     lowerCamelCase(	a_  ):
     '''simple docstring'''


     __magic_name__        = version.parse('1.11'  )




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




     @property
     def 					lowerCAmelCase__		(						self       ):
         return 1E-4












from typing import TYPE_CHECKING

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


__A       : Dict						    = {"configuration_hubert": ["HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "HubertConfig"]}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __A       : List[str]						    = [
     "HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST",
     "HubertForCTC",
     "HubertForSequenceClassification",
     "HubertModel",
     "HubertPreTrainedModel",
 ]


try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __A       : Tuple						    = [
     "TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST",
     "TFHubertForCTC",
     "TFHubertModel",
     "TFHubertPreTrainedModel",
 ]

if TYPE_CHECKING:
 from .configuration_hubert import HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, HubertConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_hubert import (
      HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      HubertForCTC,
      HubertForSequenceClassification,
      HubertModel,
      HubertPreTrainedModel,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_hubert import (
      TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFHubertForCTC,
      TFHubertModel,
      TFHubertPreTrainedModel,
  )


else:
 import sys

 __A       : Dict						    = _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





