
"""simple docstring"""






from typing import List

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


UpperCAmelCase        =				logging.get_logger(__name__)

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



class 			lowercase					( lowercase__		):
			lowercase        =     '''efficientformer'''






			def __init__(self  :	Dict      ,SCREAMING_SNAKE_CASE_  :	List[int] = [3, 2, 6, 4]      ,SCREAMING_SNAKE_CASE_  :	List[int] = [48, 96, 224, 448]      ,SCREAMING_SNAKE_CASE_  :	List[bool] = [True, True, True, True]      ,SCREAMING_SNAKE_CASE_  :	int = 448      ,SCREAMING_SNAKE_CASE_  :	int = 32      ,SCREAMING_SNAKE_CASE_  :	int = 4      ,SCREAMING_SNAKE_CASE_  :	int = 7      ,SCREAMING_SNAKE_CASE_  :	int = 5      ,SCREAMING_SNAKE_CASE_  :	int = 8      ,SCREAMING_SNAKE_CASE_  :	int = 4      ,SCREAMING_SNAKE_CASE_  :	float = 0.0      ,SCREAMING_SNAKE_CASE_  :	int = 16      ,SCREAMING_SNAKE_CASE_  :	int = 3      ,SCREAMING_SNAKE_CASE_  :	int = 3      ,SCREAMING_SNAKE_CASE_  :	int = 3      ,SCREAMING_SNAKE_CASE_  :	int = 2      ,SCREAMING_SNAKE_CASE_  :	int = 1      ,SCREAMING_SNAKE_CASE_  :	float = 0.0      ,SCREAMING_SNAKE_CASE_  :	int = 1      ,SCREAMING_SNAKE_CASE_  :	bool = True      ,SCREAMING_SNAKE_CASE_  :	bool = True      ,SCREAMING_SNAKE_CASE_  :	float = 1e-5      ,SCREAMING_SNAKE_CASE_  :	str = "gelu"      ,SCREAMING_SNAKE_CASE_  :	float = 0.02      ,SCREAMING_SNAKE_CASE_  :	float = 1e-12      ,SCREAMING_SNAKE_CASE_  :	int = 224      ,SCREAMING_SNAKE_CASE_  :	float = 1e-05      ,**SCREAMING_SNAKE_CASE_  :	int      ,)       ->	None:





				"""simple docstring"""


				super().__init__(**SCREAMING_SNAKE_CASE_			)

				lowerCAmelCase												=  hidden_act
				lowerCAmelCase												=  hidden_dropout_prob
				lowerCAmelCase												=  hidden_sizes
				lowerCAmelCase												=  num_hidden_layers
				lowerCAmelCase												=  num_attention_heads
				lowerCAmelCase												=  initializer_range
				lowerCAmelCase												=  layer_norm_eps
				lowerCAmelCase												=  patch_size
				lowerCAmelCase												=  num_channels
				lowerCAmelCase												=  depths
				lowerCAmelCase												=  mlp_expansion_ratio
				lowerCAmelCase												=  downsamples
				lowerCAmelCase												=  dim
				lowerCAmelCase												=  key_dim
				lowerCAmelCase												=  attention_ratio
				lowerCAmelCase												=  resolution
				lowerCAmelCase												=  pool_size
				lowerCAmelCase												=  downsample_patch_size
				lowerCAmelCase												=  downsample_stride
				lowerCAmelCase												=  downsample_pad
				lowerCAmelCase												=  drop_path_rate
				lowerCAmelCase												=  num_metaad_blocks
				lowerCAmelCase												=  distillation
				lowerCAmelCase												=  use_layer_scale
				lowerCAmelCase												=  layer_scale_init_value
				lowerCAmelCase												=  image_size
				lowerCAmelCase												=  batch_norm_eps




"""simple docstring"""






from collections import namedtuple

UpperCAmelCase        =				namedtuple("""from_to""", """from_ to""")

UpperCAmelCase        =				{
    """cubicmeter""": from_to(1, 1),
    """litre""": from_to(0.001, 1_0_0_0),
    """kilolitre""": from_to(1, 1),
    """gallon""": from_to(0.00_454, 264.172),
    """cubicyard""": from_to(0.76_455, 1.30_795),
    """cubicfoot""": from_to(0.028, 35.3_147),
    """cup""": from_to(0.000_236_588, 4_226.75),
}




def __magic_name__	(				_lowerCamelCase:		float,					_lowerCamelCase:		str,					_lowerCamelCase:		str			)					->						float:

	'''simple docstring'''




	if from_type not in METRIC_CONVERSION:
		raise ValueError(
		    F"""Invalid 'from_type' value: {from_type!r}  Supported values are:\n"""
		    + ''', '''.join(_lowerCamelCase			)			)
	if to_type not in METRIC_CONVERSION:
		raise ValueError(
		    F"""Invalid 'to_type' value: {to_type!r}.  Supported values are:\n"""
		    + ''', '''.join(_lowerCamelCase			)			)
	return value * METRIC_CONVERSION[from_type].from_ * METRIC_CONVERSION[to_type].to


if __name__ == "__main__":
					import doctest

					doctest.testmod()


