






"""simple docstring"""







from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


a					:							List[str]    =						logging.get_logger(__name__)

a					:							Union[str, Any]    =						{
    """google/bit-50""": """https://huggingface.co/google/bit-50/resolve/main/config.json""",
}


class        __UpperCAmelCase(  lowerCamelCase__    ,    lowerCamelCase__				):




						"""simple docstring"""




						__lowerCamelCase										=   "bit"
						__lowerCamelCase										=   ["preactivation", "bottleneck"]
						__lowerCamelCase										=   ["SAME", "VALID"]




						def __init__(  self			,    snake_case__=3			,    snake_case__=64			,    snake_case__=[256, 512, 1024, 2048]			,    snake_case__=[3, 4, 6, 3]			,    snake_case__="preactivation"			,    snake_case__="relu"			,    snake_case__=None			,    snake_case__=32			,    snake_case__=0.0			,    snake_case__=False			,    snake_case__=32			,    snake_case__=1			,    snake_case__=None			,    snake_case__=None			,    **snake_case__			,    ):
												'''simple docstring'''
												super().__init__(**SCREAMING_SNAKE_CASE__     )
												if layer_type not in self.layer_types:
																		raise ValueError(F'''layer_type={layer_type} is not one of {','.join(self.layer_types     )}'''     )
												if global_padding is not None:
																		if global_padding.upper() in self.supported_padding:
																								lowercase__							: List[str]=			global_padding.upper()
																		else:
																								raise ValueError(F'''Padding strategy {global_padding} not supported'''     )
												lowercase__							: List[Any]=			num_channels
												lowercase__							: Optional[int]=			embedding_size
												lowercase__							: str=			hidden_sizes
												lowercase__							: List[Any]=			depths
												lowercase__							: int=			layer_type
												lowercase__							: Optional[int]=			hidden_act
												lowercase__							: List[str]=			global_padding
												lowercase__							: Tuple=			num_groups
												lowercase__							: Optional[Any]=			drop_path_rate
												lowercase__							: Any=			embedding_dynamic_padding
												lowercase__							: Optional[Any]=			output_stride
												lowercase__							: List[Any]=			width_factor

												lowercase__							: List[Any]=			['''stem'''] + [F'''stage{idx}''' for idx in range(1			,    len(SCREAMING_SNAKE_CASE__     ) + 1     )]
												lowercase__							: List[Any]=			get_aligned_output_features_output_indices(
												    out_features=SCREAMING_SNAKE_CASE__			,    out_indices=SCREAMING_SNAKE_CASE__			,    stage_names=self.stage_names     )










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


UpperCamelCase__				:Union[str, Any]			   =	logging.get_logger(__name__)

UpperCamelCase__				:Union[str, 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      A(  lowerCamelCase__		):

		"""simple docstring"""





		A    =							"mobilenet_v2"
		def __init__( self					,				SCREAMING_SNAKE_CASE__=3					,				SCREAMING_SNAKE_CASE__=2_24					,				SCREAMING_SNAKE_CASE__=1.0					,				SCREAMING_SNAKE_CASE__=8					,				SCREAMING_SNAKE_CASE__=8					,				SCREAMING_SNAKE_CASE__=6					,				SCREAMING_SNAKE_CASE__=32					,				SCREAMING_SNAKE_CASE__=True					,				SCREAMING_SNAKE_CASE__=True					,				SCREAMING_SNAKE_CASE__="relu6"					,				SCREAMING_SNAKE_CASE__=True					,				SCREAMING_SNAKE_CASE__=0.8					,				SCREAMING_SNAKE_CASE__=0.0_2					,				SCREAMING_SNAKE_CASE__=0.0_0_1					,				SCREAMING_SNAKE_CASE__=2_55					,				**SCREAMING_SNAKE_CASE__					,				)      ->	int:

					"""simple docstring"""



					super().__init__(**SCREAMING_SNAKE_CASE__   )

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

					_UpperCamelCase					:Optional[int]					     =	num_channels
					_UpperCamelCase					:Tuple					     =	image_size
					_UpperCamelCase					:Union[str, Any]					     =	depth_multiplier
					_UpperCamelCase					:Any					     =	depth_divisible_by
					_UpperCamelCase					:Optional[int]					     =	min_depth
					_UpperCamelCase					:Union[str, Any]					     =	expand_ratio
					_UpperCamelCase					:str					     =	output_stride
					_UpperCamelCase					:Tuple					     =	first_layer_is_expansion
					_UpperCamelCase					:Any					     =	finegrained_output
					_UpperCamelCase					:Union[str, Any]					     =	hidden_act
					_UpperCamelCase					:Any					     =	tf_padding
					_UpperCamelCase					:str					     =	classifier_dropout_prob
					_UpperCamelCase					:Optional[Any]					     =	initializer_range
					_UpperCamelCase					:int					     =	layer_norm_eps
					_UpperCamelCase					:Union[str, Any]					     =	semantic_loss_ignore_index






class      A(  lowerCamelCase__		):

		"""simple docstring"""





		A    =							version.parse("1.11"		)
		@property
		def   _UpperCamelCase( self   )      ->	Mapping[str, Mapping[int, str]]:

					"""simple docstring"""



					return OrderedDict([('''pixel_values''', {0: '''batch'''})]   )
		@property
		def   _UpperCamelCase( 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   _UpperCamelCase( self   )      ->	float:

					"""simple docstring"""



					return 1E-4

