from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


lowercase__     :							int            =      {
    '''configuration_deberta''': ['''DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''DebertaConfig''', '''DebertaOnnxConfig'''],
    '''tokenization_deberta''': ['''DebertaTokenizer'''],
}

try:
	if not is_tokenizers_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowercase__     :							Union[str, Any]            =      ['''DebertaTokenizerFast''']

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowercase__     :							str            =      [
	    '''DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST''',
	    '''DebertaForMaskedLM''',
	    '''DebertaForQuestionAnswering''',
	    '''DebertaForSequenceClassification''',
	    '''DebertaForTokenClassification''',
	    '''DebertaModel''',
	    '''DebertaPreTrainedModel''',
	]

try:
	if not is_tf_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowercase__     :							Dict            =      [
	    '''TF_DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST''',
	    '''TFDebertaForMaskedLM''',
	    '''TFDebertaForQuestionAnswering''',
	    '''TFDebertaForSequenceClassification''',
	    '''TFDebertaForTokenClassification''',
	    '''TFDebertaModel''',
	    '''TFDebertaPreTrainedModel''',
	]


if TYPE_CHECKING:
	from .configuration_deberta import DEBERTA_PRETRAINED_CONFIG_ARCHIVE_MAP, DebertaConfig, DebertaOnnxConfig
	from .tokenization_deberta import DebertaTokenizer

	try:
		if not is_tokenizers_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .tokenization_deberta_fast import DebertaTokenizerFast

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_deberta import (
		    DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
		    DebertaForMaskedLM,
		    DebertaForQuestionAnswering,
		    DebertaForSequenceClassification,
		    DebertaForTokenClassification,
		    DebertaModel,
		    DebertaPreTrainedModel,
		)

	try:
		if not is_tf_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_tf_deberta import (
		    TF_DEBERTA_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TFDebertaForMaskedLM,
		    TFDebertaForQuestionAnswering,
		    TFDebertaForSequenceClassification,
		    TFDebertaForTokenClassification,
		    TFDebertaModel,
		    TFDebertaPreTrainedModel,
		)


else:
	import sys

	lowercase__     :							Any            =      _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)







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


__a	 =      logging.get_logger(__name__)

__a	 =      {
    """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 	__lowercase					(	__snake_case	):
      UpperCamelCase										=							'''mobilenet_v1'''





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






         """simple docstring"""







         super().__init__(**__lowerCamelCase							)

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

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






class 	__lowercase					(	__snake_case	):
      UpperCamelCase										=							version.parse('''1.11'''	)





      @property
      def 							_lowercase					(		self    :       Optional[int]							)     -> Mapping[str, Mapping[int, str]]:






         """simple docstring"""







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





      @property
      def 							_lowercase					(		self    :       Union[str, Any]							)     -> 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 							_lowercase					(		self    :       List[Any]							)     -> float:






         """simple docstring"""







         return 1e-4



