

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


SCREAMING_SNAKE_CASE						:Dict      =			logging.get_logger(__name__)

SCREAMING_SNAKE_CASE						:List[str]      =			{
    """apple/mobilevitv2-1.0""": """https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json""",
}






class 		__magic_name__ (				__lowerCAmelCase							):
     UpperCamelCase_     :Tuple									=	'''mobilevitv2'''






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

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

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






class 		__magic_name__ (				__lowerCAmelCase							):
     UpperCamelCase_     :Dict									=	version.parse("""1.11"""							)






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






     @property
     def      UpperCAmelCase_							(							self     )->			Optional[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      UpperCAmelCase_							(							self     )->			int:
         return 1e-4

"""simple docstring"""


from ..utils import DummyObject, requires_backends






class    __UpperCAmelCase						(	metaclass=__lowerCAmelCase	):
				A__      :   List[Any]  							=       ['''torch''', '''librosa''']

				def __init__(      self	, *_lowerCamelCase	, **_lowerCamelCase      ):
										requires_backends(self	, ["torch", "librosa"]      )

				@classmethod
				def 		_a	(      cls	, *_lowerCamelCase	, **_lowerCamelCase      ):
										requires_backends(cls	, ["torch", "librosa"]      )






				@classmethod
				def 		_a	(      cls	, *_lowerCamelCase	, **_lowerCamelCase      ):
										requires_backends(cls	, ["torch", "librosa"]      )






class    __UpperCAmelCase						(	metaclass=__lowerCAmelCase	):
				A__      :   List[str]  							=       ['''torch''', '''librosa''']

				def __init__(      self	, *_lowerCamelCase	, **_lowerCamelCase      ):
										requires_backends(self	, ["torch", "librosa"]      )

				@classmethod
				def 		_a	(      cls	, *_lowerCamelCase	, **_lowerCamelCase      ):
										requires_backends(cls	, ["torch", "librosa"]      )






				@classmethod
				def 		_a	(      cls	, *_lowerCamelCase	, **_lowerCamelCase      ):
										requires_backends(cls	, ["torch", "librosa"]      )


