


'''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       							=				logging.get_logger(__name__)

__UpperCAmelCase       							=				{
    "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__							(				snake_case__    ):





							'''simple docstring'''






							lowercase__     :  Any      		= "mobilenet_v2"







							def __init__(						self   ,       lowerCamelCase_=3   ,       lowerCamelCase_=2_24   ,       lowerCamelCase_=1.0   ,       lowerCamelCase_=8   ,       lowerCamelCase_=8   ,       lowerCamelCase_=6   ,       lowerCamelCase_=32   ,       lowerCamelCase_=True   ,       lowerCamelCase_=True   ,       lowerCamelCase_="relu6"   ,       lowerCamelCase_=True   ,       lowerCamelCase_=0.8   ,       lowerCamelCase_=0.02   ,       lowerCamelCase_=0.001   ,       lowerCamelCase_=2_55   ,       **lowerCamelCase_   ,       )			->				Tuple:
														super().__init__(**__snake_case  )

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

														lowerCAmelCase__			  =      num_channels
														lowerCAmelCase__			  =      image_size
														lowerCAmelCase__			  =      depth_multiplier
														lowerCAmelCase__			  =      depth_divisible_by
														lowerCAmelCase__			  =      min_depth
														lowerCAmelCase__			  =      expand_ratio
														lowerCAmelCase__			  =      output_stride
														lowerCAmelCase__			  =      first_layer_is_expansion
														lowerCAmelCase__			  =      finegrained_output
														lowerCAmelCase__			  =      hidden_act
														lowerCAmelCase__			  =      tf_padding
														lowerCAmelCase__			  =      classifier_dropout_prob
														lowerCAmelCase__			  =      initializer_range
														lowerCAmelCase__			  =      layer_norm_eps
														lowerCAmelCase__			  =      semantic_loss_ignore_index




class 						a__							(				snake_case__    ):





							'''simple docstring'''






							lowercase__     :  Dict      		= version.parse("1.11"    )







							@property
							def     __SCREAMING_SNAKE_CASE				(						self  )			->				Tuple:
														return OrderedDict([('''pixel_values''', {0: '''batch'''})]  )







							@property
							def     __SCREAMING_SNAKE_CASE				(						self  )			->				str:
														if self.task == "image-classification":
																					return OrderedDict([('''logits''', {0: '''batch'''})]  )
														else:
																					return OrderedDict([('''last_hidden_state''', {0: '''batch'''}), ('''pooler_output''', {0: '''batch'''})]  )







							@property
							def     __SCREAMING_SNAKE_CASE				(						self  )			->				str:
														return 1e-4



import os
from distutils.util import strtobool
def      UpperCAmelCase__		(UpperCamelCase_				,UpperCamelCase_							):



     """simple docstring"""






     for e in env_keys:
          snake_case											=							int(os.environ.get(UpperCamelCase_				,-1							)							)
          if val >= 0:
               return val
     return default
def      UpperCAmelCase__		(UpperCamelCase_				,UpperCamelCase_=False							):



     """simple docstring"""






     snake_case											=							os.environ.get(UpperCamelCase_				,str(UpperCamelCase_							)							)
     return strtobool(UpperCamelCase_							) == 1  # As its name indicates `strtobool` actually returns an int...

def      UpperCAmelCase__		(UpperCamelCase_				,UpperCamelCase_="no"							):



     """simple docstring"""






     snake_case											=							os.environ.get(UpperCamelCase_				,str(UpperCamelCase_							)							)
     return value




