
import math

from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase  : Any						   =							logging.get_logger(__name__)

lowercase  : Optional[int]						   =							{
    """facebook/data2vec-base-960h""": """https://huggingface.co/facebook/data2vec-audio-base-960h/resolve/main/config.json""",
    # See all Data2VecAudio models at https://huggingface.co/models?filter=data2vec-audio
}

class __snake_case		(				lowerCAmelCase					):
    _a		:						str=    "data2vec-audio"
    def __init__(  self		,snake_case=32		,snake_case=768		,snake_case=12		,snake_case=12		,snake_case=3072		,snake_case="gelu"		,snake_case=0.1		,snake_case=0.1		,snake_case=0.1		,snake_case=0.0		,snake_case=0.1		,snake_case=0.1		,snake_case=0.02		,snake_case=1e-5		,snake_case="gelu"		,snake_case=(512, 512, 512, 512, 512, 512, 512)		,snake_case=(5, 2, 2, 2, 2, 2, 2)		,snake_case=(10, 3, 3, 3, 3, 2, 2)		,snake_case=False		,snake_case=16		,snake_case=19		,snake_case=5		,snake_case=0.05		,snake_case=10		,snake_case=2		,snake_case=0.0		,snake_case=10		,snake_case=0		,snake_case="sum"		,snake_case=False		,snake_case=False		,snake_case=256		,snake_case=(512, 512, 512, 512, 1500)		,snake_case=(5, 3, 3, 1, 1)		,snake_case=(1, 2, 3, 1, 1)		,snake_case=512		,snake_case=0		,snake_case=1		,snake_case=2		,snake_case=False		,snake_case=3		,snake_case=2		,snake_case=3		,snake_case=None		,**snake_case		,):



           '''simple docstring'''







           super().__init__(**snake_case		,pad_token_id=snake_case		,bos_token_id=snake_case		,eos_token_id=snake_case				)
           lowercase							:					List[Any]	     =				hidden_size
           lowercase							:					Dict	     =				feat_extract_activation
           lowercase							:					List[str]	     =				list(snake_case				)
           lowercase							:					List[str]	     =				list(snake_case				)
           lowercase							:					int	     =				list(snake_case				)
           lowercase							:					Optional[Any]	     =				conv_bias
           lowercase							:					str	     =				num_conv_pos_embeddings
           lowercase							:					List[Any]	     =				num_conv_pos_embedding_groups
           lowercase							:					Optional[int]	     =				conv_pos_kernel_size
           lowercase							:					Optional[int]	     =				len(self.conv_dim				)
           lowercase							:					str	     =				num_hidden_layers
           lowercase							:					List[str]	     =				intermediate_size
           lowercase							:					Optional[Any]	     =				hidden_act
           lowercase							:					Optional[int]	     =				num_attention_heads
           lowercase							:					List[Any]	     =				hidden_dropout
           lowercase							:					str	     =				attention_dropout
           lowercase							:					Tuple	     =				activation_dropout
           lowercase							:					Optional[int]	     =				feat_proj_dropout
           lowercase							:					Union[str, Any]	     =				final_dropout
           lowercase							:					List[Any]	     =				layerdrop
           lowercase							:					Union[str, Any]	     =				layer_norm_eps
           lowercase							:					int	     =				initializer_range
           lowercase							:					Dict	     =				vocab_size
           lowercase							:					Tuple	     =				use_weighted_layer_sum

           if (
               (len(self.conv_stride				) != self.num_feat_extract_layers)
               or (len(self.conv_kernel				) != self.num_feat_extract_layers)
               or (len(self.conv_dim				) != self.num_feat_extract_layers)
           ):
                  raise ValueError(
                      """Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =="""
                      """ `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ="""
                      f" {len(self.conv_dim				)}`, `len(config.conv_stride) = {len(self.conv_stride				)}`,"
                      f" `len(config.conv_kernel) = {len(self.conv_kernel				)}`."				)

           # fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
           lowercase							:					Dict	     =				mask_time_prob
           lowercase							:					List[str]	     =				mask_time_length
           lowercase							:					List[str]	     =				mask_time_min_masks
           lowercase							:					Optional[int]	     =				mask_feature_prob
           lowercase							:					str	     =				mask_feature_length
           lowercase							:					Dict	     =				mask_feature_min_masks

           # ctc loss
           lowercase							:					Union[str, Any]	     =				ctc_loss_reduction
           lowercase							:					Optional[Any]	     =				ctc_zero_infinity

           # adapter
           lowercase							:					Dict	     =				add_adapter
           lowercase							:					Optional[int]	     =				adapter_kernel_size
           lowercase							:					int	     =				adapter_stride
           lowercase							:					int	     =				num_adapter_layers
           lowercase							:					Any	     =				output_hidden_size or hidden_size

           # SequenceClassification-specific parameter. Feel free to ignore for other classes.
           lowercase							:					Any	     =				classifier_proj_size

           # XVector-specific parameters. Feel free to ignore for other classes.
           lowercase							:					List[Any]	     =				list(snake_case				)
           lowercase							:					Dict	     =				list(snake_case				)
           lowercase							:					List[Any]	     =				list(snake_case				)
           lowercase							:					List[str]	     =				xvector_output_dim
    @property
    def 				_SCREAMING_SNAKE_CASE	(  self				):



           '''simple docstring'''







           return math.prod(self.conv_stride				)


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  : List[Any]						   =							logging.get_logger(__name__)

lowercase  : List[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 __snake_case		(				lowerCAmelCase					):
    _a		:						Dict=    "mobilenet_v1"
    def __init__(  self		,snake_case=3		,snake_case=224		,snake_case=1.0		,snake_case=8		,snake_case="relu6"		,snake_case=True		,snake_case=0.999		,snake_case=0.02		,snake_case=0.001		,**snake_case		,):



           '''simple docstring'''







           super().__init__(**snake_case				)

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

           lowercase							:					int	     =				num_channels
           lowercase							:					Union[str, Any]	     =				image_size
           lowercase							:					int	     =				depth_multiplier
           lowercase							:					Tuple	     =				min_depth
           lowercase							:					Dict	     =				hidden_act
           lowercase							:					Dict	     =				tf_padding
           lowercase							:					Dict	     =				classifier_dropout_prob
           lowercase							:					int	     =				initializer_range
           lowercase							:					List[str]	     =				layer_norm_eps






class __snake_case		(				lowerCAmelCase					):
    _a		:						int=    version.parse("1.11"					)
    @property
    def 				_SCREAMING_SNAKE_CASE	(  self				):



           '''simple docstring'''







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



           '''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 				_SCREAMING_SNAKE_CASE	(  self				):



           '''simple docstring'''







           return 1e-4
