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


a					:	Dict							=		logging.get_logger(__name__)

a					:	str							=		{
    '''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 		a_						( lowercase__	):
    a      :				int     =				'mctct'







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






        '''simple docstring'''






        super().__init__(**UpperCAmelCase__     ,					pad_token_id=UpperCAmelCase__     ,					bos_token_id=UpperCAmelCase__     ,					eos_token_id=UpperCAmelCase__     )
        _UpperCAmelCase          =   vocab_size
        _UpperCAmelCase          =   hidden_size
        _UpperCAmelCase          =   num_hidden_layers
        _UpperCAmelCase          =   intermediate_size
        _UpperCAmelCase          =   num_attention_heads
        _UpperCAmelCase          =   attention_head_dim
        _UpperCAmelCase          =   max_position_embeddings
        _UpperCAmelCase          =   layer_norm_eps
        _UpperCAmelCase          =   layerdrop
        _UpperCAmelCase          =   hidden_act
        _UpperCAmelCase          =   initializer_range
        _UpperCAmelCase          =   hidden_dropout_prob
        _UpperCAmelCase          =   attention_probs_dropout_prob
        _UpperCAmelCase          =   pad_token_id
        _UpperCAmelCase          =   bos_token_id
        _UpperCAmelCase          =   eos_token_id
        _UpperCAmelCase          =   conv_glu_dim
        _UpperCAmelCase          =   conv_dropout
        _UpperCAmelCase          =   num_conv_layers
        _UpperCAmelCase          =   input_feat_per_channel
        _UpperCAmelCase          =   input_channels
        _UpperCAmelCase          =   conv_channels
        _UpperCAmelCase          =   ctc_loss_reduction
        _UpperCAmelCase          =   ctc_zero_infinity

        # prevents config testing fail with exporting to json
        _UpperCAmelCase          =   list(UpperCAmelCase__     )
        _UpperCAmelCase          =   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 collections.abc import Callable

import numpy as np


def  _UpperCamelCase	(						_A					,      _A					,      _A					,      _A					,      _A      )    ->  np.array:





    """simple docstring"""

    _UpperCAmelCase          =   int(np.ceil((x_end - xa) / step_size      )      )
    _UpperCAmelCase          =   np.zeros((n + 1,)      )
    _UpperCAmelCase          =   ya
    _UpperCAmelCase          =   xa

    for k in range(_A      ):
        _UpperCAmelCase          =   y[k] + step_size * ode_func(_A					,      y[k]      )
        _UpperCAmelCase          =   y[k] + (
            (step_size / 2) * (ode_func(_A					,      y[k]      ) + ode_func(x + step_size					,      _A      ))
        )
        x += step_size

    return y


if __name__ == "__main__":
 import doctest

 doctest.testmod()