


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


snake_case__						:   Any			 = logging.get_logger(__name__)

snake_case__						:   str			 = {
    '''google/mobilenet_v1_1.0_224''': '''https://huggingface.co/google/mobilenet_v1_1.0_224/resolve/main/config.json''',
    '''google/mobilenet_v1_0.75_192''': '''https://huggingface.co/google/mobilenet_v1_0.75_192/resolve/main/config.json''',
    # See all MobileNetV1 models at https://huggingface.co/models?filter=mobilenet_v1
}



class 						snake_case_(				a__	):
     __UpperCamelCase     =    '''mobilenet_v1'''






     def __init__(		self     :    str    , UpperCamelCase_     :    List[Any]=3    , UpperCamelCase_     :    Optional[int]=2_2_4    , UpperCamelCase_     :    List[Any]=1.0    , UpperCamelCase_     :    List[Any]=8    , UpperCamelCase_     :    str="relu6"    , UpperCamelCase_     :    Dict=True    , UpperCamelCase_     :    Optional[int]=0.999    , UpperCamelCase_     :    List[str]=0.02    , UpperCamelCase_     :    List[str]=0.001    , **UpperCamelCase_     :    str    , ):
           super().__init__(**UpperCamelCase_ )

           if depth_multiplier <= 0:
                 raise ValueError('''depth_multiplier must be greater than zero.''' )

           lowerCAmelCase    :		List[str]				=      num_channels
           lowerCAmelCase    :		str				=      image_size
           lowerCAmelCase    :		Any				=      depth_multiplier
           lowerCAmelCase    :		Tuple				=      min_depth
           lowerCAmelCase    :		List[str]				=      hidden_act
           lowerCAmelCase    :		Optional[int]				=      tf_padding
           lowerCAmelCase    :		int				=      classifier_dropout_prob
           lowerCAmelCase    :		Dict				=      initializer_range
           lowerCAmelCase    :		List[Any]				=      layer_norm_eps



class 						snake_case_(				a__	):
     __UpperCamelCase     =    version.parse('''1.11'''	)






     @property
     def    lowerCamelCase__   (		self     :    int ):
           return OrderedDict([('''pixel_values''', {0: '''batch'''})] )






     @property
     def    lowerCamelCase__   (		self     :    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    lowerCamelCase__   (		self     :    Optional[int] ):
           return 1E-4







"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A:   List[str]								=		{
    "configuration_clipseg": [
        "CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "CLIPSegConfig",
        "CLIPSegTextConfig",
        "CLIPSegVisionConfig",
    ],
    "processing_clipseg": ["CLIPSegProcessor"],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A:   Optional[int]								=		[
          "CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST",
          "CLIPSegModel",
          "CLIPSegPreTrainedModel",
          "CLIPSegTextModel",
          "CLIPSegVisionModel",
          "CLIPSegForImageSegmentation",
      ]

if TYPE_CHECKING:
      from .configuration_clipseg import (
          CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP,
          CLIPSegConfig,
          CLIPSegTextConfig,
          CLIPSegVisionConfig,
      )
      from .processing_clipseg import CLIPSegProcessor

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_clipseg import (
                CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST,
                CLIPSegForImageSegmentation,
                CLIPSegModel,
                CLIPSegPreTrainedModel,
                CLIPSegTextModel,
                CLIPSegVisionModel,
            )

else:
      import sys

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