

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    				=     logging.get_logger(__name__)

__UpperCAmelCase    				=     {
    '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 A__    ( A ):



 """simple docstring"""







 _lowercase     :					List[Any]      =						'''mobilenet_v1'''

 def __init__(		self :	List[str]     ,						A_ :	Optional[Any]=3     ,						A_ :	str=2_2_4     ,						A_ :	List[Any]=1.0     ,						A_ :	str=8     ,						A_ :	Tuple="relu6"     ,						A_ :	Optional[Any]=True     ,						A_ :	List[Any]=0.999     ,						A_ :	Tuple=0.02     ,						A_ :	Any=0.001     ,						**A_ :	List[Any]     ,						):






      '''simple docstring'''




      super().__init__(**A_       )

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

      _lowerCAmelCase   :					List[str]        =    num_channels
      _lowerCAmelCase   :					Optional[Any]        =    image_size
      _lowerCAmelCase   :					Optional[int]        =    depth_multiplier
      _lowerCAmelCase   :					Union[str, Any]        =    min_depth
      _lowerCAmelCase   :					Optional[int]        =    hidden_act
      _lowerCAmelCase   :					Tuple        =    tf_padding
      _lowerCAmelCase   :					List[Any]        =    classifier_dropout_prob
      _lowerCAmelCase   :					Tuple        =    initializer_range
      _lowerCAmelCase   :					List[str]        =    layer_norm_eps





class A__    ( A ):



 """simple docstring"""







 _lowercase     :					int      =						version.parse('''1.11''' )

 @property
 def    __magic_name__       (		self :	Any       ):






      '''simple docstring'''




      return OrderedDict([("pixel_values", {0: "batch"})]       )

 @property
 def    __magic_name__       (		self :	List[Any]       ):






      '''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    __magic_name__       (		self :	str       ):






      '''simple docstring'''




      return 1E-4









from typing import TYPE_CHECKING

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


__UpperCAmelCase    				=     {'configuration_yolos': ['YOLOS_PRETRAINED_CONFIG_ARCHIVE_MAP', 'YolosConfig', 'YolosOnnxConfig']}

try:
  if not is_vision_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __UpperCAmelCase    				=     ['YolosFeatureExtractor']
  __UpperCAmelCase    				=     ['YolosImageProcessor']

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __UpperCAmelCase    				=     [
      'YOLOS_PRETRAINED_MODEL_ARCHIVE_LIST',
      'YolosForObjectDetection',
      'YolosModel',
      'YolosPreTrainedModel',
  ]


if TYPE_CHECKING:
  from .configuration_yolos import YOLOS_PRETRAINED_CONFIG_ARCHIVE_MAP, YolosConfig, YolosOnnxConfig

  try:
    if not is_vision_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .feature_extraction_yolos import YolosFeatureExtractor
    from .image_processing_yolos import YolosImageProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_yolos import (
        YOLOS_PRETRAINED_MODEL_ARCHIVE_LIST,
        YolosForObjectDetection,
        YolosModel,
        YolosPreTrainedModel,
    )


else:
  import sys

  __UpperCAmelCase    				=     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






