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


lowercase__		    =	logging.get_logger(__name__)

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






class      snake_case__    (	__SCREAMING_SNAKE_CASE ):







		"""simple docstring"""

		lowerCamelCase							=		"""swiftformer"""



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






				"""simple docstring"""







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







class      snake_case__    (	__SCREAMING_SNAKE_CASE ):







		"""simple docstring"""

		lowerCamelCase							=		version.parse("""1.11""" )



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






				"""simple docstring"""







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



		@property
		def 	lowerCAmelCase							(	self							:       Any	)		->       float:






				"""simple docstring"""







				return 1e-4



'''simple docstring'''


from typing import TYPE_CHECKING

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


snake_case__     :			int      			=  {
    '''configuration_markuplm''': ['''MARKUPLM_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''MarkupLMConfig'''],
    '''feature_extraction_markuplm''': ['''MarkupLMFeatureExtractor'''],
    '''processing_markuplm''': ['''MarkupLMProcessor'''],
    '''tokenization_markuplm''': ['''MarkupLMTokenizer'''],
}

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 snake_case__     :			List[str]      			=  ['''MarkupLMTokenizerFast''']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 snake_case__     :			Dict      			=  [
     '''MARKUPLM_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''MarkupLMForQuestionAnswering''',
     '''MarkupLMForSequenceClassification''',
     '''MarkupLMForTokenClassification''',
     '''MarkupLMModel''',
     '''MarkupLMPreTrainedModel''',
 ]


if TYPE_CHECKING:
 from .configuration_markuplm import MARKUPLM_PRETRAINED_CONFIG_ARCHIVE_MAP, MarkupLMConfig
 from .feature_extraction_markuplm import MarkupLMFeatureExtractor
 from .processing_markuplm import MarkupLMProcessor
 from .tokenization_markuplm import MarkupLMTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_markuplm_fast import MarkupLMTokenizerFast

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_markuplm import (
      MARKUPLM_PRETRAINED_MODEL_ARCHIVE_LIST,
      MarkupLMForQuestionAnswering,
      MarkupLMForSequenceClassification,
      MarkupLMForTokenClassification,
      MarkupLMModel,
      MarkupLMPreTrainedModel,
  )


else:
 import sys

 snake_case__     :			Optional[Any]      			=  _LazyModule(__name__, globals()['''__file__'''], _import_structure)






