from typing import List

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


_lowerCamelCase					:   Dict							=		logging.get_logger(__name__)

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


class 						lowercase    (     a     ):
							lowercase__						:       Tuple								=							"""efficientformer"""




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



												'''simple docstring'''

												super().__init__(**_UpperCamelCase      )

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





from __future__ import annotations

from collections.abc import Iterator
from typing import Generic, TypeVar

_lowerCamelCase					:   Optional[Any]							=		TypeVar('''T''')


class 						lowercase    (     Generic[T]     ):




							def __init__(						self   :					Any	,							_UpperCamelCase   :					T      )					->				Any:



												'''simple docstring'''

												SCREAMING_SNAKE_CASE    			=       data
												SCREAMING_SNAKE_CASE    			=       None





							def __str__(						self   :					Union[str, Any]      )					->				str:



												'''simple docstring'''

												return F"{self.data}"



class 						lowercase    (     Generic[T]     ):




							def __init__(						self   :					Optional[int]      )					->				None:



												'''simple docstring'''

												SCREAMING_SNAKE_CASE    			=       None




							def __iter__(						self   :					str      )					->				Iterator[T]:



												'''simple docstring'''

												SCREAMING_SNAKE_CASE    			=       self.top
												while node:
																	yield node.data
																	SCREAMING_SNAKE_CASE    			=       node.next




							def __str__(						self   :					int      )					->				str:



												'''simple docstring'''

												return "->".join([str(_UpperCamelCase      ) for item in self]      )




							def __len__(						self   :					Tuple      )					->				int:



												'''simple docstring'''

												return len(tuple(iter(self      )      )      )




							def 	__snake_case(						self   :					Union[str, Any]      )					->				bool:



												'''simple docstring'''

												return self.top is None




							def 	__snake_case(						self   :					str	,							_UpperCamelCase   :					T      )					->				None:



												'''simple docstring'''

												SCREAMING_SNAKE_CASE    			=       Node(_UpperCamelCase      )
												if not self.is_empty():
																	SCREAMING_SNAKE_CASE    			=       self.top
												SCREAMING_SNAKE_CASE    			=       node




							def 	__snake_case(						self   :					Union[str, Any]      )					->				T:



												'''simple docstring'''

												if self.is_empty():
																	raise IndexError("pop from empty stack"      )
												assert isinstance(self.top	,							_UpperCamelCase      )
												SCREAMING_SNAKE_CASE    			=       self.top
												SCREAMING_SNAKE_CASE    			=       self.top.next
												return pop_node.data




							def 	__snake_case(						self   :					Union[str, Any]      )					->				T:



												'''simple docstring'''

												if self.is_empty():
																	raise IndexError("peek from empty stack"      )

												assert self.top is not None
												return self.top.data





							def 	__snake_case(						self   :					Dict      )					->				None:



												'''simple docstring'''

												SCREAMING_SNAKE_CASE    			=       None


if __name__ == "__main__":
							from doctest import testmod

							testmod()




