
"""simple docstring"""






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


lowerCamelCase__ :       str						     =			logging.get_logger(__name__)

lowerCamelCase__ :       Optional[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__(				_UpperCAmelCase   ):
	'''simple docstring'''

	UpperCamelCase				=  """mctct"""





	def __init__(						self    :str		, lowerCamelCase_    :Dict=80_65		, lowerCamelCase_    :Optional[Any]=15_36		, lowerCamelCase_    :int=36		, lowerCamelCase_    :List[str]=61_44		, lowerCamelCase_    :Optional[int]=4		, lowerCamelCase_    :Tuple=3_84		, lowerCamelCase_    :str=9_20		, lowerCamelCase_    :List[str]=1E-5		, lowerCamelCase_    :Optional[int]=0.3		, lowerCamelCase_    :str="relu"		, lowerCamelCase_    :Optional[Any]=0.0_2		, lowerCamelCase_    :str=0.3		, lowerCamelCase_    :Union[str, Any]=0.3		, lowerCamelCase_    :Optional[Any]=1		, lowerCamelCase_    :Union[str, Any]=0		, lowerCamelCase_    :str=2		, lowerCamelCase_    :Union[str, Any]=1		, lowerCamelCase_    :Union[str, Any]=0.3		, lowerCamelCase_    :List[Any]=1		, lowerCamelCase_    :Optional[int]=(7,)		, lowerCamelCase_    :List[str]=(3,)		, lowerCamelCase_    :Dict=80		, lowerCamelCase_    :Union[str, Any]=1		, lowerCamelCase_    :Any=None		, lowerCamelCase_    :str="sum"		, lowerCamelCase_    :List[Any]=False		, **lowerCamelCase_    :Tuple		, )							->			Any:







			'''simple docstring'''




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

			# prevents config testing fail with exporting to json
			SCREAMING_SNAKE_CASE       :     Dict				= list(lowerCamelCase_					)
			SCREAMING_SNAKE_CASE       :     Optional[int]				= list(lowerCamelCase_					)

			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 __A						(   a_ :							list		,		a_ :							int		,		a_ :							int = 0		,		a_ :							int = 0     )->							int:




		'''simple docstring'''






		SCREAMING_SNAKE_CASE       :     str				= right or len(a_     ) - 1
		if left > right:
				return -1
		elif list_data[left] == key:
				return left
		elif list_data[right] == key:
				return right
		else:
				return search(a_		,		a_		,		left + 1		,		right - 1     )


if __name__ == "__main__":
					import doctest

					doctest.testmod()





