
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 							UpperCamelCase__						(     __SCREAMING_SNAKE_CASE     ):






       """simple docstring"""


       UpperCAmelCase_							    ="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      ,			)							->							Union[str, Any]:
          super().__init__(**_SCREAMING_SNAKE_CASE     )

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

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







class 							UpperCamelCase__						(     __SCREAMING_SNAKE_CASE     ):






       """simple docstring"""


       UpperCAmelCase_							    =version.parse("1.11"     )



       @property
       def   _UpperCamelCase     (				self     )							->							Mapping[str, Mapping[int, str]]:
          return OrderedDict([('''pixel_values''', {0: '''batch'''})]     )



       @property
       def   _UpperCamelCase     (				self     )							->							Mapping[str, Mapping[int, 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   _UpperCamelCase     (				self     )							->							float:
          return 1E-4






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


UpperCamelCase								=	{
    """configuration_nezha""": ["""NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP""", """NezhaConfig"""],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase								=	[
         """NEZHA_PRETRAINED_MODEL_ARCHIVE_LIST""",
         """NezhaForNextSentencePrediction""",
         """NezhaForMaskedLM""",
         """NezhaForPreTraining""",
         """NezhaForMultipleChoice""",
         """NezhaForQuestionAnswering""",
         """NezhaForSequenceClassification""",
         """NezhaForTokenClassification""",
         """NezhaModel""",
         """NezhaPreTrainedModel""",
     ]


if TYPE_CHECKING:
     from .configuration_nezha import NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP, NezhaConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_nezha import (
              NEZHA_PRETRAINED_MODEL_ARCHIVE_LIST,
              NezhaForMaskedLM,
              NezhaForMultipleChoice,
              NezhaForNextSentencePrediction,
              NezhaForPreTraining,
              NezhaForQuestionAnswering,
              NezhaForSequenceClassification,
              NezhaForTokenClassification,
              NezhaModel,
              NezhaPreTrainedModel,
          )


else:
     import sys

     UpperCamelCase								=	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




