
"""simple docstring"""




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


UpperCAmelCase__      :    str    							= logging.get_logger(__name__)

UpperCAmelCase__      :    int    							= {
    '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 	lowerCAmelCase_						(a__  ):


				"""simple docstring"""



				__UpperCamelCase      :						Optional[Any]					       =   '''mctct'''



				def __init__(self   ,       SCREAMING_SNAKE_CASE__=80_65   ,       SCREAMING_SNAKE_CASE__=15_36   ,       SCREAMING_SNAKE_CASE__=36   ,       SCREAMING_SNAKE_CASE__=61_44   ,       SCREAMING_SNAKE_CASE__=4   ,       SCREAMING_SNAKE_CASE__=3_84   ,       SCREAMING_SNAKE_CASE__=9_20   ,       SCREAMING_SNAKE_CASE__=1E-5   ,       SCREAMING_SNAKE_CASE__=0.3   ,       SCREAMING_SNAKE_CASE__="relu"   ,       SCREAMING_SNAKE_CASE__=0.02   ,       SCREAMING_SNAKE_CASE__=0.3   ,       SCREAMING_SNAKE_CASE__=0.3   ,       SCREAMING_SNAKE_CASE__=1   ,       SCREAMING_SNAKE_CASE__=0   ,       SCREAMING_SNAKE_CASE__=2   ,       SCREAMING_SNAKE_CASE__=1   ,       SCREAMING_SNAKE_CASE__=0.3   ,       SCREAMING_SNAKE_CASE__=1   ,       SCREAMING_SNAKE_CASE__=(7,)   ,       SCREAMING_SNAKE_CASE__=(3,)   ,       SCREAMING_SNAKE_CASE__=80   ,       SCREAMING_SNAKE_CASE__=1   ,       SCREAMING_SNAKE_CASE__=None   ,       SCREAMING_SNAKE_CASE__="sum"   ,       SCREAMING_SNAKE_CASE__=False   ,       **SCREAMING_SNAKE_CASE__   ,       )					->		str:



											"""simple docstring"""




											super().__init__(**SCREAMING_SNAKE_CASE__   ,       pad_token_id=SCREAMING_SNAKE_CASE__   ,       bos_token_id=SCREAMING_SNAKE_CASE__   ,       eos_token_id=SCREAMING_SNAKE_CASE__    )
											SCREAMING_SNAKE_CASE__						:       int           =   vocab_size
											SCREAMING_SNAKE_CASE__						:       Union[str, Any]           =   hidden_size
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   num_hidden_layers
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   intermediate_size
											SCREAMING_SNAKE_CASE__						:       Tuple           =   num_attention_heads
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   attention_head_dim
											SCREAMING_SNAKE_CASE__						:       str           =   max_position_embeddings
											SCREAMING_SNAKE_CASE__						:       Union[str, Any]           =   layer_norm_eps
											SCREAMING_SNAKE_CASE__						:       List[str]           =   layerdrop
											SCREAMING_SNAKE_CASE__						:       Any           =   hidden_act
											SCREAMING_SNAKE_CASE__						:       str           =   initializer_range
											SCREAMING_SNAKE_CASE__						:       str           =   hidden_dropout_prob
											SCREAMING_SNAKE_CASE__						:       Union[str, Any]           =   attention_probs_dropout_prob
											SCREAMING_SNAKE_CASE__						:       List[Any]           =   pad_token_id
											SCREAMING_SNAKE_CASE__						:       Any           =   bos_token_id
											SCREAMING_SNAKE_CASE__						:       List[Any]           =   eos_token_id
											SCREAMING_SNAKE_CASE__						:       Any           =   conv_glu_dim
											SCREAMING_SNAKE_CASE__						:       Tuple           =   conv_dropout
											SCREAMING_SNAKE_CASE__						:       Union[str, Any]           =   num_conv_layers
											SCREAMING_SNAKE_CASE__						:       Tuple           =   input_feat_per_channel
											SCREAMING_SNAKE_CASE__						:       Dict           =   input_channels
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   conv_channels
											SCREAMING_SNAKE_CASE__						:       List[str]           =   ctc_loss_reduction
											SCREAMING_SNAKE_CASE__						:       Any           =   ctc_zero_infinity

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

											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"""




def lowercase_  (   _snake_case						):
							if a < 0:
														raise ValueError("""Input value must be a positive integer"""						)
							elif isinstance(_snake_case   ,_snake_case						):
														raise TypeError("""Input value must be a 'int' type"""						)
							return bin(_snake_case						).count("""1"""						)


if __name__ == "__main__":
					import doctest

					doctest.testmod()




