

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


__lowerCamelCase		       =    logging.get_logger(__name__)

__lowerCamelCase		       =    {
    "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__      (      UpperCamelCase_			):
    lowercase						=		"""mobilenet_v1"""



    def __init__(					self		,				UpperCamelCase__=3		,				UpperCamelCase__=224		,				UpperCamelCase__=1.0		,				UpperCamelCase__=8		,				UpperCamelCase__="relu6"		,				UpperCamelCase__=True		,				UpperCamelCase__=0.999		,				UpperCamelCase__=0.02		,				UpperCamelCase__=0.001		,				**UpperCamelCase__		,				)						->      Dict:





           '''simple docstring'''
           super().__init__(**_a       )

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

           A_						=      num_channels
           A_						=      image_size
           A_						=      depth_multiplier
           A_						=      min_depth
           A_						=      hidden_act
           A_						=      tf_padding
           A_						=      classifier_dropout_prob
           A_						=      initializer_range
           A_						=      layer_norm_eps


class 					A__      (      UpperCamelCase_			):
    lowercase						=		version.parse("1.11"			)



    @property
    def 					snake_case_			(					self       )						->      Mapping[str, Mapping[int, str]]:





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



    @property
    def 					snake_case_			(					self       )						->      Mapping[str, Mapping[int, str]]:





           '''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 					snake_case_			(					self       )						->      float:





           '''simple docstring'''
           return 1e-4



'''simple docstring'''







def       UpperCAmelCase__    (      UpperCAmelCase__,       UpperCAmelCase__,       UpperCAmelCase__ = 0,       UpperCAmelCase__ = 0				)			->			int:
       A_						=      right or len(UpperCAmelCase__				) - 1
       if left > right:
              return -1
       elif list_data[left] == key:
              return left
       elif list_data[right] == key:
              return right
       else:
              return search(UpperCAmelCase__,       UpperCAmelCase__,       left + 1,       right - 1				)


if __name__ == "__main__":
      import doctest

      doctest.testmod()
