



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__	(       _A):



 """simple docstring"""

 a__					: List[str] =  'unispeech-sat'

 def __init__(    self					:					int			,						__lowerCAmelCase					:					Any=32			,						__lowerCAmelCase					:					int=7_68			,						__lowerCAmelCase					:					Tuple=12			,						__lowerCAmelCase					:					List[str]=12			,						__lowerCAmelCase					:					Union[str, Any]=30_72			,						__lowerCAmelCase					:					Any="gelu"			,						__lowerCAmelCase					:					List[str]=0.1			,						__lowerCAmelCase					:					Union[str, Any]=0.1			,						__lowerCAmelCase					:					Union[str, Any]=0.1			,						__lowerCAmelCase					:					Tuple=0.0			,						__lowerCAmelCase					:					Union[str, Any]=0.0			,						__lowerCAmelCase					:					Dict=0.1			,						__lowerCAmelCase					:					Tuple=0.1			,						__lowerCAmelCase					:					str=0.02			,						__lowerCAmelCase					:					Optional[int]=1E-5			,						__lowerCAmelCase					:					List[str]="group"			,						__lowerCAmelCase					:					Tuple="gelu"			,						__lowerCAmelCase					:					Optional[int]=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12)			,						__lowerCAmelCase					:					List[str]=(5, 2, 2, 2, 2, 2, 2)			,						__lowerCAmelCase					:					List[Any]=(10, 3, 3, 3, 3, 2, 2)			,						__lowerCAmelCase					:					List[str]=False			,						__lowerCAmelCase					:					Any=1_28			,						__lowerCAmelCase					:					int=16			,						__lowerCAmelCase					:					List[str]=False			,						__lowerCAmelCase					:					Union[str, Any]=True			,						__lowerCAmelCase					:					Any=0.05			,						__lowerCAmelCase					:					Union[str, Any]=10			,						__lowerCAmelCase					:					str=2			,						__lowerCAmelCase					:					Optional[Any]=0.0			,						__lowerCAmelCase					:					Tuple=10			,						__lowerCAmelCase					:					Dict=0			,						__lowerCAmelCase					:					Union[str, Any]=3_20			,						__lowerCAmelCase					:					str=2			,						__lowerCAmelCase					:					Tuple=0.1			,						__lowerCAmelCase					:					Dict=1_00			,						__lowerCAmelCase					:					Union[str, Any]=2_56			,						__lowerCAmelCase					:					int=2_56			,						__lowerCAmelCase					:					int=0.1			,						__lowerCAmelCase					:					List[Any]="mean"			,						__lowerCAmelCase					:					List[str]=False			,						__lowerCAmelCase					:					str=False			,						__lowerCAmelCase					:					List[Any]=2_56			,						__lowerCAmelCase					:					Tuple=(5_12, 5_12, 5_12, 5_12, 15_00)			,						__lowerCAmelCase					:					Dict=(5, 3, 3, 1, 1)			,						__lowerCAmelCase					:					List[Any]=(1, 2, 3, 1, 1)			,						__lowerCAmelCase					:					List[str]=5_12			,						__lowerCAmelCase					:					Union[str, Any]=0			,						__lowerCAmelCase					:					List[Any]=1			,						__lowerCAmelCase					:					Any=2			,						__lowerCAmelCase					:					Dict=5_04			,						**__lowerCAmelCase					:					int			,						)   ->	List[Any]:
    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      =       vocab_size
    _A      =       num_clusters
    _A      =       do_stable_layer_norm
    _A      =       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
    _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

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

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

 @property
 def     snake_case_      (    self					:					Tuple      )   ->	Union[str, Any]:
    return functools.reduce(operator.mul			,						self.conv_stride			,						1      )






"""simple docstring"""

def       SCREAMING_SNAKE_CASE							( lowercase__					,					lowercase__   )			->						float:
 if digit_amount > 0:
  return round(number - int(lowercase__   )					,					lowercase__   )
 return number - int(lowercase__   )


if __name__ == "__main__":
    print(decimal_isolate(1.53, 0))
    print(decimal_isolate(35.345, 1))
    print(decimal_isolate(35.345, 2))
    print(decimal_isolate(35.345, 3))
    print(decimal_isolate(-14.789, 3))
    print(decimal_isolate(0, 2))
    print(decimal_isolate(-14.123, 1))
    print(decimal_isolate(-14.123, 2))
    print(decimal_isolate(-14.123, 3))






