





"""simple docstring"""




import functools
import operator

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


A   : List[Any]			=				logging.get_logger(__name__)

A   : Optional[Any]			=				{
    '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   A      (UpperCamelCase__   ):
			'''simple docstring'''




			__lowerCamelCase     :	int          =   '''unispeech'''






			def __init__(      self       :   int							,     __lowerCAmelCase       :   Dict=32							,     __lowerCAmelCase       :   Union[str, Any]=7_68							,     __lowerCAmelCase       :   List[Any]=12							,     __lowerCAmelCase       :   Tuple=12							,     __lowerCAmelCase       :   Optional[Any]=30_72							,     __lowerCAmelCase       :   List[str]="gelu"							,     __lowerCAmelCase       :   Dict=0.1							,     __lowerCAmelCase       :   Tuple=0.1							,     __lowerCAmelCase       :   Any=0.1							,     __lowerCAmelCase       :   Optional[int]=0.0							,     __lowerCAmelCase       :   Union[str, Any]=0.0							,     __lowerCAmelCase       :   str=0.1							,     __lowerCAmelCase       :   Union[str, Any]=0.1							,     __lowerCAmelCase       :   Tuple=0.0_2							,     __lowerCAmelCase       :   Optional[int]=1e-5							,     __lowerCAmelCase       :   str="group"							,     __lowerCAmelCase       :   Tuple="gelu"							,     __lowerCAmelCase       :   str=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12)							,     __lowerCAmelCase       :   int=(5, 2, 2, 2, 2, 2, 2)							,     __lowerCAmelCase       :   Optional[int]=(10, 3, 3, 3, 3, 2, 2)							,     __lowerCAmelCase       :   Dict=False							,     __lowerCAmelCase       :   Union[str, Any]=1_28							,     __lowerCAmelCase       :   Dict=16							,     __lowerCAmelCase       :   List[str]=False							,     __lowerCAmelCase       :   Tuple=True							,     __lowerCAmelCase       :   List[str]=0.0_5							,     __lowerCAmelCase       :   List[str]=10							,     __lowerCAmelCase       :   Optional[Any]=2							,     __lowerCAmelCase       :   Dict=0.0							,     __lowerCAmelCase       :   List[str]=10							,     __lowerCAmelCase       :   str=0							,     __lowerCAmelCase       :   str=3_20							,     __lowerCAmelCase       :   Dict=2							,     __lowerCAmelCase       :   List[str]=0.1							,     __lowerCAmelCase       :   Union[str, Any]=1_00							,     __lowerCAmelCase       :   int=2_56							,     __lowerCAmelCase       :   Union[str, Any]=2_56							,     __lowerCAmelCase       :   str=0.1							,     __lowerCAmelCase       :   int="mean"							,     __lowerCAmelCase       :   Optional[Any]=False							,     __lowerCAmelCase       :   str=False							,     __lowerCAmelCase       :   Tuple=2_56							,     __lowerCAmelCase       :   Union[str, Any]=80							,     __lowerCAmelCase       :   str=0							,     __lowerCAmelCase       :   List[Any]=1							,     __lowerCAmelCase       :   Dict=2							,     __lowerCAmelCase       :   Optional[int]=0.5							,     **__lowerCAmelCase       :   List[Any]							,     )     ->     int:







					"""simple docstring"""






					super().__init__(**__lowerCamelCase							,     pad_token_id=__lowerCamelCase							,     bos_token_id=__lowerCamelCase							,     eos_token_id=__lowerCamelCase       )
					A__  				=       hidden_size
					A__  				=       feat_extract_norm
					A__  				=       feat_extract_activation
					A__  				=       list(__lowerCamelCase       )
					A__  				=       list(__lowerCamelCase       )
					A__  				=       list(__lowerCamelCase       )
					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       :   Union[str, Any]       )     ->     Dict:







					"""simple docstring"""






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










def        __lowerCamelCase (							__a       :int = 3   ,					__a       :int = 7   ,					__a       :int = 1_0_0_0_0_0_0   )		->    int:






		"""simple docstring"""

		A__  				=       0
		A__  				=       1

		for current_denominator in range(1   ,					limit + 1   ):
				A__  				=       current_denominator * numerator // denominator
				if current_denominator % denominator == 0:
						current_numerator -= 1
				if current_numerator * max_denominator > current_denominator * max_numerator:
						A__  				=       current_numerator
						A__  				=       current_denominator
		return max_numerator


if __name__ == "__main__":
					print(solution(numerator=3, denominator=7, limit=1_0_0_0_0_0_0))



