


import functools
import operator

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


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

UpperCamelCase					:       Union[str, Any]			    =     {
    """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 A__     ( A__  ):



  """simple docstring"""



  _lowercase									=		'unispeech-sat'

  def __init__( self			:  Optional[Any]				,				lowerCamelCase__			:  str=32				,				lowerCamelCase__			:  List[str]=768				,				lowerCamelCase__			:  Dict=12				,				lowerCamelCase__			:  int=12				,				lowerCamelCase__			:  Union[str, Any]=3_072				,				lowerCamelCase__			:  str="gelu"				,				lowerCamelCase__			:  Tuple=0.1				,				lowerCamelCase__			:  Optional[int]=0.1				,				lowerCamelCase__			:  Dict=0.1				,				lowerCamelCase__			:  Any=0.0				,				lowerCamelCase__			:  List[Any]=0.0				,				lowerCamelCase__			:  Union[str, Any]=0.1				,				lowerCamelCase__			:  Optional[Any]=0.1				,				lowerCamelCase__			:  Dict=0.02				,				lowerCamelCase__			:  Dict=1E-5				,				lowerCamelCase__			:  str="group"				,				lowerCamelCase__			:  Union[str, Any]="gelu"				,				lowerCamelCase__			:  Union[str, Any]=(512, 512, 512, 512, 512, 512, 512)				,				lowerCamelCase__			:  int=(5, 2, 2, 2, 2, 2, 2)				,				lowerCamelCase__			:  int=(10, 3, 3, 3, 3, 2, 2)				,				lowerCamelCase__			:  Any=False				,				lowerCamelCase__			:  Tuple=128				,				lowerCamelCase__			:  List[str]=16				,				lowerCamelCase__			:  str=False				,				lowerCamelCase__			:  List[Any]=True				,				lowerCamelCase__			:  Optional[Any]=0.05				,				lowerCamelCase__			:  Dict=10				,				lowerCamelCase__			:  int=2				,				lowerCamelCase__			:  int=0.0				,				lowerCamelCase__			:  Dict=10				,				lowerCamelCase__			:  Union[str, Any]=0				,				lowerCamelCase__			:  Union[str, Any]=320				,				lowerCamelCase__			:  int=2				,				lowerCamelCase__			:  List[str]=0.1				,				lowerCamelCase__			:  str=100				,				lowerCamelCase__			:  int=256				,				lowerCamelCase__			:  str=256				,				lowerCamelCase__			:  str=0.1				,				lowerCamelCase__			:  str="mean"				,				lowerCamelCase__			:  Tuple=False				,				lowerCamelCase__			:  Optional[Any]=False				,				lowerCamelCase__			:  List[str]=256				,				lowerCamelCase__			:  Any=(512, 512, 512, 512, 1_500)				,				lowerCamelCase__			:  Optional[int]=(5, 3, 3, 1, 1)				,				lowerCamelCase__			:  int=(1, 2, 3, 1, 1)				,				lowerCamelCase__			:  Optional[int]=512				,				lowerCamelCase__			:  Union[str, Any]=0				,				lowerCamelCase__			:  Dict=1				,				lowerCamelCase__			:  List[Any]=2				,				lowerCamelCase__			:  List[Any]=504				,				**lowerCamelCase__			:  str				,				):
        super().__init__(**lowerCamelCase__				,				pad_token_id=lowerCamelCase__				,				bos_token_id=lowerCamelCase__				,				eos_token_id=lowerCamelCase__       )
        a__	:  Optional[int]     =   hidden_size
        a__	:  Optional[Any]     =   feat_extract_norm
        a__	:  Any     =   feat_extract_activation
        a__	:  Union[str, Any]     =   list(lowerCamelCase__       )
        a__	:  str     =   list(lowerCamelCase__       )
        a__	:  int     =   list(lowerCamelCase__       )
        a__	:  str     =   conv_bias
        a__	:  List[Any]     =   num_conv_pos_embeddings
        a__	:  Any     =   num_conv_pos_embedding_groups
        a__	:  Tuple     =   len(self.conv_dim       )
        a__	:  Tuple     =   num_hidden_layers
        a__	:  Optional[Any]     =   intermediate_size
        a__	:  Tuple     =   hidden_act
        a__	:  Optional[Any]     =   num_attention_heads
        a__	:  int     =   hidden_dropout
        a__	:  Optional[int]     =   attention_dropout
        a__	:  Dict     =   activation_dropout
        a__	:  Optional[Any]     =   feat_proj_dropout
        a__	:  str     =   final_dropout
        a__	:  List[Any]     =   layerdrop
        a__	:  Any     =   layer_norm_eps
        a__	:  str     =   initializer_range
        a__	:  Dict     =   vocab_size
        a__	:  Tuple     =   num_clusters
        a__	:  Dict     =   do_stable_layer_norm
        a__	:  Dict     =   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__	:  List[str]     =   apply_spec_augment
        a__	:  Optional[Any]     =   mask_time_prob
        a__	:  str     =   mask_time_length
        a__	:  Optional[Any]     =   mask_time_min_masks
        a__	:  List[str]     =   mask_feature_prob
        a__	:  Optional[Any]     =   mask_feature_length
        a__	:  str     =   mask_feature_min_masks

        # parameters for pretraining with codevector quantized representations
        a__	:  List[str]     =   num_codevectors_per_group
        a__	:  int     =   num_codevector_groups
        a__	:  str     =   contrastive_logits_temperature
        a__	:  List[str]     =   feat_quantizer_dropout
        a__	:  int     =   num_negatives
        a__	:  Tuple     =   codevector_dim
        a__	:  Tuple     =   proj_codevector_dim
        a__	:  List[str]     =   diversity_loss_weight

        # ctc loss
        a__	:  Dict     =   ctc_loss_reduction
        a__	:  Optional[Any]     =   ctc_zero_infinity

        # SequenceClassification-specific parameter. Feel free to ignore for other classes.
        a__	:  List[str]     =   classifier_proj_size

        # XVector-specific parameters. Feel free to ignore for other classes.
        a__	:  Union[str, Any]     =   list(lowerCamelCase__       )
        a__	:  Any     =   list(lowerCamelCase__       )
        a__	:  List[str]     =   list(lowerCamelCase__       )
        a__	:  Any     =   xvector_output_dim

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


"""simple docstring"""



def 	_lowerCamelCase(	a = 1   ,    a = 1_0_0_0				):
       __a       =    1
       __a       =    0

       for divide_by_number in range(a   ,    digit + 1				):
              __a       =    []
              __a       =    numerator
              for _ in range(1   ,    digit + 1				):
                     if now_divide in has_been_divided:
                            if longest_list_length < len(a				):
                                   __a       =    len(a				)
                                   __a       =    divide_by_number
                     else:
                            has_been_divided.append(a				)
                            __a       =    now_divide * 1_0 % divide_by_number

       return the_digit


# Tests
if __name__ == "__main__":
   import doctest

   doctest.testmod()
