code: 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
  
  
  lowercase__    :       Dict						=			logging.get_logger(__name__)
  
  lowercase__    :       Union[str, Any]						=			{
      '''apple/mobilevitv2-1.0''': '''https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json''',
  }
  
  
  
  
  class      lowercase_						(						UpperCamelCase_		):
  
  
  
  	"""simple docstring"""
  
  
  
  
  
  	UpperCAmelCase_						:      Tuple     =       "mobilevitv2"
  
  
  	def __init__(							self	,    __SCREAMING_SNAKE_CASE=3	,    __SCREAMING_SNAKE_CASE=256	,    __SCREAMING_SNAKE_CASE=2	,    __SCREAMING_SNAKE_CASE=2.0	,    __SCREAMING_SNAKE_CASE="swish"	,    __SCREAMING_SNAKE_CASE=3	,    __SCREAMING_SNAKE_CASE=32	,    __SCREAMING_SNAKE_CASE=0.1	,    __SCREAMING_SNAKE_CASE=0.0_2	,    __SCREAMING_SNAKE_CASE=1e-5	,    __SCREAMING_SNAKE_CASE=512	,    __SCREAMING_SNAKE_CASE=[6, 12, 18]	,    __SCREAMING_SNAKE_CASE=0.1	,    __SCREAMING_SNAKE_CASE=255	,    __SCREAMING_SNAKE_CASE=[2, 4, 3]	,    __SCREAMING_SNAKE_CASE=[128, 192, 256]	,    __SCREAMING_SNAKE_CASE=1.0	,    __SCREAMING_SNAKE_CASE=2	,    __SCREAMING_SNAKE_CASE=0.0	,    __SCREAMING_SNAKE_CASE=0.0	,    **__SCREAMING_SNAKE_CASE	,    )		->List[str]:
  								super().__init__(**UpperCAmelCase_       )
  
  								lowerCAmelCase				=	num_channels
  								lowerCAmelCase				=	image_size
  								lowerCAmelCase				=	patch_size
  								lowerCAmelCase				=	expand_ratio
  								lowerCAmelCase				=	hidden_act
  								lowerCAmelCase				=	conv_kernel_size
  								lowerCAmelCase				=	output_stride
  								lowerCAmelCase				=	initializer_range
  								lowerCAmelCase				=	layer_norm_eps
  								lowerCAmelCase				=	n_attn_blocks
  								lowerCAmelCase				=	base_attn_unit_dims
  								lowerCAmelCase				=	width_multiplier
  								lowerCAmelCase				=	ffn_multiplier
  								lowerCAmelCase				=	ffn_dropout
  								lowerCAmelCase				=	attn_dropout
  								lowerCAmelCase				=	classifier_dropout_prob
  
  								# decode head attributes for semantic segmentation
  								lowerCAmelCase				=	aspp_out_channels
  								lowerCAmelCase				=	atrous_rates
  								lowerCAmelCase				=	aspp_dropout_prob
  								lowerCAmelCase				=	semantic_loss_ignore_index
  
  
  
  
  class      lowercase_						(						UpperCamelCase_		):
  
  
  
  	"""simple docstring"""
  
  
  
  
  
  	UpperCAmelCase_						:      List[str]     =       version.parse("""1.11"""		)
  
  
  	@property
  	def     SCREAMING_SNAKE_CASE_       (							self       )		->List[str]:
  								return OrderedDict([('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''})]       )
  
  
  	@property
  	def     SCREAMING_SNAKE_CASE_       (							self       )		->int:
  								if self.task == "image-classification":
  															return OrderedDict([('''logits''', {0: '''batch'''})]       )
  								else:
  															return OrderedDict([('''last_hidden_state''', {0: '''batch'''}), ('''pooler_output''', {0: '''batch'''})]       )
  
  
  
  
  	@property
  	def     SCREAMING_SNAKE_CASE_       (							self       )		->str:
  								return 1e-4
  
  
  
  
style_context: from __future__ import annotations
  
  from enum import Enum
  
  
  
  
  class      lowercase_						(						UpperCamelCase_		):
  
  
  
  	"""simple docstring"""
  
  
  
  
  
  	UpperCAmelCase_						:      str     =       24
  	UpperCAmelCase_						:      Dict     =       21
  	UpperCAmelCase_						:      List[str]     =       18
  	UpperCAmelCase_						:      Optional[int]     =       15
  	UpperCAmelCase_						:      str     =       12
  	UpperCAmelCase_						:      Union[str, Any]     =       9
  	UpperCAmelCase_						:      List[Any]     =       6
  	UpperCAmelCase_						:      Any     =       3
  	UpperCAmelCase_						:      List[str]     =       2
  	UpperCAmelCase_						:      Any     =       1
  	UpperCAmelCase_						:      Any     =       -1
  	UpperCAmelCase_						:      Any     =       -2
  	UpperCAmelCase_						:      Optional[int]     =       -3
  	UpperCAmelCase_						:      List[Any]     =       -6
  	UpperCAmelCase_						:      Optional[int]     =       -9
  	UpperCAmelCase_						:      str     =       -12
  	UpperCAmelCase_						:      Union[str, Any]     =       -15
  	UpperCAmelCase_						:      List[str]     =       -18
  	UpperCAmelCase_						:      str     =       -21
  	UpperCAmelCase_						:      Dict     =       -24
  
  
  
  
  class      lowercase_						(						UpperCamelCase_		):
  
  
  
  	"""simple docstring"""
  
  
  
  
  
  	UpperCAmelCase_						:      List[str]     =       8
  	UpperCAmelCase_						:      Union[str, Any]     =       7
  	UpperCAmelCase_						:      int     =       6
  	UpperCAmelCase_						:      int     =       5
  	UpperCAmelCase_						:      Any     =       4
  	UpperCAmelCase_						:      Dict     =       3
  	UpperCAmelCase_						:      Tuple     =       2
  	UpperCAmelCase_						:      Any     =       1
  
  def      SCREAMING_SNAKE_CASE_  (		snake_case__     ,						snake_case__     ,						snake_case__     ,						)  ->			float:
  							if isinstance(snake_case__     ,						snake_case__							):
  														lowerCAmelCase				=	SIUnit[known_prefix.lower()]
  							if isinstance(snake_case__     ,						snake_case__							):
  														lowerCAmelCase				=	SIUnit[unknown_prefix.lower()]
  							lowerCAmelCase				=	known_amount * (
  							    1_0 ** (known_prefix.value - unknown_prefix.value)
  							)
  							return unknown_amount
  
  def      SCREAMING_SNAKE_CASE_  (		snake_case__     ,						snake_case__     ,						snake_case__     ,						)  ->			float:
  							if isinstance(snake_case__     ,						snake_case__							):
  														lowerCAmelCase				=	BinaryUnit[known_prefix.lower()]
  							if isinstance(snake_case__     ,						snake_case__							):
  														lowerCAmelCase				=	BinaryUnit[unknown_prefix.lower()]
  							lowerCAmelCase				=	known_amount * (
  							    2 ** ((known_prefix.value - unknown_prefix.value) * 1_0)
  							)
  							return unknown_amount
  
  
  if __name__ == "__main__":
  	import doctest
  
  	doctest.testmod()
  
  
  
  