20 #ifndef KALDI_NNET3_NATURAL_GRADIENT_ONLINE_H_ 21 #define KALDI_NNET3_NATURAL_GRADIENT_ONLINE_H_ This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
static void InitOrthonormalSpecial(CuMatrixBase< BaseFloat > *R)
This function creates a matrix with orthonormal rows that is like the following matrix, except with each row normalized to have unit 2-norm: [ 1.1 0 1 0 1 0 0 1.1 0 1 0 1 ] The reason why the first element in each row is 1.1 and not 1, is for symmetry-breaking...
CuMatrix< BaseFloat > W_t_
BaseFloat Eta(int32 N) const
BaseFloat num_minibatches_history_
void InitDefault(int32 D)
void ReorthogonalizeRt1(const VectorBase< BaseFloat > &d_t1, BaseFloat rho_t1, CuMatrixBase< BaseFloat > *W_t1, CuMatrixBase< BaseFloat > *temp_W, CuMatrixBase< BaseFloat > *temp_O)
Base class which provides matrix operations not involving resizing or allocation. ...
void SetUpdatePeriod(int32 update_period)
void SetNumSamplesHistory(BaseFloat num_samples_history)
OnlineNaturalGradient & operator=(const OnlineNaturalGradient &other)
Keywords for search: natural gradient, naturalgradient, NG-SGD.
This class represents a matrix that's stored on the GPU if we have one, and in memory if not...
void ComputeWt1(int32 N, const VectorBase< BaseFloat > &d_t, const VectorBase< BaseFloat > &d_t1, BaseFloat rho_t, BaseFloat rho_t1, const MatrixBase< BaseFloat > &U_t, const VectorBase< BaseFloat > &sqrt_c_t, const VectorBase< BaseFloat > &inv_sqrt_e_t, const CuMatrixBase< BaseFloat > &W_t, CuMatrixBase< BaseFloat > *J_t, CuMatrixBase< BaseFloat > *W_t1) const
void PreconditionDirections(CuMatrixBase< BaseFloat > *X, BaseFloat *scale)
This call implements the main functionality of this class.
void ComputeEt(const VectorBase< BaseFloat > &d_t, BaseFloat beta_t, VectorBase< BaseFloat > *e_t, VectorBase< BaseFloat > *sqrt_e_t, VectorBase< BaseFloat > *inv_sqrt_e_t) const
void Swap(OnlineNaturalGradient *other)
void SetAlpha(BaseFloat alpha)
BaseFloat GetNumMinibatchesHistory() const
Matrix for CUDA computing.
A class representing a vector.
void ComputeZt(int32 N, BaseFloat rho_t, const VectorBase< BaseFloat > &d_t, const VectorBase< BaseFloat > &inv_sqrt_e_t, const MatrixBase< BaseFloat > &K_t, const MatrixBase< BaseFloat > &L_t, SpMatrix< double > *Z_t) const
void SetNumMinibatchesHistory(BaseFloat num_minibatches_history)
BaseFloat num_samples_history_
BaseFloat GetAlpha() const
Provides a vector abstraction class.
int32 GetUpdatePeriod() const
void Init(const CuMatrixBase< BaseFloat > &R0)
void PreconditionDirectionsInternal(const BaseFloat rho_t, const BaseFloat tr_X_Xt, bool updating, const Vector< BaseFloat > &d_t, CuMatrixBase< BaseFloat > *WJKL_t, CuMatrixBase< BaseFloat > *X_t)
BaseFloat GetNumSamplesHistory() const