




'''simple docstring'''


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


_snake_case      :      List[str]   							=		logging.get_logger(__name__)

_snake_case      :      int   							=		{
    'apple/mobilevitv2-1.0': 'https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json',
}

class 			A    (		_a    ):
							lowercase_							=				'mobilevitv2'







							def __init__(  self       :  Optional[Any]							,			lowerCAmelCase_       :  int=3							,			lowerCAmelCase_       :  Any=2_56							,			lowerCAmelCase_       :  Union[str, Any]=2							,			lowerCAmelCase_       :  Tuple=2.0							,			lowerCAmelCase_       :  Dict="swish"							,			lowerCAmelCase_       :  Union[str, Any]=3							,			lowerCAmelCase_       :  List[str]=32							,			lowerCAmelCase_       :  Dict=0.1							,			lowerCAmelCase_       :  List[Any]=0.0_2							,			lowerCAmelCase_       :  List[str]=1e-5							,			lowerCAmelCase_       :  Tuple=5_12							,			lowerCAmelCase_       :  Optional[Any]=[6, 12, 18]							,			lowerCAmelCase_       :  Any=0.1							,			lowerCAmelCase_       :  Any=2_55							,			lowerCAmelCase_       :  Union[str, Any]=[2, 4, 3]							,			lowerCAmelCase_       :  int=[1_28, 1_92, 2_56]							,			lowerCAmelCase_       :  Union[str, Any]=1.0							,			lowerCAmelCase_       :  Union[str, Any]=2							,			lowerCAmelCase_       :  int=0.0							,			lowerCAmelCase_       :  Union[str, Any]=0.0							,			**lowerCAmelCase_       :  int							,			)			->							Dict:


														"""simple docstring"""


														super().__init__(**lowerCAmelCase_					)

														_a	     =				num_channels
														_a	     =				image_size
														_a	     =				patch_size
														_a	     =				expand_ratio
														_a	     =				hidden_act
														_a	     =				conv_kernel_size
														_a	     =				output_stride
														_a	     =				initializer_range
														_a	     =				layer_norm_eps
														_a	     =				n_attn_blocks
														_a	     =				base_attn_unit_dims
														_a	     =				width_multiplier
														_a	     =				ffn_multiplier
														_a	     =				ffn_dropout
														_a	     =				attn_dropout
														_a	     =				classifier_dropout_prob

														# decode head attributes for semantic segmentation
														_a	     =				aspp_out_channels
														_a	     =				atrous_rates
														_a	     =				aspp_dropout_prob
														_a	     =				semantic_loss_ignore_index



class 			A    (		_a    ):
							lowercase_							=				version.parse('1.11'    )







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


														"""simple docstring"""


														return OrderedDict([('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''})]					)







							@property
							def    __lowerCAmelCase			(  self       :  Tuple					)			->							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    __lowerCAmelCase			(  self       :  Optional[Any]					)			->							float:


														"""simple docstring"""


														return 1e-4







'''simple docstring'''


from __future__ import annotations

from enum import Enum

class 			A    (		_a    ):
							lowercase_							=				24
							lowercase_							=				21
							lowercase_							=				18
							lowercase_							=				15
							lowercase_							=				12
							lowercase_							=				9
							lowercase_							=				6
							lowercase_							=				3
							lowercase_							=				2
							lowercase_							=				1
							lowercase_							=				-1
							lowercase_							=				-2
							lowercase_							=				-3
							lowercase_							=				-6
							lowercase_							=				-9
							lowercase_							=				-12
							lowercase_							=				-15
							lowercase_							=				-18
							lowercase_							=				-21
							lowercase_							=				-24



class 			A    (		_a    ):
							lowercase_							=				8
							lowercase_							=				7
							lowercase_							=				6
							lowercase_							=				5
							lowercase_							=				4
							lowercase_							=				3
							lowercase_							=				2
							lowercase_							=				1



def 		snake_case_    (UpperCamelCase       :  float ,						UpperCamelCase       :  str | SIUnit ,						UpperCamelCase       :  str | SIUnit ,						):





							'''simple docstring'''


							if isinstance(UpperCamelCase ,						UpperCamelCase      ):
														_a	     =				SIUnit[known_prefix.lower()]
							if isinstance(UpperCamelCase ,						UpperCamelCase      ):
														_a	     =				SIUnit[unknown_prefix.lower()]
							_a	     =				known_amount * (
							    10 ** (known_prefix.value - unknown_prefix.value)
							)
							return unknown_amount
def 		snake_case_    (UpperCamelCase       :  float ,						UpperCamelCase       :  str | BinaryUnit ,						UpperCamelCase       :  str | BinaryUnit ,						):





							'''simple docstring'''


							if isinstance(UpperCamelCase ,						UpperCamelCase      ):
														_a	     =				BinaryUnit[known_prefix.lower()]
							if isinstance(UpperCamelCase ,						UpperCamelCase      ):
														_a	     =				BinaryUnit[unknown_prefix.lower()]
							_a	     =				known_amount * (
							    2 ** ((known_prefix.value - unknown_prefix.value) * 10)
							)
							return unknown_amount


if __name__ == "__main__":
				import doctest

				doctest.testmod()

