
"""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


lowerCAmelCase			=		logging.get_logger(__name__)

lowerCAmelCase			=		{
    """apple/mobilevitv2-1.0""": """https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json""",
}

class 					A_			(  A__     ):



							"""simple docstring"""






							SCREAMING_SNAKE_CASE_			   =     """mobilevitv2"""





							def __init__(						self						:Optional[Any]  ,							lowerCamelCase_						:Union[str, Any]=3  ,							lowerCamelCase_						:Union[str, Any]=256  ,							lowerCamelCase_						:Union[str, Any]=2  ,							lowerCamelCase_						:List[Any]=2.0  ,							lowerCamelCase_						:List[str]="swish"  ,							lowerCamelCase_						:Tuple=3  ,							lowerCamelCase_						:List[str]=32  ,							lowerCamelCase_						:List[str]=0.1  ,							lowerCamelCase_						:Tuple=0.02  ,							lowerCamelCase_						:str=1e-5  ,							lowerCamelCase_						:Optional[int]=512  ,							lowerCamelCase_						:int=[6, 12, 18]  ,							lowerCamelCase_						:Any=0.1  ,							lowerCamelCase_						:Dict=255  ,							lowerCamelCase_						:Tuple=[2, 4, 3]  ,							lowerCamelCase_						:List[str]=[128, 192, 256]  ,							lowerCamelCase_						:Optional[Any]=1.0  ,							lowerCamelCase_						:Optional[int]=2  ,							lowerCamelCase_						:int=0.0  ,							lowerCamelCase_						:Optional[int]=0.0  ,							**lowerCamelCase_						:int  ,							):





										"""simple docstring"""

										super().__init__(**lowerCamelCase_ )

										lowerCamelCase__			:  Dict  =num_channels
										lowerCamelCase__			:  Union[str, Any]  =image_size
										lowerCamelCase__			:  Tuple  =patch_size
										lowerCamelCase__			:  Union[str, Any]  =expand_ratio
										lowerCamelCase__			:  int  =hidden_act
										lowerCamelCase__			:  Any  =conv_kernel_size
										lowerCamelCase__			:  List[str]  =output_stride
										lowerCamelCase__			:  Dict  =initializer_range
										lowerCamelCase__			:  Union[str, Any]  =layer_norm_eps
										lowerCamelCase__			:  Tuple  =n_attn_blocks
										lowerCamelCase__			:  Union[str, Any]  =base_attn_unit_dims
										lowerCamelCase__			:  Tuple  =width_multiplier
										lowerCamelCase__			:  Tuple  =ffn_multiplier
										lowerCamelCase__			:  Any  =ffn_dropout
										lowerCamelCase__			:  List[str]  =attn_dropout
										lowerCamelCase__			:  Dict  =classifier_dropout_prob

										# decode head attributes for semantic segmentation
										lowerCamelCase__			:  List[Any]  =aspp_out_channels
										lowerCamelCase__			:  Optional[Any]  =atrous_rates
										lowerCamelCase__			:  int  =aspp_dropout_prob
										lowerCamelCase__			:  Optional[int]  =semantic_loss_ignore_index






class 					A_			(  A__     ):



							"""simple docstring"""






							SCREAMING_SNAKE_CASE_			   =     version.parse("""1.11"""     )





							@property
							def    UpperCAmelCase__							(						self						:Optional[Any] ):





										"""simple docstring"""

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





							@property
							def    UpperCAmelCase__							(						self						:Any ):





										"""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						:Optional[int] ):





										"""simple docstring"""

										return 1e-4

"""simple docstring"""


import unittest
import warnings

from datasets.utils import experimental






@experimental
def      lowerCAmelCase_     (	)     ->Optional[Any]:
			return "success"

class 					A_			(  unittest.TestCase     ):



							"""simple docstring"""






							def    UpperCAmelCase__							(						self						:int ):





										"""simple docstring"""

										with warnings.catch_warnings(record=lowerCamelCase_ ) as w:
													warnings.simplefilter('always' )
													self.assertEqual(dummy_function()  ,							'success' )
										self.assertEqual(len(lowerCamelCase_ )  ,							1 )