
import functools
import operator

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


a__							:	Dict  						=			logging.get_logger(__name__)

a__							:	Dict  						=			{
    '''microsoft/wavlm-base''': '''https://huggingface.co/microsoft/wavlm-base/resolve/main/config.json''',
    # See all WavLM models at https://huggingface.co/models?filter=wavlm
}






class   a_    (       a__				):



       """simple docstring"""
       __SCREAMING_SNAKE_CASE    : List[str]		=   'wavlm'






       def __init__(						self							,    _lowerCamelCase=32							,    _lowerCamelCase=768							,    _lowerCamelCase=12							,    _lowerCamelCase=12							,    _lowerCamelCase=3072							,    _lowerCamelCase="gelu"							,    _lowerCamelCase=0.1							,    _lowerCamelCase=0.1							,    _lowerCamelCase=0.1							,    _lowerCamelCase=0.0							,    _lowerCamelCase=0.1							,    _lowerCamelCase=0.1							,    _lowerCamelCase=0.0_2							,    _lowerCamelCase=1e-5							,    _lowerCamelCase="group"							,    _lowerCamelCase="gelu"							,    _lowerCamelCase=(512, 512, 512, 512, 512, 512, 512)							,    _lowerCamelCase=(5, 2, 2, 2, 2, 2, 2)							,    _lowerCamelCase=(10, 3, 3, 3, 3, 2, 2)							,    _lowerCamelCase=False							,    _lowerCamelCase=128							,    _lowerCamelCase=16							,    _lowerCamelCase=320							,    _lowerCamelCase=800							,    _lowerCamelCase=False							,    _lowerCamelCase=True							,    _lowerCamelCase=0.0_5							,    _lowerCamelCase=10							,    _lowerCamelCase=2							,    _lowerCamelCase=0.0							,    _lowerCamelCase=10							,    _lowerCamelCase=320							,    _lowerCamelCase=2							,    _lowerCamelCase=0.1							,    _lowerCamelCase=100							,    _lowerCamelCase=256							,    _lowerCamelCase=256							,    _lowerCamelCase=0.1							,    _lowerCamelCase="mean"							,    _lowerCamelCase=False							,    _lowerCamelCase=False							,    _lowerCamelCase=256							,    _lowerCamelCase=(512, 512, 512, 512, 1500)							,    _lowerCamelCase=(5, 3, 3, 1, 1)							,    _lowerCamelCase=(1, 2, 3, 1, 1)							,    _lowerCamelCase=512							,    _lowerCamelCase=80							,    _lowerCamelCase=0							,    _lowerCamelCase=1							,    _lowerCamelCase=2							,    _lowerCamelCase=False							,    _lowerCamelCase=3							,    _lowerCamelCase=2							,    _lowerCamelCase=3							,    _lowerCamelCase=None							,    **_lowerCamelCase							,    ) ->Optional[Any]:
           super().__init__(**_lowerCamelCase							,    pad_token_id=_lowerCamelCase							,    bos_token_id=_lowerCamelCase							,    eos_token_id=_lowerCamelCase					)
           SCREAMING_SNAKE_CASE							:							List[str]								=      hidden_size
           SCREAMING_SNAKE_CASE							:							Any								=      feat_extract_norm
           SCREAMING_SNAKE_CASE							:							Dict								=      feat_extract_activation
           SCREAMING_SNAKE_CASE							:							Union[str, Any]								=      list(_lowerCamelCase					)
           SCREAMING_SNAKE_CASE							:							List[Any]								=      list(_lowerCamelCase					)
           SCREAMING_SNAKE_CASE							:							Optional[int]								=      list(_lowerCamelCase					)
           SCREAMING_SNAKE_CASE							:							Any								=      conv_bias
           SCREAMING_SNAKE_CASE							:							Optional[int]								=      num_buckets
           SCREAMING_SNAKE_CASE							:							List[str]								=      max_bucket_distance
           SCREAMING_SNAKE_CASE							:							Dict								=      num_conv_pos_embeddings
           SCREAMING_SNAKE_CASE							:							Dict								=      num_conv_pos_embedding_groups
           SCREAMING_SNAKE_CASE							:							Optional[int]								=      len(self.conv_dim					)
           SCREAMING_SNAKE_CASE							:							Union[str, Any]								=      num_hidden_layers
           SCREAMING_SNAKE_CASE							:							Optional[Any]								=      intermediate_size
           SCREAMING_SNAKE_CASE							:							List[Any]								=      hidden_act
           SCREAMING_SNAKE_CASE							:							Dict								=      num_attention_heads
           SCREAMING_SNAKE_CASE							:							int								=      hidden_dropout
           SCREAMING_SNAKE_CASE							:							Dict								=      attention_dropout
           SCREAMING_SNAKE_CASE							:							Tuple								=      activation_dropout
           SCREAMING_SNAKE_CASE							:							Optional[Any]								=      feat_proj_dropout
           SCREAMING_SNAKE_CASE							:							Any								=      final_dropout
           SCREAMING_SNAKE_CASE							:							List[Any]								=      layerdrop
           SCREAMING_SNAKE_CASE							:							Tuple								=      layer_norm_eps
           SCREAMING_SNAKE_CASE							:							int								=      initializer_range
           SCREAMING_SNAKE_CASE							:							int								=      num_ctc_classes
           SCREAMING_SNAKE_CASE							:							Optional[int]								=      vocab_size
           SCREAMING_SNAKE_CASE							:							int								=      do_stable_layer_norm
           SCREAMING_SNAKE_CASE							:							List[str]								=      use_weighted_layer_sum
           SCREAMING_SNAKE_CASE							:							str								=      classifier_proj_size

           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
           SCREAMING_SNAKE_CASE							:							List[Any]								=      apply_spec_augment
           SCREAMING_SNAKE_CASE							:							Tuple								=      mask_time_prob
           SCREAMING_SNAKE_CASE							:							str								=      mask_time_length
           SCREAMING_SNAKE_CASE							:							Union[str, Any]								=      mask_time_min_masks
           SCREAMING_SNAKE_CASE							:							Tuple								=      mask_feature_prob
           SCREAMING_SNAKE_CASE							:							Union[str, Any]								=      mask_feature_length

           # parameters for pretraining with codevector quantized representations
           SCREAMING_SNAKE_CASE							:							int								=      num_codevectors_per_group
           SCREAMING_SNAKE_CASE							:							Any								=      num_codevector_groups
           SCREAMING_SNAKE_CASE							:							Union[str, Any]								=      contrastive_logits_temperature
           SCREAMING_SNAKE_CASE							:							List[Any]								=      num_negatives
           SCREAMING_SNAKE_CASE							:							str								=      codevector_dim
           SCREAMING_SNAKE_CASE							:							Union[str, Any]								=      proj_codevector_dim
           SCREAMING_SNAKE_CASE							:							Dict								=      diversity_loss_weight

           # ctc loss
           SCREAMING_SNAKE_CASE							:							List[str]								=      ctc_loss_reduction
           SCREAMING_SNAKE_CASE							:							int								=      ctc_zero_infinity

           # adapter
           SCREAMING_SNAKE_CASE							:							Union[str, Any]								=      add_adapter
           SCREAMING_SNAKE_CASE							:							List[str]								=      adapter_kernel_size
           SCREAMING_SNAKE_CASE							:							Tuple								=      adapter_stride
           SCREAMING_SNAKE_CASE							:							Dict								=      num_adapter_layers
           SCREAMING_SNAKE_CASE							:							str								=      output_hidden_size or hidden_size

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

           # XVector-specific parameters. Feel free to ignore for other classes.
           SCREAMING_SNAKE_CASE							:							Tuple								=      list(_lowerCamelCase					)
           SCREAMING_SNAKE_CASE							:							Optional[int]								=      list(_lowerCamelCase					)
           SCREAMING_SNAKE_CASE							:							int								=      list(_lowerCamelCase					)
           SCREAMING_SNAKE_CASE							:							Optional[int]								=      xvector_output_dim






       @property
       def      __lowerCAmelCase			(						self					) ->int:
           return functools.reduce(operator.mul							,    self.conv_stride							,    1					)




def 				UpperCAmelCase_					(							__snake_case     ,						__snake_case						)     ->			List[Any]:







 """simple docstring"""


 if b == 0:
  return 1
 if (b % 2) == 0:
  return actual_power(__snake_case     ,						int(b / 2						)						) * actual_power(__snake_case     ,						int(b / 2						)						)
 else:
  return a * actual_power(__snake_case     ,						int(b / 2						)						) * actual_power(__snake_case     ,						int(b / 2						)						)
def 				UpperCAmelCase_					(							__snake_case     ,						__snake_case						)     ->			float:







 """simple docstring"""


 if b < 0:
  return 1 / actual_power(__snake_case     ,						__snake_case						)
 return actual_power(__snake_case     ,						__snake_case						)


if __name__ == "__main__":
  print(power(-2, -3))

