



from typing import List

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


a_								=       logging.get_logger(__name__)

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



class 			__lowerCAmelCase  (						lowerCAmelCase__ ):
 lowerCAmelCase__							       =	"""efficientformer"""




 def __init__(    self						,					__UpperCAmelCase = [3, 2, 6, 4]						,					__UpperCAmelCase = [48, 96, 224, 448]						,					__UpperCAmelCase = [True, True, True, True]						,					__UpperCAmelCase = 448						,					__UpperCAmelCase = 32						,					__UpperCAmelCase = 4						,					__UpperCAmelCase = 7						,					__UpperCAmelCase = 5						,					__UpperCAmelCase = 8						,					__UpperCAmelCase = 4						,					__UpperCAmelCase = 0.0						,					__UpperCAmelCase = 16						,					__UpperCAmelCase = 3						,					__UpperCAmelCase = 3						,					__UpperCAmelCase = 3						,					__UpperCAmelCase = 2						,					__UpperCAmelCase = 1						,					__UpperCAmelCase = 0.0						,					__UpperCAmelCase = 1						,					__UpperCAmelCase = True						,					__UpperCAmelCase = True						,					__UpperCAmelCase = 1E-5						,					__UpperCAmelCase = "gelu"						,					__UpperCAmelCase = 0.02						,					__UpperCAmelCase = 1E-1_2						,					__UpperCAmelCase = 224						,					__UpperCAmelCase = 1E-0_5						,					**__UpperCAmelCase						,					):



    '''simple docstring'''
    super().__init__(**__UpperCAmelCase					)

    __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











def 		a__      (		_UpperCamelCase      :			int				):
   __lowerCamelCase    				=     int(_UpperCamelCase				)
   if decimal in (0, 1):  # Exit cases for the recursion
      return str(_UpperCamelCase				)
   __lowerCamelCase				,__lowerCamelCase    				=     divmod(_UpperCamelCase			,2				)
   return binary_recursive(_UpperCamelCase				) + str(_UpperCamelCase				)





def 		a__      (		_UpperCamelCase      :			str				):
   __lowerCamelCase    				=     str(_UpperCamelCase				).strip()
   if not number:
      raise ValueError('''No input value was provided'''				)
   __lowerCamelCase    				=     '''-''' if number.startswith('''-'''				) else ''''''
   __lowerCamelCase    				=     number.lstrip('''-'''				)
   if not number.isnumeric():
      raise ValueError('''Input value is not an integer'''				)
   return F"""{negative}0b{binary_recursive(int(_UpperCamelCase				)				)}"""


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

  testmod()






