

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


a__			:						Union[str, Any]							=			logging.get_logger(__name__)

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


class       _snake_case  (    UpperCamelCase							):
						__snake_case			      =  'swiftformer'







						def __init__(self  ,				UpperCAmelCase_=3  ,				UpperCAmelCase_=[3, 3, 6, 4]  ,				UpperCAmelCase_=[4_8, 5_6, 1_1_2, 2_2_0]  ,				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_  ,				)      ->    Optional[Any]:
											super().__init__(**UpperCAmelCase_				)
											__lowercase        =      num_channels
											__lowercase        =      depths
											__lowercase        =      embed_dims
											__lowercase        =      mlp_ratio
											__lowercase        =      downsamples
											__lowercase        =      hidden_act
											__lowercase        =      down_patch_size
											__lowercase        =      down_stride
											__lowercase        =      down_pad
											__lowercase        =      drop_path_rate
											__lowercase        =      use_layer_scale
											__lowercase        =      layer_scale_init_value
											__lowercase        =      batch_norm_eps



class       _snake_case  (    UpperCamelCase							):
						__snake_case			      =  version.parse('1.11'							)







						@property
						def 							_UpperCamelCase     (self				)      ->    Mapping[str, Mapping[int, str]]:
											return OrderedDict(
											    [
											        ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
											    ]				)







						@property
						def 							_UpperCamelCase     (self				)      ->    float:
											return 1e-4





"""simple docstring"""

from typing import TYPE_CHECKING

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


a__			:						str							=			{
    """configuration_rwkv""": ["""RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP""", """RwkvConfig""", """RwkvOnnxConfig"""],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							a__			:						Optional[int]							=			[
							    """RWKV_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """RwkvForCausalLM""",
							    """RwkvModel""",
							    """RwkvPreTrainedModel""",
							]


if TYPE_CHECKING:
							from .configuration_rwkv import RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP, RwkvConfig, RwkvOnnxConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_rwkv import (
														    RWKV_PRETRAINED_MODEL_ARCHIVE_LIST,
														    RwkvForCausalLM,
														    RwkvModel,
														    RwkvPreTrainedModel,
														)
else:
							import sys

							a__			:						List[str]							=			_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


