



import functools
import operator

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


_snake_case		=  logging.get_logger(__name__)

_snake_case		=  {
    "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_    (       a):
							lowerCamelCase__   			=		'wav2vec2'







							def __init__(   self,			__a=32,			__a=768,			__a=12,			__a=12,			__a=3072,			__a="gelu",			__a=0.1,			__a=0.1,			__a=0.1,			__a=0.0,			__a=0.0,			__a=0.1,			__a=0.1,			__a=0.02,			__a=1E-5,			__a="group",			__a="gelu",			__a=(512, 512, 512, 512, 512, 512, 512),			__a=(5, 2, 2, 2, 2, 2, 2),			__a=(10, 3, 3, 3, 3, 2, 2),			__a=False,			__a=128,			__a=16,			__a=False,			__a=True,			__a=0.05,			__a=10,			__a=2,			__a=0.0,			__a=10,			__a=0,			__a=320,			__a=2,			__a=0.1,			__a=100,			__a=256,			__a=256,			__a=0.1,			__a="sum",			__a=False,			__a=False,			__a=256,			__a=(512, 512, 512, 512, 1500),			__a=(5, 3, 3, 1, 1),			__a=(1, 2, 3, 1, 1),			__a=512,			__a=0,			__a=1,			__a=2,			__a=False,			__a=3,			__a=2,			__a=3,			__a=None,			__a=None,			**__a,			):

														'''simple docstring'''

														super().__init__(**__a,			pad_token_id=__a,			bos_token_id=__a,			eos_token_id=__a)
														_lowerCAmelCase     :							str    =    hidden_size
														_lowerCAmelCase     :							Optional[int]    =    feat_extract_norm
														_lowerCAmelCase     :							Union[str, Any]    =    feat_extract_activation
														_lowerCAmelCase     :							Optional[Any]    =    list(__a)
														_lowerCAmelCase     :							List[str]    =    list(__a)
														_lowerCAmelCase     :							str    =    list(__a)
														_lowerCAmelCase     :							List[str]    =    conv_bias
														_lowerCAmelCase     :							str    =    num_conv_pos_embeddings
														_lowerCAmelCase     :							List[Any]    =    num_conv_pos_embedding_groups
														_lowerCAmelCase     :							str    =    len(self.conv_dim)
														_lowerCAmelCase     :							List[str]    =    num_hidden_layers
														_lowerCAmelCase     :							str    =    intermediate_size
														_lowerCAmelCase     :							Any    =    hidden_act
														_lowerCAmelCase     :							int    =    num_attention_heads
														_lowerCAmelCase     :							Optional[Any]    =    hidden_dropout
														_lowerCAmelCase     :							List[str]    =    attention_dropout
														_lowerCAmelCase     :							Tuple    =    activation_dropout
														_lowerCAmelCase     :							int    =    feat_proj_dropout
														_lowerCAmelCase     :							List[str]    =    final_dropout
														_lowerCAmelCase     :							int    =    layerdrop
														_lowerCAmelCase     :							int    =    layer_norm_eps
														_lowerCAmelCase     :							Union[str, Any]    =    initializer_range
														_lowerCAmelCase     :							str    =    vocab_size
														_lowerCAmelCase     :							Optional[Any]    =    do_stable_layer_norm
														_lowerCAmelCase     :							Any    =    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     :							str    =    apply_spec_augment
														_lowerCAmelCase     :							Optional[Any]    =    mask_time_prob
														_lowerCAmelCase     :							Optional[int]    =    mask_time_length
														_lowerCAmelCase     :							List[str]    =    mask_time_min_masks
														_lowerCAmelCase     :							Optional[int]    =    mask_feature_prob
														_lowerCAmelCase     :							Optional[int]    =    mask_feature_length
														_lowerCAmelCase     :							List[str]    =    mask_feature_min_masks

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

														# ctc loss
														_lowerCAmelCase     :							Tuple    =    ctc_loss_reduction
														_lowerCAmelCase     :							Tuple    =    ctc_zero_infinity

														# adapter
														_lowerCAmelCase     :							List[Any]    =    add_adapter
														_lowerCAmelCase     :							List[str]    =    adapter_kernel_size
														_lowerCAmelCase     :							str    =    adapter_stride
														_lowerCAmelCase     :							List[str]    =    num_adapter_layers
														_lowerCAmelCase     :							str    =    output_hidden_size or hidden_size
														_lowerCAmelCase     :							Tuple    =    adapter_attn_dim

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

														# XVector-specific parameters. Feel free to ignore for other classes.
														_lowerCAmelCase     :							str    =    list(__a)
														_lowerCAmelCase     :							Union[str, Any]    =    list(__a)
														_lowerCAmelCase     :							List[str]    =    list(__a)
														_lowerCAmelCase     :							Tuple    =    xvector_output_dim







							@property
							def    snake_case__      (   self):

														'''simple docstring'''

														return functools.reduce(operator.mul,			self.conv_stride,			1)








"""simple docstring"""






import random
from typing import Any



def 					_A			(__a							) ->       list[Any]:
    """simple docstring"""






    for _ in range(len(__a							)							):
        SCREAMING_SNAKE_CASE_      :  Optional[int]    						=		random.randint(0    ,				len(__a							) - 1							)
        SCREAMING_SNAKE_CASE_      :  Tuple    						=		random.randint(0    ,				len(__a							) - 1							)
        SCREAMING_SNAKE_CASE_						,			SCREAMING_SNAKE_CASE_      :  Union[str, Any]    						=		data[b], data[a]
    return data


if __name__ == "__main__":
  UpperCAmelCase_   : Dict   			= [0, 1, 2, 3, 4, 5, 6, 7]
  UpperCAmelCase_   : Dict   			= ["""python""", """says""", """hello""", """!"""]
  print("""Fisher-Yates Shuffle:""")
  print("""List""", integers, strings)
  print("""FY Shuffle""", fisher_yates_shuffle(integers), fisher_yates_shuffle(strings))


