

"""simple docstring"""





from typing import List

from ...configuration_utils import PretrainedConfig
from ...utils import logging


__UpperCamelCase    : List[Any]				 =						logging.get_logger(__name__)

__UpperCamelCase    : str				 =						{
    '''snap-research/efficientformer-l1-300''': (
        '''https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json'''
    ),
}







class 							SCREAMING_SNAKE_CASE   (						a_			):






					"""simple docstring"""



					lowercase__												=			"efficientformer"







					def __init__(			self     :							Optional[Any]  ,lowercase_     :							List[int] = [3, 2, 6, 4]  ,lowercase_     :							List[int] = [4_8, 9_6, 2_2_4, 4_4_8]  ,lowercase_     :							List[bool] = [True, True, True, True]  ,lowercase_     :							int = 4_4_8  ,lowercase_     :							int = 3_2  ,lowercase_     :							int = 4  ,lowercase_     :							int = 7  ,lowercase_     :							int = 5  ,lowercase_     :							int = 8  ,lowercase_     :							int = 4  ,lowercase_     :							float = 0.0  ,lowercase_     :							int = 1_6  ,lowercase_     :							int = 3  ,lowercase_     :							int = 3  ,lowercase_     :							int = 3  ,lowercase_     :							int = 2  ,lowercase_     :							int = 1  ,lowercase_     :							float = 0.0  ,lowercase_     :							int = 1  ,lowercase_     :							bool = True  ,lowercase_     :							bool = True  ,lowercase_     :							float = 1E-5  ,lowercase_     :							str = "gelu"  ,lowercase_     :							float = 0.02  ,lowercase_     :							float = 1E-12  ,lowercase_     :							int = 2_2_4  ,lowercase_     :							float = 1E-05  ,**lowercase_     :							str  ,):
						super().__init__(**lowercase_						)

						lowerCAmelCase__      :		List[str]    							=      hidden_act
						lowerCAmelCase__      :		List[Any]    							=      hidden_dropout_prob
						lowerCAmelCase__      :		Optional[Any]    							=      hidden_sizes
						lowerCAmelCase__      :		Tuple    							=      num_hidden_layers
						lowerCAmelCase__      :		Tuple    							=      num_attention_heads
						lowerCAmelCase__      :		Any    							=      initializer_range
						lowerCAmelCase__      :		Optional[int]    							=      layer_norm_eps
						lowerCAmelCase__      :		Tuple    							=      patch_size
						lowerCAmelCase__      :		List[Any]    							=      num_channels
						lowerCAmelCase__      :		str    							=      depths
						lowerCAmelCase__      :		List[Any]    							=      mlp_expansion_ratio
						lowerCAmelCase__      :		int    							=      downsamples
						lowerCAmelCase__      :		int    							=      dim
						lowerCAmelCase__      :		Dict    							=      key_dim
						lowerCAmelCase__      :		int    							=      attention_ratio
						lowerCAmelCase__      :		Optional[Any]    							=      resolution
						lowerCAmelCase__      :		str    							=      pool_size
						lowerCAmelCase__      :		Tuple    							=      downsample_patch_size
						lowerCAmelCase__      :		List[Any]    							=      downsample_stride
						lowerCAmelCase__      :		List[Any]    							=      downsample_pad
						lowerCAmelCase__      :		int    							=      drop_path_rate
						lowerCAmelCase__      :		Dict    							=      num_metaad_blocks
						lowerCAmelCase__      :		Optional[int]    							=      distillation
						lowerCAmelCase__      :		Optional[int]    							=      use_layer_scale
						lowerCAmelCase__      :		int    							=      layer_scale_init_value
						lowerCAmelCase__      :		List[str]    							=      image_size
						lowerCAmelCase__      :		Optional[Any]    							=      batch_norm_eps







"""simple docstring"""





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__UpperCamelCase    : str				 =						{
    '''configuration_swinv2''': ['''SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''Swinv2Config'''],
}


try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__UpperCamelCase    : List[Any]				 =						[
							    '''SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''Swinv2ForImageClassification''',
							    '''Swinv2ForMaskedImageModeling''',
							    '''Swinv2Model''',
							    '''Swinv2PreTrainedModel''',
							]


if TYPE_CHECKING:
							from .configuration_swinva import SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinvaConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_swinva import (
														    SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST,
														    SwinvaForImageClassification,
														    SwinvaForMaskedImageModeling,
														    SwinvaModel,
														    SwinvaPreTrainedModel,
														)


else:
							import sys

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




