






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

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





class __lowerCamelCase				(   UpperCamelCase__):





	"""simple docstring"""






	UpperCamelCase__			=   "swiftformer"

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







							super().__init__(**snake_case_					)
							_UpperCAmelCase             =    num_channels
							_UpperCAmelCase             =    depths
							_UpperCAmelCase             =    embed_dims
							_UpperCAmelCase             =    mlp_ratio
							_UpperCAmelCase             =    downsamples
							_UpperCAmelCase             =    hidden_act
							_UpperCAmelCase             =    down_patch_size
							_UpperCAmelCase             =    down_stride
							_UpperCAmelCase             =    down_pad
							_UpperCAmelCase             =    drop_path_rate
							_UpperCAmelCase             =    use_layer_scale
							_UpperCAmelCase             =    layer_scale_init_value
							_UpperCAmelCase             =    batch_norm_eps





class __lowerCamelCase				(   UpperCamelCase__):





	"""simple docstring"""






	UpperCamelCase__			=   version.parse("1.11")

	@property
	def  UpperCamelCase					(							self					):
							"""simple docstring"""







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

	@property
	def  UpperCamelCase					(							self					):
							"""simple docstring"""







							return 1e-4








from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_a   			=						{'''configuration_qdqbert''': ['''QDQBERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''QDQBertConfig''']}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_a   			=						[
		    '''QDQBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''QDQBertForMaskedLM''',
		    '''QDQBertForMultipleChoice''',
		    '''QDQBertForNextSentencePrediction''',
		    '''QDQBertForQuestionAnswering''',
		    '''QDQBertForSequenceClassification''',
		    '''QDQBertForTokenClassification''',
		    '''QDQBertLayer''',
		    '''QDQBertLMHeadModel''',
		    '''QDQBertModel''',
		    '''QDQBertPreTrainedModel''',
		    '''load_tf_weights_in_qdqbert''',
		]


if TYPE_CHECKING:
		from .configuration_qdqbert import QDQBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, QDQBertConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_qdqbert import (
				    QDQBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    QDQBertForMaskedLM,
				    QDQBertForMultipleChoice,
				    QDQBertForNextSentencePrediction,
				    QDQBertForQuestionAnswering,
				    QDQBertForSequenceClassification,
				    QDQBertForTokenClassification,
				    QDQBertLayer,
				    QDQBertLMHeadModel,
				    QDQBertModel,
				    QDQBertPreTrainedModel,
				    load_tf_weights_in_qdqbert,
				)


else:
		import sys

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