
"""simple docstring"""




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


A__      :	Optional[int]          =    logging.get_logger(__name__)

A__      :	Any          =    {
    """speechbrain/m-ctc-t-large""": """https://huggingface.co/speechbrain/m-ctc-t-large/resolve/main/config.json""",
    # See all M-CTC-T models at https://huggingface.co/models?filter=mctct
}







class   _lowercase						(       lowercase__				):


     '''simple docstring'''





     _A								=							'mctct'



     def __init__(      self ,			__UpperCamelCase=80_65 ,			__UpperCamelCase=15_36 ,			__UpperCamelCase=36 ,			__UpperCamelCase=61_44 ,			__UpperCamelCase=4 ,			__UpperCamelCase=3_84 ,			__UpperCamelCase=9_20 ,			__UpperCamelCase=1E-5 ,			__UpperCamelCase=0.3 ,			__UpperCamelCase="relu" ,			__UpperCamelCase=0.02 ,			__UpperCamelCase=0.3 ,			__UpperCamelCase=0.3 ,			__UpperCamelCase=1 ,			__UpperCamelCase=0 ,			__UpperCamelCase=2 ,			__UpperCamelCase=1 ,			__UpperCamelCase=0.3 ,			__UpperCamelCase=1 ,			__UpperCamelCase=(7,) ,			__UpperCamelCase=(3,) ,			__UpperCamelCase=80 ,			__UpperCamelCase=1 ,			__UpperCamelCase=None ,			__UpperCamelCase="sum" ,			__UpperCamelCase=False ,			**__UpperCamelCase ,			)->					Union[str, Any]:
          super().__init__(**UpperCAmelCase__ ,			pad_token_id=UpperCAmelCase__ ,			bos_token_id=UpperCAmelCase__ ,			eos_token_id=UpperCAmelCase__  )
          UpperCAmelCase__							: str 							=						vocab_size
          UpperCAmelCase__							: int 							=						hidden_size
          UpperCAmelCase__							: Union[str, Any] 							=						num_hidden_layers
          UpperCAmelCase__							: Optional[Any] 							=						intermediate_size
          UpperCAmelCase__							: Tuple 							=						num_attention_heads
          UpperCAmelCase__							: Tuple 							=						attention_head_dim
          UpperCAmelCase__							: str 							=						max_position_embeddings
          UpperCAmelCase__							: str 							=						layer_norm_eps
          UpperCAmelCase__							: int 							=						layerdrop
          UpperCAmelCase__							: Dict 							=						hidden_act
          UpperCAmelCase__							: List[str] 							=						initializer_range
          UpperCAmelCase__							: Optional[Any] 							=						hidden_dropout_prob
          UpperCAmelCase__							: Dict 							=						attention_probs_dropout_prob
          UpperCAmelCase__							: Dict 							=						pad_token_id
          UpperCAmelCase__							: Union[str, Any] 							=						bos_token_id
          UpperCAmelCase__							: Optional[int] 							=						eos_token_id
          UpperCAmelCase__							: Optional[Any] 							=						conv_glu_dim
          UpperCAmelCase__							: Any 							=						conv_dropout
          UpperCAmelCase__							: int 							=						num_conv_layers
          UpperCAmelCase__							: Optional[Any] 							=						input_feat_per_channel
          UpperCAmelCase__							: Optional[int] 							=						input_channels
          UpperCAmelCase__							: List[str] 							=						conv_channels
          UpperCAmelCase__							: Optional[Any] 							=						ctc_loss_reduction
          UpperCAmelCase__							: Optional[Any] 							=						ctc_zero_infinity

          # prevents config testing fail with exporting to json
          UpperCAmelCase__							: Optional[int] 							=						list(UpperCAmelCase__  )
          UpperCAmelCase__							: Optional[Any] 							=						list(UpperCAmelCase__  )

          if len(self.conv_kernel  ) != self.num_conv_layers:
               raise ValueError(
                   "Configuration for convolutional module is incorrect. "
                   "It is required that `len(config.conv_kernel)` == `config.num_conv_layers` "
                   F"but is `len(config.conv_kernel) = {len(self.conv_kernel  )}`, "
                   F"`config.num_conv_layers = {self.num_conv_layers}`."  )


"""simple docstring"""




from timeit import timeit



def 							a__ (				lowerCAmelCase	:       int		):






     '''simple docstring'''
     if number < 0:
          raise ValueError("the value of input must not be negative"		)
     UpperCAmelCase__							: Tuple 							=						0
     while number:
          number &= number - 1
          result += 1
     return result



def 							a__ (				lowerCAmelCase	:       int		):






     '''simple docstring'''
     if number < 0:
          raise ValueError("the value of input must not be negative"		)
     UpperCAmelCase__							: Union[str, Any] 							=						0
     while number:
          if number % 2 == 1:
               result += 1
          number >>= 1
     return result



def 							a__ (				):






     '''simple docstring'''

     def do_benchmark(lowerCAmelCase	:       int		) -> None:
          UpperCAmelCase__							: Dict 							=						"import __main__ as z"
          print(F"Benchmark when {number = }:"		)
          print(F"{get_set_bits_count_using_modulo_operator(lowerCAmelCase		) = }"		)
          UpperCAmelCase__							: Tuple 							=						timeit("z.get_set_bits_count_using_modulo_operator(25)"       ,    setup=lowerCAmelCase		)
          print(F"timeit() runs in {timing} seconds"		)
          print(F"{get_set_bits_count_using_brian_kernighans_algorithm(lowerCAmelCase		) = }"		)
          UpperCAmelCase__							: Any 							=						timeit(
              "z.get_set_bits_count_using_brian_kernighans_algorithm(25)"       ,    setup=lowerCAmelCase       ,    )
          print(F"timeit() runs in {timing} seconds"		)

     for number in (25, 37, 58, 0):
          do_benchmark(lowerCAmelCase		)
          print()


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    benchmark()



