





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 			UpperCamelCase_		(  _lowerCamelCase					):
     lowerCAmelCase_							=	'''efficientformer'''




     def __init__(		self				,						lowerCAmelCase_ = [3, 2, 6, 4]				,						lowerCAmelCase_ = [48, 96, 224, 448]				,						lowerCAmelCase_ = [True, True, True, True]				,						lowerCAmelCase_ = 448				,						lowerCAmelCase_ = 32				,						lowerCAmelCase_ = 4				,						lowerCAmelCase_ = 7				,						lowerCAmelCase_ = 5				,						lowerCAmelCase_ = 8				,						lowerCAmelCase_ = 4				,						lowerCAmelCase_ = 0.0				,						lowerCAmelCase_ = 16				,						lowerCAmelCase_ = 3				,						lowerCAmelCase_ = 3				,						lowerCAmelCase_ = 3				,						lowerCAmelCase_ = 2				,						lowerCAmelCase_ = 1				,						lowerCAmelCase_ = 0.0				,						lowerCAmelCase_ = 1				,						lowerCAmelCase_ = True				,						lowerCAmelCase_ = True				,						lowerCAmelCase_ = 1E-5				,						lowerCAmelCase_ = "gelu"				,						lowerCAmelCase_ = 0.02				,						lowerCAmelCase_ = 1E-12				,						lowerCAmelCase_ = 224				,						lowerCAmelCase_ = 1E-05				,						**lowerCAmelCase_				,						)		->							None:
          super().__init__(**lowerCAmelCase_  )

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










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


UpperCAmelCase_      							=     logging.get_logger(__name__)

UpperCAmelCase_      							=     {
    """sayakpaul/vit-msn-base""": """https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json""",
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}
class 			UpperCamelCase_		(  _lowerCamelCase					):
					lowerCAmelCase_							=	'''vit_msn'''




					def __init__(		self				,						lowerCAmelCase_=768				,						lowerCAmelCase_=12				,						lowerCAmelCase_=12				,						lowerCAmelCase_=3072				,						lowerCAmelCase_="gelu"				,						lowerCAmelCase_=0.0				,						lowerCAmelCase_=0.0				,						lowerCAmelCase_=0.02				,						lowerCAmelCase_=1E-06				,						lowerCAmelCase_=224				,						lowerCAmelCase_=16				,						lowerCAmelCase_=3				,						lowerCAmelCase_=True				,						**lowerCAmelCase_				,						)		->							str:
										super().__init__(**lowerCAmelCase_  )

										_snake_case									=				hidden_size
										_snake_case									=				num_hidden_layers
										_snake_case									=				num_attention_heads
										_snake_case									=				intermediate_size
										_snake_case									=				hidden_act
										_snake_case									=				hidden_dropout_prob
										_snake_case									=				attention_probs_dropout_prob
										_snake_case									=				initializer_range
										_snake_case									=				layer_norm_eps
										_snake_case									=				image_size
										_snake_case									=				patch_size
										_snake_case									=				num_channels
										_snake_case									=				qkv_bias



