






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


SCREAMING_SNAKE_CASE						:						List[Any]					   =       logging.get_logger(__name__)

SCREAMING_SNAKE_CASE						:						Any					   =       {
    '''google/mobilenet_v2_1.4_224''': '''https://huggingface.co/google/mobilenet_v2_1.4_224/resolve/main/config.json''',
    '''google/mobilenet_v2_1.0_224''': '''https://huggingface.co/google/mobilenet_v2_1.0_224/resolve/main/config.json''',
    '''google/mobilenet_v2_0.75_160''': '''https://huggingface.co/google/mobilenet_v2_0.75_160/resolve/main/config.json''',
    '''google/mobilenet_v2_0.35_96''': '''https://huggingface.co/google/mobilenet_v2_0.35_96/resolve/main/config.json''',
    # See all MobileNetV2 models at https://huggingface.co/models?filter=mobilenet_v2
}





class       snake_case_       (    _lowerCamelCase       ):
	SCREAMING_SNAKE_CASE_:							Optional[int]   			=					"""mobilenet_v2"""


	def __init__(      self  ,					__a=3  ,					__a=224  ,					__a=1.0  ,					__a=8  ,					__a=8  ,					__a=6  ,					__a=32  ,					__a=True  ,					__a=True  ,					__a="relu6"  ,					__a=True  ,					__a=0.8  ,					__a=0.02  ,					__a=0.001  ,					__a=255  ,					**__a  ,					):


					"""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__							 =       depth_divisible_by
					A__							 =       min_depth
					A__							 =       expand_ratio
					A__							 =       output_stride
					A__							 =       first_layer_is_expansion
					A__							 =       finegrained_output
					A__							 =       hidden_act
					A__							 =       tf_padding
					A__							 =       classifier_dropout_prob
					A__							 =       initializer_range
					A__							 =       layer_norm_eps
					A__							 =       semantic_loss_ignore_index





class       snake_case_       (    _lowerCamelCase       ):
	SCREAMING_SNAKE_CASE_:							Dict   			=					version.parse("""1.11"""       )


	@property
	def       _UpperCAmelCase						(      self						):


					"""simple docstring"""

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


	@property
	def       _UpperCAmelCase						(      self						):


					"""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       _UpperCAmelCase						(      self						):


					"""simple docstring"""

					return 1E-4










"""simple docstring"""






from ...configuration_utils import PretrainedConfig
from ...utils import logging


SCREAMING_SNAKE_CASE						:						Any					   =       logging.get_logger(__name__)





class       snake_case_       (    _lowerCamelCase       ):



	"""simple docstring"""

	SCREAMING_SNAKE_CASE_:							Union[str, Any]   			=					"""timm_backbone"""


	def __init__(      self  ,					__a=None  ,					__a=3  ,					__a=True  ,					__a=True  ,					__a=None  ,					**__a  ,					):


					"""simple docstring"""

					super().__init__(**__a						)
					A__							 =       backbone
					A__							 =       num_channels
					A__							 =       features_only
					A__							 =       use_pretrained_backbone
					A__							 =       True
					A__							 =       out_indices if out_indices is not None else (-1,)


