





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


_UpperCamelCase   :							int     =	logging.get_logger(__name__)

_UpperCamelCase   :							List[str]     =	{
    """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(						_a):

  """simple docstring"""







  lowerCamelCase__      					=   '''mobilevit'''

  def __init__( self  ,    UpperCAmelCase=3  ,    UpperCAmelCase=2_56  ,    UpperCAmelCase=2  ,    UpperCAmelCase=[1_44, 1_92, 2_40]  ,    UpperCAmelCase=[16, 32, 64, 96, 1_28, 1_60, 6_40]  ,    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=2_56  ,    UpperCAmelCase=[6, 12, 18]  ,    UpperCAmelCase=0.1  ,    UpperCAmelCase=2_55  ,    **UpperCAmelCase  ,    )-> Any:
     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 						_lowerCAmelCase(						_a):

  """simple docstring"""







  lowerCamelCase__      					=   version.parse('''1.11''')

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

  @property
  def 		SCREAMING_SNAKE_CASE__	( self     )-> Mapping[str, Mapping[int, str]]:
     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:
     return 1e-4








from __future__ import annotations

import sys
def 				__UpperCamelCase  (		snake_case    ,	snake_case     )  ->						tuple[int, int]:


   '''simple docstring'''







   if abs(snake_case     ) == 1:
      return a, 0
   elif abs(snake_case     ) == 1:
      return 0, b

   __A ,						__A				 =       a, b
   __A ,						__A				 =       1, 0
   __A ,						__A				 =       0, 1

   while remainder != 0:
      __A				 =       old_remainder // remainder
      __A ,						__A				 =       remainder, old_remainder - quotient * remainder
      __A ,						__A				 =       coeff_a, old_coeff_a - quotient * coeff_a
      __A ,						__A				 =       coeff_b, old_coeff_b - quotient * coeff_b

   # sign correction for negative numbers
   if a < 0:
      __A				 =       -old_coeff_a
   if b < 0:
      __A				 =       -old_coeff_b

   return old_coeff_a, old_coeff_b
def 				__UpperCamelCase  (		)  ->						Tuple:


   '''simple docstring'''







   if len(sys.argv     ) < 3:
      print('''2 integer arguments required'''     )
      return 1
   __A				 =       int(sys.argv[1]     )
   __A				 =       int(sys.argv[2]     )
   print(extended_euclidean_algorithm(snake_case    ,	snake_case     )     )
   return 0


if __name__ == "__main__":
    raise SystemExit(main())

