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


__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     UpperCAmelCase						(_UpperCAmelCase  ):



    """simple docstring"""

    _UpperCAmelCase	:Any						    = "mobilenet_v1"






    def __init__(   self    ,			_UpperCAmelCase=3    ,			_UpperCAmelCase=224    ,			_UpperCAmelCase=1.0    ,			_UpperCAmelCase=8    ,			_UpperCAmelCase="relu6"    ,			_UpperCAmelCase=True    ,			_UpperCAmelCase=0.999    ,			_UpperCAmelCase=0.02    ,			_UpperCAmelCase=0.001    ,			**_UpperCAmelCase    ,			):
       super().__init__(**_UpperCAmelCase							)

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

       lowercase__:   Any					=      num_channels
       lowercase__:   Union[str, Any]					=      image_size
       lowercase__:   int					=      depth_multiplier
       lowercase__:   Any					=      min_depth
       lowercase__:   Optional[Any]					=      hidden_act
       lowercase__:   Union[str, Any]					=      tf_padding
       lowercase__:   Optional[int]					=      classifier_dropout_prob
       lowercase__:   Optional[int]					=      initializer_range
       lowercase__:   List[Any]					=      layer_norm_eps



class     UpperCAmelCase						(_UpperCAmelCase  ):



    """simple docstring"""

    _UpperCAmelCase	:List[str]						    = version.parse("1.11"  )






    @property
    def _snake_case			(   self							):
       return OrderedDict([('''pixel_values''', {0: '''batch'''})]							)






    @property
    def _snake_case			(   self							):
       if self.task == "image-classification":
          return OrderedDict([('''logits''', {0: '''batch'''})]							)
       else:
          return OrderedDict([('''last_hidden_state''', {0: '''batch'''}), ('''pooler_output''', {0: '''batch'''})]							)






    @property
    def _snake_case			(   self							):
       return 1e-4




'''simple docstring'''

a_  :				Any						= """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



