
"""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 				__a    (   __a					):



							'''simple docstring'''







							_lowerCamelCase				: 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.02     ,						_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     ,						) ->       Optional[int]:




										'''simple docstring'''
										super().__init__(**_lowerCamelCase					)

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

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





class 				__a    (   __a					):



							'''simple docstring'''







							_lowerCamelCase				: List[Any]					      =      version.parse("""1.11"""					)
							@property
							def      SCREAMING_SNAKE_CASE	(    self					) ->       Mapping[str, Mapping[int, str]]:




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




										'''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      SCREAMING_SNAKE_CASE	(    self					) ->       float:




										'''simple docstring'''
										return 1e-4







"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowercase							 =							{'''configuration_sew_d''': ['''SEW_D_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''SEWDConfig''']}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					_lowercase							 =							[
					    '''SEW_D_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''SEWDForCTC''',
					    '''SEWDForSequenceClassification''',
					    '''SEWDModel''',
					    '''SEWDPreTrainedModel''',
					]

if TYPE_CHECKING:
					from .configuration_sew_d import SEW_D_PRETRAINED_CONFIG_ARCHIVE_MAP, SEWDConfig

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_sew_d import (
										    SEW_D_PRETRAINED_MODEL_ARCHIVE_LIST,
										    SEWDForCTC,
										    SEWDForSequenceClassification,
										    SEWDModel,
										    SEWDPreTrainedModel,
										)


else:
					import sys

					_lowercase							 =							_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





