


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      :     Optional[Any]     =					'''mobilenet_v1'''

							def __init__(				self:      List[Any]       ,		UpperCamelCase_:      Any=3       ,		UpperCamelCase_:      int=224       ,		UpperCamelCase_:      Optional[int]=1.0       ,		UpperCamelCase_:      int=8       ,		UpperCamelCase_:      str="relu6"       ,		UpperCamelCase_:      Optional[Any]=True       ,		UpperCamelCase_:      List[Any]=0.999       ,		UpperCamelCase_:      List[Any]=0.02       ,		UpperCamelCase_:      Union[str, Any]=0.001       ,		**UpperCamelCase_:      Optional[int]       ,		)     ->  List[Any]:





									"""simple docstring"""







									super().__init__(**UpperCamelCase_				)

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

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


class 			_a				(     UpperCamelCase__     ):
							_lowercase      :     List[str]     =					version.parse('''1.11'''     )

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





									"""simple docstring"""







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

							@property
							def  lowerCamelCase_					(				self:      Dict				)     ->  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  lowerCamelCase_					(				self:      Any				)     ->  float:





									"""simple docstring"""







									return 1E-4



'''simple docstring'''




from functools import lru_cache






@lru_cache
def 							snake_case__				(     _A:   int					)       ->      int:

		'''simple docstring'''


		if num < 0:
				raise ValueError("""Number should not be negative."""					)

		return 1 if num in (0, 1) else num * factorial(num - 1					)


if __name__ == "__main__":
						import doctest

						doctest.testmod()




