

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


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

SCREAMING_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 					a						(       _lowerCamelCase				):



    """simple docstring"""



    UpperCAmelCase						 =					"mobilenet_v1"

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






         """simple docstring"""


         super().__init__(**UpperCamelCase       )

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

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



class 					a						(       _lowerCamelCase				):



    """simple docstring"""



    UpperCAmelCase						 =					version.parse("1.11"				)

    @property
    def 				UpperCamelCase	(     self: Dict       ):






         """simple docstring"""


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

    @property
    def 				UpperCamelCase	(     self: Union[str, Any]       ):






         """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: List[str]       ):






         """simple docstring"""


         return 1e-4









"""simple docstring"""



# 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


SCREAMING_SNAKE_CASE_					:	List[str]							  =						{'configuration_mra': ['MRA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MraConfig']}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 SCREAMING_SNAKE_CASE_					:	List[Any]							  =						[
     '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

 SCREAMING_SNAKE_CASE_					:	List[str]							  =						_LazyModule(__name__, globals()['__file__'], _import_structure)






