


import functools
import operator

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


_snake_case					:		Optional[Any]      =    logging.get_logger(__name__)

_snake_case					:		List[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     a		(_lowerCAmelCase				):




							"""simple docstring"""


							__UpperCAmelCase   :							Tuple					  =  "wav2vec2"

							def __init__(							self	:  str   ,     lowerCamelCase	:  List[Any]=32   ,     lowerCamelCase	:  Any=768   ,     lowerCamelCase	:  Dict=12   ,     lowerCamelCase	:  Optional[int]=12   ,     lowerCamelCase	:  Optional[int]=3072   ,     lowerCamelCase	:  List[Any]="gelu"   ,     lowerCamelCase	:  Optional[int]=0.1   ,     lowerCamelCase	:  str=0.1   ,     lowerCamelCase	:  List[Any]=0.1   ,     lowerCamelCase	:  str=0.0   ,     lowerCamelCase	:  List[Any]=0.0   ,     lowerCamelCase	:  List[str]=0.1   ,     lowerCamelCase	:  List[Any]=0.1   ,     lowerCamelCase	:  Any=0.02   ,     lowerCamelCase	:  Optional[Any]=1E-5   ,     lowerCamelCase	:  Union[str, Any]="group"   ,     lowerCamelCase	:  Tuple="gelu"   ,     lowerCamelCase	:  Dict=(512, 512, 512, 512, 512, 512, 512)   ,     lowerCamelCase	:  List[Any]=(5, 2, 2, 2, 2, 2, 2)   ,     lowerCamelCase	:  str=(10, 3, 3, 3, 3, 2, 2)   ,     lowerCamelCase	:  int=False   ,     lowerCamelCase	:  Optional[int]=128   ,     lowerCamelCase	:  Optional[int]=16   ,     lowerCamelCase	:  str=False   ,     lowerCamelCase	:  Tuple=True   ,     lowerCamelCase	:  Dict=0.05   ,     lowerCamelCase	:  Union[str, Any]=10   ,     lowerCamelCase	:  Any=2   ,     lowerCamelCase	:  Union[str, Any]=0.0   ,     lowerCamelCase	:  List[str]=10   ,     lowerCamelCase	:  str=0   ,     lowerCamelCase	:  Tuple=320   ,     lowerCamelCase	:  Optional[Any]=2   ,     lowerCamelCase	:  List[Any]=0.1   ,     lowerCamelCase	:  int=100   ,     lowerCamelCase	:  Union[str, Any]=256   ,     lowerCamelCase	:  Optional[int]=256   ,     lowerCamelCase	:  Optional[int]=0.1   ,     lowerCamelCase	:  Any="sum"   ,     lowerCamelCase	:  str=False   ,     lowerCamelCase	:  Dict=False   ,     lowerCamelCase	:  int=256   ,     lowerCamelCase	:  Tuple=(512, 512, 512, 512, 1500)   ,     lowerCamelCase	:  Optional[int]=(5, 3, 3, 1, 1)   ,     lowerCamelCase	:  int=(1, 2, 3, 1, 1)   ,     lowerCamelCase	:  int=512   ,     lowerCamelCase	:  Optional[Any]=0   ,     lowerCamelCase	:  List[str]=1   ,     lowerCamelCase	:  Any=2   ,     lowerCamelCase	:  Any=False   ,     lowerCamelCase	:  Any=3   ,     lowerCamelCase	:  List[str]=2   ,     lowerCamelCase	:  int=3   ,     lowerCamelCase	:  str=None   ,     lowerCamelCase	:  Dict=None   ,     **lowerCamelCase	:  str   ,     )     ->   Optional[int]:
														super().__init__(**lowerCamelCase   ,     pad_token_id=lowerCamelCase   ,     bos_token_id=lowerCamelCase   ,     eos_token_id=lowerCamelCase    )
														__snake_case		:      int										=       hidden_size
														__snake_case		:      Optional[Any]										=       feat_extract_norm
														__snake_case		:      Dict										=       feat_extract_activation
														__snake_case		:      Any										=       list(lowerCamelCase    )
														__snake_case		:      Union[str, Any]										=       list(lowerCamelCase    )
														__snake_case		:      Optional[Any]										=       list(lowerCamelCase    )
														__snake_case		:      str										=       conv_bias
														__snake_case		:      str										=       num_conv_pos_embeddings
														__snake_case		:      Union[str, Any]										=       num_conv_pos_embedding_groups
														__snake_case		:      List[Any]										=       len(self.conv_dim    )
														__snake_case		:      Optional[Any]										=       num_hidden_layers
														__snake_case		:      Tuple										=       intermediate_size
														__snake_case		:      List[Any]										=       hidden_act
														__snake_case		:      int										=       num_attention_heads
														__snake_case		:      List[str]										=       hidden_dropout
														__snake_case		:      Dict										=       attention_dropout
														__snake_case		:      Dict										=       activation_dropout
														__snake_case		:      Tuple										=       feat_proj_dropout
														__snake_case		:      Any										=       final_dropout
														__snake_case		:      Union[str, Any]										=       layerdrop
														__snake_case		:      List[str]										=       layer_norm_eps
														__snake_case		:      Optional[Any]										=       initializer_range
														__snake_case		:      Tuple										=       vocab_size
														__snake_case		:      int										=       do_stable_layer_norm
														__snake_case		:      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
														__snake_case		:      Optional[Any]										=       apply_spec_augment
														__snake_case		:      int										=       mask_time_prob
														__snake_case		:      Optional[int]										=       mask_time_length
														__snake_case		:      Tuple										=       mask_time_min_masks
														__snake_case		:      Tuple										=       mask_feature_prob
														__snake_case		:      Optional[Any]										=       mask_feature_length
														__snake_case		:      Tuple										=       mask_feature_min_masks

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

														# ctc loss
														__snake_case		:      Optional[Any]										=       ctc_loss_reduction
														__snake_case		:      Any										=       ctc_zero_infinity

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

														# SequenceClassification-specific parameter. Feel free to ignore for other classes.
														__snake_case		:      Optional[Any]										=       classifier_proj_size

														# XVector-specific parameters. Feel free to ignore for other classes.
														__snake_case		:      Optional[int]										=       list(lowerCamelCase    )
														__snake_case		:      List[str]										=       list(lowerCamelCase    )
														__snake_case		:      Optional[int]										=       list(lowerCamelCase    )
														__snake_case		:      List[Any]										=       xvector_output_dim






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







def     lowerCAmelCase_					( __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase     ):
							if index == r:
														for j in range(__lowerCamelCase     ):
																					print(data[j]							,     end=" "     )
														print(" "     )
														return
							#  When no more elements are there to put in data[]
							if i >= n:
														return
							# current is included, put next at next location
							__snake_case		:      Union[str, Any]										=       arr[i]
							combination_util(__lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     index + 1							,     __lowerCamelCase							,     i + 1     )
							# current is excluded, replace it with
							# next (Note that i+1 is passed, but
							# index is not changed)
							combination_util(__lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     i + 1     )
							# The main function that prints all combinations
							# of size r in arr[] of size n. This function
							# mainly uses combinationUtil()







def     lowerCAmelCase_					( __lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase     ):
							# A temporary array to store all combination one by one
							__snake_case		:      Union[str, Any]										=       [0] * r
							# Print all combination using temporary array 'data[]'
							combination_util(__lowerCamelCase							,     __lowerCamelCase							,     __lowerCamelCase							,     0							,     __lowerCamelCase							,     0     )


if __name__ == "__main__":
			# Driver code to check the function above
			_snake_case					:		List[str]      =    [10, 20, 30, 40, 50]
			print_combination(arr, len(arr), 3)
			# This code is contributed by Ambuj sahu

