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


a							=logging.get_logger(__name__)

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






class    __UpperCAmelCase						(	__lowerCAmelCase	):
				A__      :   Tuple  							=       '''mobilevitv2'''

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

										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    __UpperCAmelCase						(	__lowerCAmelCase	):
				A__      :   Dict  							=       version.parse('''1.11'''	)

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

				@property
				def 		_a	(      self      ):
										if self.task == "image-classification":
																return OrderedDict([("logits", {0: "batch"})]      )
										else:
																return OrderedDict([("last_hidden_state", {0: "batch"}), ("pooler_output", {0: "batch"})]      )






				@property
				def 		_a	(      self      ):
										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"]      )


