




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


_lowerCamelCase							:		List[Any]										=						logging.get_logger(__name__)

_lowerCamelCase							:		Any										=						{
    "apple/mobilevit-small": "https://huggingface.co/apple/mobilevit-small/resolve/main/config.json",
    "apple/mobilevit-x-small": "https://huggingface.co/apple/mobilevit-x-small/resolve/main/config.json",
    "apple/mobilevit-xx-small": "https://huggingface.co/apple/mobilevit-xx-small/resolve/main/config.json",
    "apple/deeplabv3-mobilevit-small": (
        "https://huggingface.co/apple/deeplabv3-mobilevit-small/resolve/main/config.json"
    ),
    "apple/deeplabv3-mobilevit-x-small": (
        "https://huggingface.co/apple/deeplabv3-mobilevit-x-small/resolve/main/config.json"
    ),
    "apple/deeplabv3-mobilevit-xx-small": (
        "https://huggingface.co/apple/deeplabv3-mobilevit-xx-small/resolve/main/config.json"
    ),
    # See all MobileViT models at https://huggingface.co/models?filter=mobilevit
}





class   lowerCamelCase_							( SCREAMING_SNAKE_CASE__	):




					'''simple docstring'''






					lowercase__					=				'mobilevit'






					def __init__(					self,						__UpperCamelCase=3,						__UpperCamelCase=256,						__UpperCamelCase=2,						__UpperCamelCase=[144, 192, 240],						__UpperCamelCase=[16, 32, 64, 96, 128, 160, 640],						__UpperCamelCase=4,						__UpperCamelCase=2.0,						__UpperCamelCase=4.0,						__UpperCamelCase="silu",						__UpperCamelCase=3,						__UpperCamelCase=32,						__UpperCamelCase=0.1,						__UpperCamelCase=0.0,						__UpperCamelCase=0.1,						__UpperCamelCase=0.02,						__UpperCamelCase=1E-5,						__UpperCamelCase=True,						__UpperCamelCase=256,						__UpperCamelCase=[6, 12, 18],						__UpperCamelCase=0.1,						__UpperCamelCase=255,						**__UpperCamelCase,						):
							super().__init__(**a_				)

							_snake_case			 = num_channels
							_snake_case			 = image_size
							_snake_case			 = patch_size
							_snake_case			 = hidden_sizes
							_snake_case			 = neck_hidden_sizes
							_snake_case			 = num_attention_heads
							_snake_case			 = mlp_ratio
							_snake_case			 = expand_ratio
							_snake_case			 = hidden_act
							_snake_case			 = conv_kernel_size
							_snake_case			 = output_stride
							_snake_case			 = hidden_dropout_prob
							_snake_case			 = attention_probs_dropout_prob
							_snake_case			 = classifier_dropout_prob
							_snake_case			 = initializer_range
							_snake_case			 = layer_norm_eps
							_snake_case			 = qkv_bias

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





class   lowerCamelCase_							( SCREAMING_SNAKE_CASE__	):




					'''simple docstring'''






					lowercase__					=				version.parse("""1.11"""	)






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






					@property
					def        __SCREAMING_SNAKE_CASE			(					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        __SCREAMING_SNAKE_CASE			(					self				):
							return 1E-4











'''simple docstring'''







import warnings

from ...utils import logging
from .image_processing_vilt import ViltImageProcessor


_lowerCamelCase							:		Optional[Any]										=						logging.get_logger(__name__)





class   lowerCamelCase_							( UpperCAmelCase_							):




					'''simple docstring'''






					def __init__(					self,						*__UpperCamelCase,						**__UpperCamelCase				):
							warnings.warn(
							    "The class ViltFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"
							    " use ViltImageProcessor instead.",						__UpperCamelCase,						)
							super().__init__(*__UpperCamelCase,						**__UpperCamelCase				)





