





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


_UpperCamelCase				=       logging.get_logger(__name__)

_UpperCamelCase				=       {
    "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  _lowerCamelCase       (			lowercase__			):



      """simple docstring"""






      UpperCAmelCase_  :					Optional[Any]      			="mobilenet_v2"







      def __init__(       self ,  UpperCAmelCase=3 ,  UpperCAmelCase=224 ,  UpperCAmelCase=1.0 ,  UpperCAmelCase=8 ,  UpperCAmelCase=8 ,  UpperCAmelCase=6 ,  UpperCAmelCase=32 ,  UpperCAmelCase=True ,  UpperCAmelCase=True ,  UpperCAmelCase="relu6" ,  UpperCAmelCase=True ,  UpperCAmelCase=0.8 ,  UpperCAmelCase=0.02 ,  UpperCAmelCase=0.001 ,  UpperCAmelCase=255 ,  **UpperCAmelCase ,  )				->      int:






        '''simple docstring'''






        super().__init__(**__lowerCamelCase      )

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

        __snake_case      : List[Any]						=				num_channels
        __snake_case      : List[Any]						=				image_size
        __snake_case      : Optional[Any]						=				depth_multiplier
        __snake_case      : Union[str, Any]						=				depth_divisible_by
        __snake_case      : List[Any]						=				min_depth
        __snake_case      : str						=				expand_ratio
        __snake_case      : List[Any]						=				output_stride
        __snake_case      : Union[str, Any]						=				first_layer_is_expansion
        __snake_case      : Dict						=				finegrained_output
        __snake_case      : List[str]						=				hidden_act
        __snake_case      : List[str]						=				tf_padding
        __snake_case      : List[Any]						=				classifier_dropout_prob
        __snake_case      : str						=				initializer_range
        __snake_case      : Optional[int]						=				layer_norm_eps
        __snake_case      : Any						=				semantic_loss_ignore_index




class  _lowerCamelCase       (			lowercase__			):



      """simple docstring"""






      UpperCAmelCase_  :					str      			=version.parse("1.11"			)







      @property
      def   UpperCAmelCase						(       self      )				->      Dict:






        '''simple docstring'''






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







      @property
      def   UpperCAmelCase						(       self      )				->      Dict:






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





import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Audio, Features, Value
from .base import TaskTemplate







@dataclass(frozen=lowercase__)
class 			_lowercase (							lowercase__):


       """simple docstring"""




       A__											=			field(default="automatic-speech-recognition"							,  metadata={"include_in_asdict_even_if_is_default": True})
       A__											=			Features({"audio": Audio()})
       A__											=			Features({"transcription": Value("string")})
       A__											=			"audio"
       A__											=			"transcription"





       def 						lowerCAmelCase     (   self							:			Any					,      __lowerCamelCase							:			int       ):


             '''simple docstring'''



             if self.audio_column not in features:
                   raise ValueError(f"Column {self.audio_column} is not present in features."       )
             if not isinstance(features[self.audio_column]					,      __lowerCamelCase       ):
                   raise ValueError(f"Column {self.audio_column} is not an Audio type."       )
             lowerCamelCase__		:				Tuple    =  copy.deepcopy(self       )
             lowerCamelCase__		:				Tuple    =  self.input_schema.copy()
             lowerCamelCase__		:				Optional[int]    =  features[self.audio_column]
             lowerCamelCase__		:				int    =  input_schema
             return task_template





       @property
       def 						lowerCAmelCase     (   self							:			int       ):


             '''simple docstring'''



             return {self.audio_column: "audio", self.transcription_column: "transcription"}


