


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		      = logging.get_logger(__name__)

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




class A						(     lowerCAmelCase__  ):
      UpperCamelCase__							:						Dict   ="""swiftformer"""






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




             super().__init__(**lowerCAmelCase_				)
             _lowerCamelCase :	str						=num_channels
             _lowerCamelCase :	str						=depths
             _lowerCamelCase :	Tuple						=embed_dims
             _lowerCamelCase :	int						=mlp_ratio
             _lowerCamelCase :	Any						=downsamples
             _lowerCamelCase :	int						=hidden_act
             _lowerCamelCase :	Tuple						=down_patch_size
             _lowerCamelCase :	int						=down_stride
             _lowerCamelCase :	Union[str, Any]						=down_pad
             _lowerCamelCase :	Optional[int]						=drop_path_rate
             _lowerCamelCase :	List[Any]						=use_layer_scale
             _lowerCamelCase :	Union[str, Any]						=layer_scale_init_value
             _lowerCamelCase :	List[Any]						=batch_norm_eps




class A						(     lowerCAmelCase__  ):
      UpperCamelCase__							:						List[Any]   =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		:  Optional[Any]				)      ->		float:
             """simple docstring"""




             return 1E-4






from typing import TYPE_CHECKING

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


lowerCamelCase		      = {
    'configuration_deberta_v2': ['DEBERTA_V2_PRETRAINED_CONFIG_ARCHIVE_MAP', 'DebertaV2Config', 'DebertaV2OnnxConfig'],
    'tokenization_deberta_v2': ['DebertaV2Tokenizer'],
}

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCamelCase		      = ['DebertaV2TokenizerFast']

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCamelCase		      = [
     'TF_DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TFDebertaV2ForMaskedLM',
     'TFDebertaV2ForQuestionAnswering',
     'TFDebertaV2ForSequenceClassification',
     'TFDebertaV2ForTokenClassification',
     'TFDebertaV2Model',
     'TFDebertaV2PreTrainedModel',
 ]

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCamelCase		      = [
     'DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST',
     'DebertaV2ForMaskedLM',
     'DebertaV2ForMultipleChoice',
     'DebertaV2ForQuestionAnswering',
     'DebertaV2ForSequenceClassification',
     'DebertaV2ForTokenClassification',
     'DebertaV2Model',
     'DebertaV2PreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_deberta_va import (
     DEBERTA_V2_PRETRAINED_CONFIG_ARCHIVE_MAP,
     DebertaVaConfig,
     DebertaVaOnnxConfig,
 )
 from .tokenization_deberta_va import DebertaVaTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_deberta_va_fast import DebertaVaTokenizerFast

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_deberta_va import (
      TF_DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFDebertaVaForMaskedLM,
      TFDebertaVaForQuestionAnswering,
      TFDebertaVaForSequenceClassification,
      TFDebertaVaForTokenClassification,
      TFDebertaVaModel,
      TFDebertaVaPreTrainedModel,
  )

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_deberta_va import (
      DEBERTA_V2_PRETRAINED_MODEL_ARCHIVE_LIST,
      DebertaVaForMaskedLM,
      DebertaVaForMultipleChoice,
      DebertaVaForQuestionAnswering,
      DebertaVaForSequenceClassification,
      DebertaVaForTokenClassification,
      DebertaVaModel,
      DebertaVaPreTrainedModel,
  )

else:
 import sys

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


