code: 
  
  
  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_    :					str             =logging.get_logger(__name__)
  
  A_    :					int             ={
      """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        lowercase_				( UpperCamelCase__):
  							snake_case_        =		'''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.0_2			,    _UpperCAmelCase=1e-5			,    _UpperCAmelCase=True			,    _UpperCAmelCase=256			,    _UpperCAmelCase=[6, 12, 18]			,    _UpperCAmelCase=0.1			,    _UpperCAmelCase=255			,    **_UpperCAmelCase			,    ):
  
  
  
  
  
  
  
  													"""simple docstring"""
  
  
  													super().__init__(**_UpperCAmelCase		)
  
  													a_					=		num_channels
  													a_					=		image_size
  													a_					=		patch_size
  													a_					=		hidden_sizes
  													a_					=		neck_hidden_sizes
  													a_					=		num_attention_heads
  													a_					=		mlp_ratio
  													a_					=		expand_ratio
  													a_					=		hidden_act
  													a_					=		conv_kernel_size
  													a_					=		output_stride
  													a_					=		hidden_dropout_prob
  													a_					=		attention_probs_dropout_prob
  													a_					=		classifier_dropout_prob
  													a_					=		initializer_range
  													a_					=		layer_norm_eps
  													a_					=		qkv_bias
  
  													# decode head attributes for semantic segmentation
  													a_					=		aspp_out_channels
  													a_					=		atrous_rates
  													a_					=		aspp_dropout_prob
  													a_					=		semantic_loss_ignore_index
  
  
  
  
  
  class        lowercase_				( UpperCamelCase__):
  							snake_case_        =		version.parse('''1.11''')
  
  
  							@property
  							def 						lowercase__     (   self		):
  
  
  
  
  
  
  
  													"""simple docstring"""
  
  
  													return OrderedDict([("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""})]		)
  
  
  							@property
  							def 						lowercase__     (   self		):
  
  
  
  
  
  
  
  													"""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 						lowercase__     (   self		):
  
  
  
  
  
  
  
  													"""simple docstring"""
  
  
  													return 1e-4
style_context: 
  
  
  import abc
  import copy
  import dataclasses
  from dataclasses import dataclass
  from typing import ClassVar, Dict, Type, TypeVar
  
  from ..features import Features
  
  
  A_    :					Tuple             =TypeVar("""T""", bound="""TaskTemplate""")
  
  
  
  
  
  @dataclass(frozen=UpperCamelCase__)
  class        lowercase_				( abc.ABC):
  
  
  
  
  
  
  							"""simple docstring"""
  
  
  
  
  
  
  
  							snake_case_        =		42
  							snake_case_        =		42
  							snake_case_        =		42
  
  
  							def 						lowercase__     (   self			,    _UpperCAmelCase		):
  
  
  
  
  
  
  
  													"""simple docstring"""
  
  
  													return copy.deepcopy(self		)
  
  
  							@property
  							def 						lowercase__     (   self		):
  
  
  
  
  
  
  
  													"""simple docstring"""
  
  
  													return Features(**self.input_schema			,    **self.label_schema		)
  
  
  							@property
  							@abc.abstractmethod
  							def 						lowercase__     (   self		):
  
  
  
  
  
  
  
  													"""simple docstring"""
  
  
  													raise NotImplementedError
  
  
  
  
  
  
  							@classmethod
  							def 						lowercase__     (   cls			,    _UpperCAmelCase		):
  
  
  
  
  
  
  
  													"""simple docstring"""
  
  
  													a_					=		{f.name for f in dataclasses.fields(cls		)}
  													return cls(**{k: v for k, v in template_dict.items() if k in field_names}		)