espnet2.asr.transducer.rnnt_multi_blank.utils.rnnt_helper.exponential
Less than 1 minute
espnet2.asr.transducer.rnnt_multi_blank.utils.rnnt_helper.exponential
espnet2.asr.transducer.rnnt_multi_blank.utils.rnnt_helper.exponential(x)
Compute the exponential of a given value.
This function calculates the exponential of the input value x using the mathematical constant e. It is designed to be used in a CUDA kernel, allowing for efficient computation on the GPU.
- Parameters:x (float) – The input value for which the exponential is to be computed.
- Returns: The exponential of the input value x, calculated as : e^x.
- Return type: float
Examples
>>> result = exponential(1.0)
>>> print(result) # Output: 2.718281828459045
>>> result = exponential(0.0)
>>> print(result) # Output: 1.0
>>> result = exponential(-1.0)
>>> print(result) # Output: 0.36787944117144233
NOTE
This function should only be called within a CUDA kernel context.