cu-math.h File Reference
Include dependency graph for cu-math.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 kaldi
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for mispronunciations detection tasks, the reference:
 
 kaldi::cu
 

Functions

template<typename Real >
void RegularizeL1 (CuMatrixBase< Real > *weight, CuMatrixBase< Real > *gradient, Real l1_penalty, Real learning_rate)
 RegularizeL1 is a gradient step with l1 regularization added to the gradient. More...
 
template<typename Real >
void Randomize (const CuMatrixBase< Real > &src, const CuArray< int32 > &copy_from_idx, CuMatrixBase< Real > *tgt)
 Copies a permutation of src into tgt. More...
 
template<typename Real >
void Splice (const CuMatrixBase< Real > &src, const CuArray< int32 > &frame_offsets, CuMatrixBase< Real > *tgt)
 Splice concatenates frames of src as specified in frame_offsets into tgt. More...
 
template<typename Real >
void Copy (const CuMatrixBase< Real > &src, const CuArray< int32 > &copy_from_indices, CuMatrixBase< Real > *tgt)
 Copies elements from src into tgt as given by copy_from_indices. More...
 
template<typename Real >
void EnsureNonzero (const CuMatrixBase< Real > &src, Real epsilon, CuMatrixBase< Real > *dest)
 This function requires that src and dest have the same dimension and epsilon > 0. More...
 
template<typename Real >
void EnsureNonzero (const CuVectorBase< Real > &src, Real epsilon, CuVectorBase< Real > *dest)
 Vector version of EnsureNonzero, see matrix version for documentation. More...
 
template<typename Real >
void ComputeLstmNonlinearity (const CuMatrixBase< Real > &input, const CuMatrixBase< Real > &params, CuMatrixBase< Real > *output)
 this is a special-purpose function used by class LstmNonlinearityComponent, to do its forward propagation. More...
 
template<typename Real >
void CpuComputeLstmNonlinearity (const MatrixBase< Real > &input_mat, const MatrixBase< Real > &params_mat, MatrixBase< Real > *output)
 
template<typename Real >
void BackpropLstmNonlinearity (const CuMatrixBase< Real > &input, const CuMatrixBase< Real > &params, const CuMatrixBase< Real > &output_deriv, const CuMatrixBase< double > &deriv_sum_in, const CuVectorBase< Real > &self_repair_config, double count_in, CuMatrixBase< Real > *input_deriv, CuMatrixBase< Real > *params_deriv, CuMatrixBase< double > *value_sum_out, CuMatrixBase< double > *deriv_sum_out, CuMatrixBase< Real > *self_repair_sum_out)
 This function does the 'backward' pass corresponding to the function ComputeLstmNonlinearity. More...
 
template<typename Real >
void CpuBackpropLstmNonlinearity (const MatrixBase< Real > &input, const MatrixBase< Real > &params, const MatrixBase< Real > &output_deriv, const MatrixBase< double > &deriv_sum_in, const VectorBase< Real > &self_repair_config, double count_in, MatrixBase< Real > *input_deriv, MatrixBase< Real > *params_deriv, MatrixBase< double > *value_sum_out, MatrixBase< double > *deriv_sum_out, MatrixBase< Real > *self_repair_sum_out)
 
template<typename Real >
void NormalizePerRow (const CuMatrixBase< Real > &in, const Real target_rms, const bool add_log_stddev, CuMatrixBase< Real > *out)
 Normalize nonlinearity modifies the vector of activations by scaling it so that the root-mean-square equals 1.0. More...
 
template<typename Real >
void DiffNormalizePerRow (const CuMatrixBase< Real > &in_value, const CuMatrixBase< Real > &out_deriv, const Real target_rms, const bool add_log_stddev, CuMatrixBase< Real > *in_deriv)