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 :     int          =  logging.get_logger(__name__)

__lowerCamelCase :     Union[str, Any]          =  {
    '''apple/mobilevitv2-1.0''': '''https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json''',
}






class 		a__						( snake_case__ ):
					A     	=							'mobilevitv2'

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







							"""simple docstring"""






							super().__init__(**_A   )

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

							# decode head attributes for semantic segmentation
							SCREAMING_SNAKE_CASE_  :		List[str]    				=   aspp_out_channels
							SCREAMING_SNAKE_CASE_  :		Optional[int]    				=   atrous_rates
							SCREAMING_SNAKE_CASE_  :		Optional[int]    				=   aspp_dropout_prob
							SCREAMING_SNAKE_CASE_  :		Union[str, Any]    				=   semantic_loss_ignore_index







class 		a__						( snake_case__ ):
					A     	=							version.parse('1.11' )

					@property
					def     __UpperCamelCase       (   self				:	Any   ):







							"""simple docstring"""






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

					@property
					def     __UpperCamelCase       (   self				:	int   ):







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







							"""simple docstring"""






							return 1E-4

import warnings

from ...utils import logging
from .image_processing_vit import ViTImageProcessor


__lowerCamelCase :     Tuple          =  logging.get_logger(__name__)






class 		a__						( A__ ):

					def __init__(   self				:	List[Any],*_A				:	Union[str, Any],**_A				:	List[Any]   ):







							"""simple docstring"""






							warnings.warn(
							    "The class ViTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"
							    " use ViTImageProcessor instead.",_A,)
							super().__init__(*_A,**_A   )
