
from typing import List

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


_lowerCamelCase					   =logging.get_logger(__name__)

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





class 							A__		(	__lowerCamelCase):
      _UpperCAmelCase				:    Union[str, Any]           =			"efficientformer"
      def __init__(      self    ,  __magic_name__ = [3, 2, 6, 4]    ,  __magic_name__ = [4_8, 9_6, 2_2_4, 4_4_8]    ,  __magic_name__ = [True, True, True, True]    ,  __magic_name__ = 4_4_8    ,  __magic_name__ = 3_2    ,  __magic_name__ = 4    ,  __magic_name__ = 7    ,  __magic_name__ = 5    ,  __magic_name__ = 8    ,  __magic_name__ = 4    ,  __magic_name__ = 0.0    ,  __magic_name__ = 1_6    ,  __magic_name__ = 3    ,  __magic_name__ = 3    ,  __magic_name__ = 3    ,  __magic_name__ = 2    ,  __magic_name__ = 1    ,  __magic_name__ = 0.0    ,  __magic_name__ = 1    ,  __magic_name__ = True    ,  __magic_name__ = True    ,  __magic_name__ = 1e-5    ,  __magic_name__ = "gelu"    ,  __magic_name__ = 0.02    ,  __magic_name__ = 1e-12    ,  __magic_name__ = 2_2_4    ,  __magic_name__ = 1e-05    ,  **__magic_name__    ,  ):
       super().__init__(**__magic_name__      )

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











from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


UpperCAmelCase_     							= logging.get_logger(__name__)

UpperCAmelCase_     							= {
    'google/mobilenet_v2_1.4_224': 'https://huggingface.co/google/mobilenet_v2_1.4_224/resolve/main/config.json',
    'google/mobilenet_v2_1.0_224': 'https://huggingface.co/google/mobilenet_v2_1.0_224/resolve/main/config.json',
    'google/mobilenet_v2_0.75_160': 'https://huggingface.co/google/mobilenet_v2_0.75_160/resolve/main/config.json',
    'google/mobilenet_v2_0.35_96': 'https://huggingface.co/google/mobilenet_v2_0.35_96/resolve/main/config.json',
    # See all MobileNetV2 models at https://huggingface.co/models?filter=mobilenet_v2
}






class     lowercase__       (	__lowerCamelCase				):

   '''simple docstring'''


   a						:							List[str]   		=		"mobilenet_v2"




   def __init__(    self,		__magic_name__=3,		__magic_name__=224,		__magic_name__=1.0,		__magic_name__=8,		__magic_name__=8,		__magic_name__=6,		__magic_name__=32,		__magic_name__=True,		__magic_name__=True,		__magic_name__="relu6",		__magic_name__=True,		__magic_name__=0.8,		__magic_name__=0.02,		__magic_name__=0.001,		__magic_name__=255,		**__magic_name__,		) ->      List[Any]:






       """simple docstring"""
       super().__init__(**__magic_name__							)

       if depth_multiplier <= 0:
           raise ValueError('''depth_multiplier must be greater than zero.'''							)

       UpperCamelCase__							:				Union[str, Any]          =      num_channels
       UpperCamelCase__							:				int          =      image_size
       UpperCamelCase__							:				int          =      depth_multiplier
       UpperCamelCase__							:				Tuple          =      depth_divisible_by
       UpperCamelCase__							:				List[str]          =      min_depth
       UpperCamelCase__							:				Optional[int]          =      expand_ratio
       UpperCamelCase__							:				Optional[int]          =      output_stride
       UpperCamelCase__							:				Tuple          =      first_layer_is_expansion
       UpperCamelCase__							:				Union[str, Any]          =      finegrained_output
       UpperCamelCase__							:				str          =      hidden_act
       UpperCamelCase__							:				Optional[Any]          =      tf_padding
       UpperCamelCase__							:				Optional[int]          =      classifier_dropout_prob
       UpperCamelCase__							:				int          =      initializer_range
       UpperCamelCase__							:				Union[str, Any]          =      layer_norm_eps
       UpperCamelCase__							:				Tuple          =      semantic_loss_ignore_index






class     lowercase__       (	__lowerCamelCase				):

   '''simple docstring'''


   a						:							Union[str, Any]   		=		version.parse("1.11"				)




   @property
   def       UpperCamelCase__  (    self							) ->      Mapping[str, Mapping[int, str]]:






       """simple docstring"""
       return OrderedDict([('''pixel_values''', {0: '''batch'''})]							)




   @property
   def       UpperCamelCase__  (    self							) ->      Mapping[str, Mapping[int, str]]:






       """simple docstring"""
       if self.task == "image-classification":
           return OrderedDict([('''logits''', {0: '''batch'''})]							)
       else:
           return OrderedDict([('''last_hidden_state''', {0: '''batch'''}), ('''pooler_output''', {0: '''batch'''})]							)




   @property
   def       UpperCamelCase__  (    self							) ->      float:






       """simple docstring"""
       return 1E-4

