





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


lowercase							       =			logging.get_logger(__name__)

lowercase							       =			{
    '''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	(		__snake_case):


 '''simple docstring'''




 __magic_name__					: Tuple  =      "mobilenet_v2"




 def __init__(   self							,  lowerCAmelCase_=3							,  lowerCAmelCase_=2_2_4							,  lowerCAmelCase_=1.0							,  lowerCAmelCase_=8							,  lowerCAmelCase_=8							,  lowerCAmelCase_=6							,  lowerCAmelCase_=3_2							,  lowerCAmelCase_=True							,  lowerCAmelCase_=True							,  lowerCAmelCase_="relu6"							,  lowerCAmelCase_=True							,  lowerCAmelCase_=0.8							,  lowerCAmelCase_=0.0_2							,  lowerCAmelCase_=0.0_0_1							,  lowerCAmelCase_=2_5_5							,  **lowerCAmelCase_							,  ) ->      Any:



      """simple docstring"""







      super().__init__(**_lowercase)

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

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







class 	UpperCAmelCase	(		__snake_case):


 '''simple docstring'''




 __magic_name__					: Union[str, Any]  =      version.parse("1.11")




 @property
 def       lowercase_  (   self) ->      Optional[int]:



      """simple docstring"""







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




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



      """simple docstring"""







      return 1e-4







'''simple docstring'''


from typing import TYPE_CHECKING

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


lowercase							       =			{
    '''configuration_rag''': ['''RagConfig'''],
    '''retrieval_rag''': ['''RagRetriever'''],
    '''tokenization_rag''': ['''RagTokenizer'''],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			[
      '''RagModel''',
      '''RagPreTrainedModel''',
      '''RagSequenceForGeneration''',
      '''RagTokenForGeneration''',
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase							       =			[
      '''TFRagModel''',
      '''TFRagPreTrainedModel''',
      '''TFRagSequenceForGeneration''',
      '''TFRagTokenForGeneration''',
  ]


if TYPE_CHECKING:
  from .configuration_rag import RagConfig
  from .retrieval_rag import RagRetriever
  from .tokenization_rag import RagTokenizer

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_rag import RagModel, RagPreTrainedModel, RagSequenceForGeneration, RagTokenForGeneration

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_rag import (
        TFRagModel,
        TFRagPreTrainedModel,
        TFRagSequenceForGeneration,
        TFRagTokenForGeneration,
    )

else:
  import sys

  lowercase							       =			_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


