



"""simple docstring"""






import functools
import operator

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


lowerCAmelCase__        =				logging.get_logger(__name__)

lowerCAmelCase__        =				{
    '''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        __snake_case       (	_lowercase):
  snake_case__				:   List[str]  			=						"unispeech"




  def __init__( self     :						List[str]						,					__lowerCAmelCase     :						List[Any]=3_2						,					__lowerCAmelCase     :						str=7_6_8						,					__lowerCAmelCase     :						int=1_2						,					__lowerCAmelCase     :						int=1_2						,					__lowerCAmelCase     :						int=3_0_7_2						,					__lowerCAmelCase     :						Tuple="gelu"						,					__lowerCAmelCase     :						Dict=0.1						,					__lowerCAmelCase     :						Dict=0.1						,					__lowerCAmelCase     :						str=0.1						,					__lowerCAmelCase     :						Tuple=0.0						,					__lowerCAmelCase     :						Optional[int]=0.0						,					__lowerCAmelCase     :						List[Any]=0.1						,					__lowerCAmelCase     :						Optional[int]=0.1						,					__lowerCAmelCase     :						Tuple=0.02						,					__lowerCAmelCase     :						Dict=1E-5						,					__lowerCAmelCase     :						Optional[int]="group"						,					__lowerCAmelCase     :						Dict="gelu"						,					__lowerCAmelCase     :						int=(5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2)						,					__lowerCAmelCase     :						Optional[int]=(5, 2, 2, 2, 2, 2, 2)						,					__lowerCAmelCase     :						Union[str, Any]=(1_0, 3, 3, 3, 3, 2, 2)						,					__lowerCAmelCase     :						List[Any]=False						,					__lowerCAmelCase     :						List[str]=1_2_8						,					__lowerCAmelCase     :						Any=1_6						,					__lowerCAmelCase     :						Optional[int]=False						,					__lowerCAmelCase     :						Optional[Any]=True						,					__lowerCAmelCase     :						Union[str, Any]=0.05						,					__lowerCAmelCase     :						Union[str, Any]=1_0						,					__lowerCAmelCase     :						List[Any]=2						,					__lowerCAmelCase     :						Dict=0.0						,					__lowerCAmelCase     :						Optional[int]=1_0						,					__lowerCAmelCase     :						Dict=0						,					__lowerCAmelCase     :						List[str]=3_2_0						,					__lowerCAmelCase     :						List[Any]=2						,					__lowerCAmelCase     :						Dict=0.1						,					__lowerCAmelCase     :						Tuple=1_0_0						,					__lowerCAmelCase     :						Dict=2_5_6						,					__lowerCAmelCase     :						str=2_5_6						,					__lowerCAmelCase     :						List[Any]=0.1						,					__lowerCAmelCase     :						Dict="mean"						,					__lowerCAmelCase     :						Union[str, Any]=False						,					__lowerCAmelCase     :						Dict=False						,					__lowerCAmelCase     :						Optional[Any]=2_5_6						,					__lowerCAmelCase     :						Dict=8_0						,					__lowerCAmelCase     :						int=0						,					__lowerCAmelCase     :						Optional[int]=1						,					__lowerCAmelCase     :						Dict=2						,					__lowerCAmelCase     :						Any=0.5						,					**__lowerCAmelCase     :						Optional[Any]						,					):






         """simple docstring"""






         super().__init__(**__lowerCAmelCase						,					pad_token_id=__lowerCAmelCase						,					bos_token_id=__lowerCAmelCase						,					eos_token_id=__lowerCAmelCase		)
         _lowerCamelCase						:				Dict    			= hidden_size
         _lowerCamelCase						:				Any    			= feat_extract_norm
         _lowerCamelCase						:				List[Any]    			= feat_extract_activation
         _lowerCamelCase						:				Any    			= list(__lowerCAmelCase		)
         _lowerCamelCase						:				Tuple    			= list(__lowerCAmelCase		)
         _lowerCamelCase						:				int    			= list(__lowerCAmelCase		)
         _lowerCamelCase						:				List[str]    			= conv_bias
         _lowerCamelCase						:				List[str]    			= num_conv_pos_embeddings
         _lowerCamelCase						:				Tuple    			= num_conv_pos_embedding_groups
         _lowerCamelCase						:				List[str]    			= len(self.conv_dim		)
         _lowerCamelCase						:				Tuple    			= num_hidden_layers
         _lowerCamelCase						:				List[Any]    			= intermediate_size
         _lowerCamelCase						:				Dict    			= hidden_act
         _lowerCamelCase						:				Union[str, Any]    			= num_attention_heads
         _lowerCamelCase						:				Tuple    			= hidden_dropout
         _lowerCamelCase						:				List[Any]    			= attention_dropout
         _lowerCamelCase						:				Optional[int]    			= activation_dropout
         _lowerCamelCase						:				Optional[Any]    			= feat_proj_dropout
         _lowerCamelCase						:				Optional[int]    			= final_dropout
         _lowerCamelCase						:				Any    			= layerdrop
         _lowerCamelCase						:				Any    			= layer_norm_eps
         _lowerCamelCase						:				List[Any]    			= initializer_range
         _lowerCamelCase						:				List[str]    			= num_ctc_classes
         _lowerCamelCase						:				List[Any]    			= vocab_size
         _lowerCamelCase						:				Optional[Any]    			= do_stable_layer_norm
         _lowerCamelCase						:				Tuple    			= use_weighted_layer_sum
         _lowerCamelCase						:				List[Any]    			= 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
         _lowerCamelCase						:				Any    			= apply_spec_augment
         _lowerCamelCase						:				Dict    			= mask_time_prob
         _lowerCamelCase						:				List[str]    			= mask_time_length
         _lowerCamelCase						:				Optional[Any]    			= mask_time_min_masks
         _lowerCamelCase						:				List[str]    			= mask_feature_prob
         _lowerCamelCase						:				int    			= mask_feature_length
         _lowerCamelCase						:				Dict    			= mask_feature_min_masks

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

         # ctc loss
         _lowerCamelCase						:				Union[str, Any]    			= ctc_loss_reduction
         _lowerCamelCase						:				Any    			= ctc_zero_infinity

         # pretraining loss
         _lowerCamelCase						:				str    			= replace_prob




  @property
  def 						SCREAMING_SNAKE_CASE				( self     :						int		):






         """simple docstring"""






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









"""simple docstring"""




def       _SCREAMING_SNAKE_CASE		(	_lowercase						:    float    ,       _lowercase						:    float					) ->float:






	'''simple docstring'''






	return price * (1 + tax_rate)


if __name__ == "__main__":
		print(F'''{price_plus_tax(100, 0.25) = }''')
		print(F'''{price_plus_tax(125.50, 0.05) = }''')


