





import functools
import operator

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


_snake_case    :       Dict		       =    logging.get_logger(__name__)

_snake_case    :       Union[str, Any]		       =    {
    'facebook/wav2vec2-base-960h': 'https://huggingface.co/facebook/wav2vec2-base-960h/resolve/main/config.json',
    # See all Wav2Vec2 models at https://huggingface.co/models?filter=wav2vec2
}



class 							_UpperCAmelCase       (       _UpperCamelCase       ):

  """simple docstring"""


  a_              =					'wav2vec2'






  def __init__(							self					:						Dict   ,    lowerCAmelCase_					:						Optional[Any]=3_2   ,    lowerCAmelCase_					:						Dict=7_6_8   ,    lowerCAmelCase_					:						Optional[int]=1_2   ,    lowerCAmelCase_					:						Dict=1_2   ,    lowerCAmelCase_					:						Optional[Any]=3_0_7_2   ,    lowerCAmelCase_					:						List[str]="gelu"   ,    lowerCAmelCase_					:						Optional[Any]=0.1   ,    lowerCAmelCase_					:						Dict=0.1   ,    lowerCAmelCase_					:						Union[str, Any]=0.1   ,    lowerCAmelCase_					:						Any=0.0   ,    lowerCAmelCase_					:						str=0.0   ,    lowerCAmelCase_					:						Dict=0.1   ,    lowerCAmelCase_					:						Dict=0.1   ,    lowerCAmelCase_					:						Any=0.02   ,    lowerCAmelCase_					:						int=1e-5   ,    lowerCAmelCase_					:						Dict="group"   ,    lowerCAmelCase_					:						Optional[int]="gelu"   ,    lowerCAmelCase_					:						Tuple=(5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2)   ,    lowerCAmelCase_					:						List[str]=(5, 2, 2, 2, 2, 2, 2)   ,    lowerCAmelCase_					:						Tuple=(1_0, 3, 3, 3, 3, 2, 2)   ,    lowerCAmelCase_					:						Optional[int]=False   ,    lowerCAmelCase_					:						Optional[Any]=1_2_8   ,    lowerCAmelCase_					:						Any=1_6   ,    lowerCAmelCase_					:						int=False   ,    lowerCAmelCase_					:						str=True   ,    lowerCAmelCase_					:						Any=0.05   ,    lowerCAmelCase_					:						Optional[Any]=1_0   ,    lowerCAmelCase_					:						str=2   ,    lowerCAmelCase_					:						Optional[int]=0.0   ,    lowerCAmelCase_					:						List[str]=1_0   ,    lowerCAmelCase_					:						Dict=0   ,    lowerCAmelCase_					:						List[str]=3_2_0   ,    lowerCAmelCase_					:						List[str]=2   ,    lowerCAmelCase_					:						Dict=0.1   ,    lowerCAmelCase_					:						int=1_0_0   ,    lowerCAmelCase_					:						Tuple=2_5_6   ,    lowerCAmelCase_					:						int=2_5_6   ,    lowerCAmelCase_					:						Optional[Any]=0.1   ,    lowerCAmelCase_					:						str="sum"   ,    lowerCAmelCase_					:						Dict=False   ,    lowerCAmelCase_					:						int=False   ,    lowerCAmelCase_					:						Dict=2_5_6   ,    lowerCAmelCase_					:						Union[str, Any]=(5_1_2, 5_1_2, 5_1_2, 5_1_2, 1_5_0_0)   ,    lowerCAmelCase_					:						Tuple=(5, 3, 3, 1, 1)   ,    lowerCAmelCase_					:						Any=(1, 2, 3, 1, 1)   ,    lowerCAmelCase_					:						List[str]=5_1_2   ,    lowerCAmelCase_					:						str=0   ,    lowerCAmelCase_					:						str=1   ,    lowerCAmelCase_					:						str=2   ,    lowerCAmelCase_					:						Union[str, Any]=False   ,    lowerCAmelCase_					:						List[str]=3   ,    lowerCAmelCase_					:						List[str]=2   ,    lowerCAmelCase_					:						List[str]=3   ,    lowerCAmelCase_					:						List[str]=None   ,    lowerCAmelCase_					:						Union[str, Any]=None   ,    **lowerCAmelCase_					:						int   ,    )				->		int:
     super().__init__(**lowerCAmelCase_   ,    pad_token_id=lowerCAmelCase_   ,    bos_token_id=lowerCAmelCase_   ,    eos_token_id=lowerCAmelCase_	)
     __lowerCAmelCase				      =      hidden_size
     __lowerCAmelCase				      =      feat_extract_norm
     __lowerCAmelCase				      =      feat_extract_activation
     __lowerCAmelCase				      =      list(lowerCAmelCase_	)
     __lowerCAmelCase				      =      list(lowerCAmelCase_	)
     __lowerCAmelCase				      =      list(lowerCAmelCase_	)
     __lowerCAmelCase				      =      conv_bias
     __lowerCAmelCase				      =      num_conv_pos_embeddings
     __lowerCAmelCase				      =      num_conv_pos_embedding_groups
     __lowerCAmelCase				      =      len(self.conv_dim	)
     __lowerCAmelCase				      =      num_hidden_layers
     __lowerCAmelCase				      =      intermediate_size
     __lowerCAmelCase				      =      hidden_act
     __lowerCAmelCase				      =      num_attention_heads
     __lowerCAmelCase				      =      hidden_dropout
     __lowerCAmelCase				      =      attention_dropout
     __lowerCAmelCase				      =      activation_dropout
     __lowerCAmelCase				      =      feat_proj_dropout
     __lowerCAmelCase				      =      final_dropout
     __lowerCAmelCase				      =      layerdrop
     __lowerCAmelCase				      =      layer_norm_eps
     __lowerCAmelCase				      =      initializer_range
     __lowerCAmelCase				      =      vocab_size
     __lowerCAmelCase				      =      do_stable_layer_norm
     __lowerCAmelCase				      =      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
     __lowerCAmelCase				      =      apply_spec_augment
     __lowerCAmelCase				      =      mask_time_prob
     __lowerCAmelCase				      =      mask_time_length
     __lowerCAmelCase				      =      mask_time_min_masks
     __lowerCAmelCase				      =      mask_feature_prob
     __lowerCAmelCase				      =      mask_feature_length
     __lowerCAmelCase				      =      mask_feature_min_masks

     # parameters for pretraining with codevector quantized representations
     __lowerCAmelCase				      =      num_codevectors_per_group
     __lowerCAmelCase				      =      num_codevector_groups
     __lowerCAmelCase				      =      contrastive_logits_temperature
     __lowerCAmelCase				      =      feat_quantizer_dropout
     __lowerCAmelCase				      =      num_negatives
     __lowerCAmelCase				      =      codevector_dim
     __lowerCAmelCase				      =      proj_codevector_dim
     __lowerCAmelCase				      =      diversity_loss_weight

     # ctc loss
     __lowerCAmelCase				      =      ctc_loss_reduction
     __lowerCAmelCase				      =      ctc_zero_infinity

     # adapter
     __lowerCAmelCase				      =      add_adapter
     __lowerCAmelCase				      =      adapter_kernel_size
     __lowerCAmelCase				      =      adapter_stride
     __lowerCAmelCase				      =      num_adapter_layers
     __lowerCAmelCase				      =      output_hidden_size or hidden_size
     __lowerCAmelCase				      =      adapter_attn_dim

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

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






  @property
  def 							lowercase						(							self					:						List[str]	)				->		Optional[Any]:
     return functools.reduce(operator.mul   ,    self.conv_stride   ,    1	)






'''simple docstring'''





def lowerCAmelCase    (__A    ,      __A):



     """simple docstring"""



     if digit_amount > 0:
          return round(number - int(__A)    ,      __A)
     return number - int(__A)


if __name__ == "__main__":
  print(decimal_isolate(1.53, 0))
  print(decimal_isolate(35.345, 1))
  print(decimal_isolate(35.345, 2))
  print(decimal_isolate(35.345, 3))
  print(decimal_isolate(-14.789, 3))
  print(decimal_isolate(0, 2))
  print(decimal_isolate(-14.123, 1))
  print(decimal_isolate(-14.123, 2))
  print(decimal_isolate(-14.123, 3))



