


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[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    __magic_name__						(  __A):
     A:		List[str]								=   "mobilevit"


     def __init__(   self				:  Any				,						lowerCamelCase__				:  Union[str, Any]=3				,						lowerCamelCase__				:  Any=256				,						lowerCamelCase__				:  int=2				,						lowerCamelCase__				:  Union[str, Any]=[144, 192, 240]				,						lowerCamelCase__				:  Tuple=[16, 32, 64, 96, 128, 160, 640]				,						lowerCamelCase__				:  Tuple=4				,						lowerCamelCase__				:  Optional[int]=2.0				,						lowerCamelCase__				:  Tuple=4.0				,						lowerCamelCase__				:  List[Any]="silu"				,						lowerCamelCase__				:  Tuple=3				,						lowerCamelCase__				:  List[str]=32				,						lowerCamelCase__				:  int=0.1				,						lowerCamelCase__				:  Any=0.0				,						lowerCamelCase__				:  Union[str, Any]=0.1				,						lowerCamelCase__				:  Union[str, Any]=0.02				,						lowerCamelCase__				:  Any=1E-5				,						lowerCamelCase__				:  List[Any]=True				,						lowerCamelCase__				:  List[str]=256				,						lowerCamelCase__				:  Dict=[6, 12, 18]				,						lowerCamelCase__				:  Optional[Any]=0.1				,						lowerCamelCase__				:  Dict=255				,						**lowerCamelCase__				:  Tuple				,						)	->   Tuple:





      '''simple docstring'''






      super().__init__(**_lowercase      )

      UpperCamelCase__       :     Optional[Any] 							= num_channels
      UpperCamelCase__       :     Dict 							= image_size
      UpperCamelCase__       :     Optional[int] 							= patch_size
      UpperCamelCase__       :     Tuple 							= hidden_sizes
      UpperCamelCase__       :     Union[str, Any] 							= neck_hidden_sizes
      UpperCamelCase__       :     Any 							= num_attention_heads
      UpperCamelCase__       :     int 							= mlp_ratio
      UpperCamelCase__       :     Optional[Any] 							= expand_ratio
      UpperCamelCase__       :     Union[str, Any] 							= hidden_act
      UpperCamelCase__       :     str 							= conv_kernel_size
      UpperCamelCase__       :     Any 							= output_stride
      UpperCamelCase__       :     List[str] 							= hidden_dropout_prob
      UpperCamelCase__       :     Tuple 							= attention_probs_dropout_prob
      UpperCamelCase__       :     List[Any] 							= classifier_dropout_prob
      UpperCamelCase__       :     Optional[Any] 							= initializer_range
      UpperCamelCase__       :     str 							= layer_norm_eps
      UpperCamelCase__       :     List[Any] 							= qkv_bias

      # decode head attributes for semantic segmentation
      UpperCamelCase__       :     List[Any] 							= aspp_out_channels
      UpperCamelCase__       :     Dict 							= atrous_rates
      UpperCamelCase__       :     Optional[Any] 							= aspp_dropout_prob
      UpperCamelCase__       :     Union[str, Any] 							= semantic_loss_ignore_index



class    __magic_name__						(  __A):
     A:		List[str]								=   version.parse("1.11")


     @property
     def   UpperCAmelCase__						(   self				:  Dict      )	->   Tuple:





      '''simple docstring'''






      return OrderedDict([('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''})]      )


     @property
     def   UpperCAmelCase__						(   self				:  str      )	->   Tuple:





      '''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   UpperCAmelCase__						(   self				:  List[Any]      )	->   List[Any]:





      '''simple docstring'''






      return 1E-4









from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


UpperCAmelCase_       : List[Any]							=    {
    """configuration_retribert""": ["""RETRIBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """RetriBertConfig"""],
    """tokenization_retribert""": ["""RetriBertTokenizer"""],
}

try:
      if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCAmelCase_       : str							=    ["""RetriBertTokenizerFast"""]

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCAmelCase_       : Optional[Any]							=    [
          """RETRIBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """RetriBertModel""",
          """RetriBertPreTrainedModel""",
      ]


if TYPE_CHECKING:
      from .configuration_retribert import RETRIBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, RetriBertConfig
      from .tokenization_retribert import RetriBertTokenizer

      try:
            if not is_tokenizers_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .tokenization_retribert_fast import RetriBertTokenizerFast

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_retribert import (
                RETRIBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                RetriBertModel,
                RetriBertPreTrainedModel,
            )

else:
      import sys

      UpperCAmelCase_       : Tuple							=    _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
