





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


_snake_case  :    Any						    =  logging.get_logger(__name__)

_snake_case  :    Union[str, Any]						    =  {
    '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 				_UpperCAmelCase    (    _UpperCamelCase    ):

  """simple docstring"""


  a_        = """mobilenet_v1"""






  def __init__(				self :		Optional[Any]					,  lowerCAmelCase_ :		List[Any]=3					,  lowerCAmelCase_ :		Tuple=2_2_4					,  lowerCAmelCase_ :		List[Any]=1.0					,  lowerCAmelCase_ :		List[Any]=8					,  lowerCAmelCase_ :		int="relu6"					,  lowerCAmelCase_ :		Tuple=True					,  lowerCAmelCase_ :		Optional[Any]=0.9_99					,  lowerCAmelCase_ :		Dict=0.02					,  lowerCAmelCase_ :		Union[str, Any]=0.0_01					,  **lowerCAmelCase_ :		Tuple					,  )							->						str:
     super().__init__(**lowerCAmelCase_     )

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

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





class 				_UpperCAmelCase    (    _UpperCamelCase    ):

  """simple docstring"""


  a_        = version.parse("""1.11"""    )






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






  @property
  def 				lowercase		(				self :		List[Any]     )							->						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 				lowercase		(				self :		Dict     )							->						float:
     return 1e-4








# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_snake_case  :    Dict						    =  {'configuration_mra': ['MRA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MraConfig']}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     _snake_case  :    Optional[int]						    =  [
         'MRA_PRETRAINED_MODEL_ARCHIVE_LIST',
         'MraForMaskedLM',
         'MraForMultipleChoice',
         'MraForQuestionAnswering',
         'MraForSequenceClassification',
         'MraForTokenClassification',
         'MraLayer',
         'MraModel',
         'MraPreTrainedModel',
     ]


if TYPE_CHECKING:
     from .configuration_mra import MRA_PRETRAINED_CONFIG_ARCHIVE_MAP, MraConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_mra import (
              MRA_PRETRAINED_MODEL_ARCHIVE_LIST,
              MraForMaskedLM,
              MraForMultipleChoice,
              MraForQuestionAnswering,
              MraForSequenceClassification,
              MraForTokenClassification,
              MraLayer,
              MraModel,
              MraPreTrainedModel,
          )
else:
     import sys

     _snake_case  :    Tuple						    =  _LazyModule(__name__, globals()['__file__'], _import_structure)

