





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  :   str						      =logging.get_logger(__name__)

__lowercase  :   Any						      ={
    """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      A       (	__lowercase						):
      _snake_case							     ='''mobilenet_v2'''



      def __init__(	self:						int		,  _lowerCAmelCase:						Optional[int]=3		,  _lowerCAmelCase:						Tuple=224		,  _lowerCAmelCase:						Any=1.0		,  _lowerCAmelCase:						Any=8		,  _lowerCAmelCase:						int=8		,  _lowerCAmelCase:						Dict=6		,  _lowerCAmelCase:						Tuple=32		,  _lowerCAmelCase:						List[Any]=True		,  _lowerCAmelCase:						Union[str, Any]=True		,  _lowerCAmelCase:						List[Any]="relu6"		,  _lowerCAmelCase:						Optional[int]=True		,  _lowerCAmelCase:						str=0.8		,  _lowerCAmelCase:						Tuple=0.02		,  _lowerCAmelCase:						Optional[int]=0.0_01		,  _lowerCAmelCase:						List[Any]=255		,  **_lowerCAmelCase:						List[Any]		,  )						->    Tuple:
         '''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_											=depth_divisible_by
         UpperCAmelCase_											=min_depth
         UpperCAmelCase_											=expand_ratio
         UpperCAmelCase_											=output_stride
         UpperCAmelCase_											=first_layer_is_expansion
         UpperCAmelCase_											=finegrained_output
         UpperCAmelCase_											=hidden_act
         UpperCAmelCase_											=tf_padding
         UpperCAmelCase_											=classifier_dropout_prob
         UpperCAmelCase_											=initializer_range
         UpperCAmelCase_											=layer_norm_eps
         UpperCAmelCase_											=semantic_loss_ignore_index

class      A       (	__lowercase						):
      _snake_case							     =version.parse('''1.11'''						)



      @property
      def 	lowerCAmelCase__    (	self:						int       )						->    Mapping[str, Mapping[int, str]]:
         '''simple docstring'''

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



      @property
      def 	lowerCAmelCase__    (	self:						Dict       )						->    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 	lowerCAmelCase__    (	self:						int       )						->    float:
         '''simple docstring'''

         return 1e-4











__lowercase  :   Dict						      ="""0.21.0"""

from .accelerator import Accelerator
from .big_modeling import (
    cpu_offload,
    cpu_offload_with_hook,
    disk_offload,
    dispatch_model,
    init_empty_weights,
    init_on_device,
    load_checkpoint_and_dispatch,
)
from .data_loader import skip_first_batches
from .launchers import debug_launcher, notebook_launcher
from .state import PartialState
from .utils import (
    DeepSpeedPlugin,
    DistributedDataParallelKwargs,
    DistributedType,
    FullyShardedDataParallelPlugin,
    GradScalerKwargs,
    InitProcessGroupKwargs,
    find_executable_batch_size,
    infer_auto_device_map,
    is_rich_available,
    load_checkpoint_in_model,
    synchronize_rng_states,
)


if is_rich_available():
     from .utils import rich




