nnet-precondition.h
Go to the documentation of this file.
1 // nnet2/nnet-precondition.h
2 
3 // Copyright 2012 Johns Hopkins University (author: Daniel Povey)
4 
5 // See ../../COPYING for clarification regarding multiple authors
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 // http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
15 // WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
16 // MERCHANTABLITY OR NON-INFRINGEMENT.
17 // See the Apache 2 License for the specific language governing permissions and
18 // limitations under the License.
19 
20 #ifndef KALDI_NNET2_NNET_PRECONDITION_H_
21 #define KALDI_NNET2_NNET_PRECONDITION_H_
22 
23 #include "base/kaldi-common.h"
24 #include "matrix/matrix-lib.h"
26 
27 #include <iostream>
28 
29 namespace kaldi {
30 namespace nnet2 {
31 
32 
59 void PreconditionDirections(const CuMatrixBase<BaseFloat> &R,
60  double lambda,
61  CuMatrixBase<BaseFloat> *P);
62 
68  const CuMatrixBase<BaseFloat> &R,
69  double alpha,
70  CuMatrixBase<BaseFloat> *P);
71 
78  const CuMatrixBase<BaseFloat> &R,
79  double alpha,
80  CuMatrixBase<BaseFloat> *P);
81 
82 
83 
84 } // namespace nnet2
85 } // namespace kaldi
86 
87 
88 #endif
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
void PreconditionDirectionsAlpha(const CuMatrixBase< BaseFloat > &R, double alpha, CuMatrixBase< BaseFloat > *P)
This wrapper for PreconditionDirections computes lambda using = /(N D) trace(R^T, R), and calls PreconditionDirections.
void PreconditionDirections(const CuMatrixBase< BaseFloat > &R, double lambda, CuMatrixBase< BaseFloat > *P)
See below for comment.
void PreconditionDirectionsAlphaRescaled(const CuMatrixBase< BaseFloat > &R, double alpha, CuMatrixBase< BaseFloat > *P)
This wrapper for PreconditionDirections computes lambda using = /(N D) trace(R^T, R), and calls PreconditionDirections.