
import math

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


__lowerCAmelCase     :	List[Any]       			=  logging.get_logger(__name__)

__lowerCAmelCase     :	str       			=  {
    '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 			UpperCAmelCase_     (					_A	):


  '''simple docstring'''







  a__       			=						"""data2vec-audio"""
  def __init__(					self     :					Dict     ,				UpperCamelCase__     :					Tuple=32     ,				UpperCamelCase__     :					str=768     ,				UpperCamelCase__     :					Dict=12     ,				UpperCamelCase__     :					Optional[Any]=12     ,				UpperCamelCase__     :					str=3072     ,				UpperCamelCase__     :					Tuple="gelu"     ,				UpperCamelCase__     :					Optional[Any]=0.1     ,				UpperCamelCase__     :					Tuple=0.1     ,				UpperCamelCase__     :					List[str]=0.1     ,				UpperCamelCase__     :					str=0.0     ,				UpperCamelCase__     :					Union[str, Any]=0.1     ,				UpperCamelCase__     :					int=0.1     ,				UpperCamelCase__     :					Optional[Any]=0.02     ,				UpperCamelCase__     :					List[Any]=1E-5     ,				UpperCamelCase__     :					List[str]="gelu"     ,				UpperCamelCase__     :					str=(512, 512, 512, 512, 512, 512, 512)     ,				UpperCamelCase__     :					Any=(5, 2, 2, 2, 2, 2, 2)     ,				UpperCamelCase__     :					List[Any]=(10, 3, 3, 3, 3, 2, 2)     ,				UpperCamelCase__     :					Dict=False     ,				UpperCamelCase__     :					List[str]=16     ,				UpperCamelCase__     :					List[str]=19     ,				UpperCamelCase__     :					Dict=5     ,				UpperCamelCase__     :					Optional[int]=0.05     ,				UpperCamelCase__     :					Union[str, Any]=10     ,				UpperCamelCase__     :					Any=2     ,				UpperCamelCase__     :					Dict=0.0     ,				UpperCamelCase__     :					List[Any]=10     ,				UpperCamelCase__     :					int=0     ,				UpperCamelCase__     :					Dict="sum"     ,				UpperCamelCase__     :					str=False     ,				UpperCamelCase__     :					Tuple=False     ,				UpperCamelCase__     :					Union[str, Any]=256     ,				UpperCamelCase__     :					int=(512, 512, 512, 512, 1500)     ,				UpperCamelCase__     :					List[Any]=(5, 3, 3, 1, 1)     ,				UpperCamelCase__     :					List[str]=(1, 2, 3, 1, 1)     ,				UpperCamelCase__     :					Any=512     ,				UpperCamelCase__     :					Tuple=0     ,				UpperCamelCase__     :					List[Any]=1     ,				UpperCamelCase__     :					Optional[Any]=2     ,				UpperCamelCase__     :					Union[str, Any]=False     ,				UpperCamelCase__     :					int=3     ,				UpperCamelCase__     :					Any=2     ,				UpperCamelCase__     :					Optional[Any]=3     ,				UpperCamelCase__     :					Dict=None     ,				**UpperCamelCase__     :					Tuple     ,				)     ->      Union[str, Any]:







    """simple docstring"""






    super().__init__(**UpperCamelCase__     ,				pad_token_id=UpperCamelCase__     ,				bos_token_id=UpperCamelCase__     ,				eos_token_id=UpperCamelCase__       )
    __magic_name__								=			hidden_size
    __magic_name__								=			feat_extract_activation
    __magic_name__								=			list(UpperCamelCase__       )
    __magic_name__								=			list(UpperCamelCase__       )
    __magic_name__								=			list(UpperCamelCase__       )
    __magic_name__								=			conv_bias
    __magic_name__								=			num_conv_pos_embeddings
    __magic_name__								=			num_conv_pos_embedding_groups
    __magic_name__								=			conv_pos_kernel_size
    __magic_name__								=			len(self.conv_dim       )
    __magic_name__								=			num_hidden_layers
    __magic_name__								=			intermediate_size
    __magic_name__								=			hidden_act
    __magic_name__								=			num_attention_heads
    __magic_name__								=			hidden_dropout
    __magic_name__								=			attention_dropout
    __magic_name__								=			activation_dropout
    __magic_name__								=			feat_proj_dropout
    __magic_name__								=			final_dropout
    __magic_name__								=			layerdrop
    __magic_name__								=			layer_norm_eps
    __magic_name__								=			initializer_range
    __magic_name__								=			vocab_size
    __magic_name__								=			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
    __magic_name__								=			mask_time_prob
    __magic_name__								=			mask_time_length
    __magic_name__								=			mask_time_min_masks
    __magic_name__								=			mask_feature_prob
    __magic_name__								=			mask_feature_length
    __magic_name__								=			mask_feature_min_masks

    # ctc loss
    __magic_name__								=			ctc_loss_reduction
    __magic_name__								=			ctc_zero_infinity

    # adapter
    __magic_name__								=			add_adapter
    __magic_name__								=			adapter_kernel_size
    __magic_name__								=			adapter_stride
    __magic_name__								=			num_adapter_layers
    __magic_name__								=			output_hidden_size or hidden_size

    # SequenceClassification-specific parameter. Feel free to ignore for other classes.
    __magic_name__								=			classifier_proj_size

    # XVector-specific parameters. Feel free to ignore for other classes.
    __magic_name__								=			list(UpperCamelCase__       )
    __magic_name__								=			list(UpperCamelCase__       )
    __magic_name__								=			list(UpperCamelCase__       )
    __magic_name__								=			xvector_output_dim





  @property
  def 				_lowercase				(					self     :					Dict       )     ->      List[str]:







    """simple docstring"""






    return math.prod(self.conv_stride       )



from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowerCAmelCase     :	Union[str, Any]       			=  {
    'configuration_informer': [
        'INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'InformerConfig',
    ],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowerCAmelCase     :	Optional[Any]       			=  [
        'INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
        'InformerForPrediction',
        'InformerModel',
        'InformerPreTrainedModel',
    ]


if TYPE_CHECKING:
    from .configuration_informer import INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, InformerConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_informer import (
            INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
            InformerForPrediction,
            InformerModel,
            InformerPreTrainedModel,
        )

else:
    import sys

    __lowerCAmelCase     :	List[str]       			=  _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)

