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


lowercase_  		=			logging.get_logger(__name__)

lowercase_  		=			{
    '''apple/mobilevitv2-1.0''': '''https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json''',
}
class 	SCREAMING_SNAKE_CASE      (    __lowercase):







		"""simple docstring"""
		lowercase :   List[Any]							=				'mobilevitv2'






		def __init__( self		,    __A=3		,    __A=256		,    __A=2		,    __A=2.0		,    __A="swish"		,    __A=3		,    __A=32		,    __A=0.1		,    __A=0.02		,    __A=1E-5		,    __A=512		,    __A=[6, 12, 18]		,    __A=0.1		,    __A=255		,    __A=[2, 4, 3]		,    __A=[128, 192, 256]		,    __A=1.0		,    __A=2		,    __A=0.0		,    __A=0.0		,    **__A		,    )			->  Dict:
								super().__init__(**__A					)

								_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 	SCREAMING_SNAKE_CASE      (    __lowercase):







		"""simple docstring"""
		lowercase :   Tuple							=				version.parse('1.11')






		@property
		def 		UpperCamelCase__							( self					)			->  Mapping[str, Mapping[int, str]]:
								return OrderedDict([('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'})]					)






		@property
		def 		UpperCamelCase__							( self					)			->  Mapping[str, Mapping[int, str]]:
								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:
								return 1E-4






'''simple docstring'''

from ..utils import DummyObject, requires_backends
class 	SCREAMING_SNAKE_CASE      (    metaclass=__lowercase):







		"""simple docstring"""
		lowercase :   List[Any]							=				['tensorflow_text']






		def __init__( self		,    *__A		,    **__A					)			->  List[Any]:
								requires_backends(self		,    ['tensorflow_text']					)





