


import functools
import operator

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


__UpperCamelCase    		=       logging.get_logger(__name__)

__UpperCamelCase    		=       {
    'microsoft/unispeech-sat-base-100h-libri-ft': (
        'https://huggingface.co/microsoft/unispeech-sat-base-100h-libri-ft/resolve/main/config.json'
    ),
    # See all UniSpeechSat models at https://huggingface.co/models?filter=unispeech_sat
}







class        lowerCamelCase__	(							UpperCAmelCase      ):






			"""simple docstring"""






			_UpperCamelCase		:					Optional[int]    =		'unispeech-sat'




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

						'''simple docstring'''


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

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

						# ctc loss
						UpperCamelCase__					=       ctc_loss_reduction
						UpperCamelCase__					=       ctc_zero_infinity

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

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







			@property
			def 				snake_case__				(							self     ):

						'''simple docstring'''


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






def        UpperCamelCase_(				_A   :List[str]				,     _A   :Tuple				,     _A   :Any				,     _A   :Tuple				,     _A   :Optional[int]				,     _A   :str  )->		List[str]:
			if index == r:
						for j in range(_A  ):
									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
			UpperCamelCase__					=       arr[i]
			combination_util(_A				,     _A				,     _A				,     index + 1				,     _A				,     i + 1  )
			# current is excluded, replace it with
			# next (Note that i+1 is passed, but
			# index is not changed)
			combination_util(_A				,     _A				,     _A				,     _A				,     _A				,     i + 1  )
			# The main function that prints all combinations
			# of size r in arr[] of size n. This function
			# mainly uses combinationUtil()
def        UpperCamelCase_(				_A   :Dict				,     _A   :Optional[Any]				,     _A   :Union[str, Any]  )->		Optional[int]:
			# A temporary array to store all combination one by one
			UpperCamelCase__					=       [0] * r
			# Print all combination using temporary array 'data[]'
			combination_util(_A				,     _A				,     _A				,     0				,     _A				,     0  )


if __name__ == "__main__":
						# Driver code to check the function above
						__UpperCamelCase    		=       [1_0, 2_0, 3_0, 4_0, 5_0]
						print_combination(arr, len(arr), 3)
						# This code is contributed by Ambuj sahu


