

"""simple docstring"""







from typing import List

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


_a					:					Tuple=			logging.get_logger(__name__)

_a					:					Optional[int]=			{
    "snap-research/efficientformer-l1-300": (
        "https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json"
    ),
}

class 		UpperCamelCase      (   SCREAMING_SNAKE_CASE__						):
				UpperCAmelCase    :				Union[str, Any]   =		'efficientformer'



				def __init__(self    :				Tuple     ,  _A    :				List[int] = [3, 2, 6, 4]     ,  _A    :				List[int] = [48, 96, 2_24, 4_48]     ,  _A    :				List[bool] = [True, True, True, True]     ,  _A    :				int = 4_48     ,  _A    :				int = 32     ,  _A    :				int = 4     ,  _A    :				int = 7     ,  _A    :				int = 5     ,  _A    :				int = 8     ,  _A    :				int = 4     ,  _A    :				float = 0.0     ,  _A    :				int = 16     ,  _A    :				int = 3     ,  _A    :				int = 3     ,  _A    :				int = 3     ,  _A    :				int = 2     ,  _A    :				int = 1     ,  _A    :				float = 0.0     ,  _A    :				int = 1     ,  _A    :				bool = True     ,  _A    :				bool = True     ,  _A    :				float = 1E-5     ,  _A    :				str = "gelu"     ,  _A    :				float = 0.02     ,  _A    :				float = 1E-12     ,  _A    :				int = 2_24     ,  _A    :				float = 1E-05     ,  **_A    :				List[Any]     ,  )   ->     Union[str, Any]:
					super().__init__(**a_)

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






"""simple docstring"""







def   __UpperCAmelCase    (   UpperCAmelCase_   :    int      ,							UpperCAmelCase_   :    int  )							->      int:

	'''simple docstring'''





	while a != 0:
		__snake_case		,    __snake_case      :							Union[str, Any]						=			b % a, a
	return b

def   __UpperCAmelCase    (   UpperCAmelCase_   :    int      ,							UpperCAmelCase_   :    int  )							->      int:

	'''simple docstring'''





	if gcd(UpperCAmelCase_      ,							UpperCAmelCase_  ) != 1:
		__snake_case      :							Union[str, Any]						=			F"mod inverse of {a!r} and {m!r} does not exist"
		raise ValueError(UpperCAmelCase_  )
	__snake_case		,    __snake_case		,    __snake_case      :							List[str]						=			1, 0, a
	__snake_case		,    __snake_case		,    __snake_case      :							Dict						=			0, 1, m
	while va != 0:
		__snake_case      :							List[str]						=			ua // va
		__snake_case		,    __snake_case		,    __snake_case		,    __snake_case		,    __snake_case		,    __snake_case      :							List[str]						=			(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
	return ua % m





