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

lowercase  :					Optional[int]													=       {
    'sail/poolformer_s12': 'https://huggingface.co/sail/poolformer_s12/resolve/main/config.json',
    # See all PoolFormer models at https://huggingface.co/models?filter=poolformer
}




class  lowerCamelCase__							(				__lowercase):




	'''simple docstring'''




	_A								=     'poolformer'







	def __init__(					self		:List[Any]     ,   a		:List[str]=3     ,   a		:str=1_6     ,   a		:str=1_6     ,   a		:str=3     ,   a		:Optional[Any]=4.0     ,   a		:Dict=[2, 2, 6, 2]     ,   a		:List[Any]=[6_4, 1_2_8, 3_2_0, 5_1_2]     ,   a		:Dict=[7, 3, 3, 3]     ,   a		:int=[4, 2, 2, 2]     ,   a		:str=[2, 1, 1, 1]     ,   a		:Dict=4     ,   a		:List[str]=0.0     ,   a		:Optional[Any]="gelu"     ,   a		:Optional[int]=True     ,   a		:List[Any]=1E-5     ,   a		:Dict=0.02     ,   **a		:str     ,   )		-> List[Any]:
								__UpperCamelCase	:   Optional[int]			   =					num_channels
								__UpperCamelCase	:   List[str]			   =					patch_size
								__UpperCamelCase	:   Optional[Any]			   =					stride
								__UpperCamelCase	:   str			   =					padding
								__UpperCamelCase	:   List[Any]			   =					pool_size
								__UpperCamelCase	:   Tuple			   =					hidden_sizes
								__UpperCamelCase	:   Tuple			   =					mlp_ratio
								__UpperCamelCase	:   int			   =					depths
								__UpperCamelCase	:   int			   =					patch_sizes
								__UpperCamelCase	:   Optional[Any]			   =					strides
								__UpperCamelCase	:   List[Any]			   =					num_encoder_blocks
								__UpperCamelCase	:   Union[str, Any]			   =					drop_path_rate
								__UpperCamelCase	:   Optional[Any]			   =					hidden_act
								__UpperCamelCase	:   Union[str, Any]			   =					use_layer_scale
								__UpperCamelCase	:   Any			   =					layer_scale_init_value
								__UpperCamelCase	:   Dict			   =					initializer_range
								super().__init__(**a						)




class  lowerCamelCase__							(				__lowercase):




	'''simple docstring'''




	_A								=     version.parse('1.11')







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







	@property
	def    _lowerCamelCase				(					self		:List[Any]						)		-> float:
								return 2E-3

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase  :					List[str]													=       {'configuration_vit_msn': ['VIT_MSN_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ViTMSNConfig']}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowercase  :					Optional[Any]													=       [
		    'VIT_MSN_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'ViTMSNModel',
		    'ViTMSNForImageClassification',
		    'ViTMSNPreTrainedModel',
		]

if TYPE_CHECKING:
		from .configuration_vit_msn import VIT_MSN_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTMSNConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_vit_msn import (
				    VIT_MSN_PRETRAINED_MODEL_ARCHIVE_LIST,
				    ViTMSNForImageClassification,
				    ViTMSNModel,
				    ViTMSNPreTrainedModel,
				)

else:
		import sys

		lowercase  :					Optional[Any]													=       _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)