






import functools
import operator

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


__A      =				logging.get_logger(__name__)

__A      =				{
    'microsoft/unispeech-large-1500h-cv': (
        'https://huggingface.co/microsoft/unispeech-large-1500h-cv/resolve/main/config.json'
    ),
    # See all UniSpeech models at https://huggingface.co/models?filter=unispeech
}





class 						SCREAMING_SNAKE_CASE				( snake_case					):





							"""simple docstring"""

							A_						  =					"unispeech"

							def __init__(  self:   str		,     __A:   Any=32		,     __A:   str=7_68		,     __A:   str=12		,     __A:   int=12		,     __A:   Optional[Any]=30_72		,     __A:   List[str]="gelu"		,     __A:   List[str]=0.1		,     __A:   Dict=0.1		,     __A:   int=0.1		,     __A:   Any=0.0		,     __A:   str=0.0		,     __A:   str=0.1		,     __A:   Any=0.1		,     __A:   Optional[int]=0.02		,     __A:   int=1e-5		,     __A:   Dict="group"		,     __A:   Union[str, Any]="gelu"		,     __A:   str=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12)		,     __A:   List[str]=(5, 2, 2, 2, 2, 2, 2)		,     __A:   Any=(10, 3, 3, 3, 3, 2, 2)		,     __A:   List[str]=False		,     __A:   Dict=1_28		,     __A:   Tuple=16		,     __A:   int=False		,     __A:   List[str]=True		,     __A:   Any=0.05		,     __A:   str=10		,     __A:   Any=2		,     __A:   str=0.0		,     __A:   Tuple=10		,     __A:   Any=0		,     __A:   Optional[Any]=3_20		,     __A:   str=2		,     __A:   Optional[int]=0.1		,     __A:   int=1_00		,     __A:   List[str]=2_56		,     __A:   int=2_56		,     __A:   Optional[Any]=0.1		,     __A:   List[str]="mean"		,     __A:   Optional[int]=False		,     __A:   Any=False		,     __A:   str=2_56		,     __A:   List[str]=80		,     __A:   List[str]=0		,     __A:   Union[str, Any]=1		,     __A:   int=2		,     __A:   Union[str, Any]=0.5		,     **__A:   Union[str, Any]		,     )    ->				List[str]:
												super().__init__(**__A		,     pad_token_id=__A		,     bos_token_id=__A		,     eos_token_id=__A   )
												_A								= hidden_size
												_A								= feat_extract_norm
												_A								= feat_extract_activation
												_A								= list(__A   )
												_A								= list(__A   )
												_A								= list(__A   )
												_A								= conv_bias
												_A								= num_conv_pos_embeddings
												_A								= num_conv_pos_embedding_groups
												_A								= len(self.conv_dim   )
												_A								= num_hidden_layers
												_A								= intermediate_size
												_A								= hidden_act
												_A								= num_attention_heads
												_A								= hidden_dropout
												_A								= attention_dropout
												_A								= activation_dropout
												_A								= feat_proj_dropout
												_A								= final_dropout
												_A								= layerdrop
												_A								= layer_norm_eps
												_A								= initializer_range
												_A								= num_ctc_classes
												_A								= vocab_size
												_A								= do_stable_layer_norm
												_A								= use_weighted_layer_sum
												_A								= 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
												_A								= apply_spec_augment
												_A								= mask_time_prob
												_A								= mask_time_length
												_A								= mask_time_min_masks
												_A								= mask_feature_prob
												_A								= mask_feature_length
												_A								= mask_feature_min_masks

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

												# ctc loss
												_A								= ctc_loss_reduction
												_A								= ctc_zero_infinity

												# pretraining loss
												_A								= replace_prob



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











def      __A					(     _lowercase ):

					'''simple docstring'''







					_A								= [0] * len(_lowercase )
					_A								= []
					_A								= []
					_A								= 0

					for values in graph.values():
										for i in values:
															indegree[i] += 1

					for i in range(len(_lowercase ) ):
										if indegree[i] == 0:
															queue.append(_lowercase )

					while queue:
										_A								= queue.pop(0 )
										cnt += 1
										topo.append(_lowercase )
										for x in graph[vertex]:
															indegree[x] -= 1
															if indegree[x] == 0:
																				queue.append(_lowercase )

					if cnt != len(_lowercase ):
										print('''Cycle exists''' )
					else:
										print(_lowercase )


# Adjacency List of Graph
__A      =				{0: [1, 2], 1: [3], 2: [3], 3: [4, 5], 4: [], 5: []}


topological_sort(graph)



