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


a       :						Tuple       		=		logging.get_logger(__name__)

a       :						Dict       		=		{
    '''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						):
    a   :					Any			     =					'mobilenet_v1'







    def __init__(      self      :							List[str]  ,       __UpperCamelCase      :							List[Any]=3  ,       __UpperCamelCase      :							Union[str, Any]=2_24  ,       __UpperCamelCase      :							Tuple=1.0  ,       __UpperCamelCase      :							Optional[int]=8  ,       __UpperCamelCase      :							Union[str, Any]="relu6"  ,       __UpperCamelCase      :							Union[str, Any]=True  ,       __UpperCamelCase      :							Any=0.9_9_9  ,       __UpperCamelCase      :							Optional[Any]=0.0_2  ,       __UpperCamelCase      :							Optional[int]=0.0_0_1  ,       **__UpperCamelCase      :							List[str]  ,       )		->Optional[Any]:






        '''simple docstring'''






        super().__init__(**__UpperCamelCase  )

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

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







class 		a_    (			_UpperCAmelCase						):
    a   :					Optional[Any]			     =					version.parse('1.11'						)







    @property
    def   _snake_case       (      self      :							Optional[Any]  )		->Mapping[str, Mapping[int, str]]:






        '''simple docstring'''






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







    @property
    def   _snake_case       (      self      :							List[Any]  )		->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      :							Dict  )		->float:






        '''simple docstring'''






        return 1e-4

"""simple docstring"""



import math
import unittest


def 			_UpperCamelCase						(    _A   )     ->	bool:





    """simple docstring"""

    assert isinstance(_A       ,   _A   ) and (
        number >= 0
    ), "'number' must been an int and positive"

    if 1 < number < 4:
        # 2 and 3 are primes
        return True
    elif number < 2 or number % 2 == 0 or number % 3 == 0:
        # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
        return False

    # All primes number are in format of 6k +/- 1
    for i in range(5       ,   int(math.sqrt(_A   ) + 1   )       ,   6   ):
        if number % i == 0 or number % (i + 2) == 0:
            return False
    return True




class 		a_    (			unittest.TestCase						):







    def   _snake_case       (      self      :							int  )		->Optional[int]:






        '''simple docstring'''






        self.assertTrue(is_prime(2  )  )
        self.assertTrue(is_prime(3  )  )
        self.assertTrue(is_prime(5  )  )
        self.assertTrue(is_prime(7  )  )
        self.assertTrue(is_prime(11  )  )
        self.assertTrue(is_prime(13  )  )
        self.assertTrue(is_prime(17  )  )
        self.assertTrue(is_prime(19  )  )
        self.assertTrue(is_prime(23  )  )
        self.assertTrue(is_prime(29  )  )







    def   _snake_case       (      self      :							Union[str, Any]  )		->Optional[Any]:






        '''simple docstring'''






        with self.assertRaises(__UpperCamelCase  ):
            is_prime(-19  )
        self.assertFalse(
            is_prime(0  )  ,       """Zero doesn't have any positive factors, primes must have exactly two."""  ,       )
        self.assertFalse(
            is_prime(1  )  ,       """One only has 1 positive factor, primes must have exactly two."""  ,       )
        self.assertFalse(is_prime(2 * 2  )  )
        self.assertFalse(is_prime(2 * 3  )  )
        self.assertFalse(is_prime(3 * 3  )  )
        self.assertFalse(is_prime(3 * 5  )  )
        self.assertFalse(is_prime(3 * 5 * 7  )  )


if __name__ == "__main__":
 unittest.main()