full-gmm-normal.h
Go to the documentation of this file.
1 // gmm/full-gmm-normal.h
2 
3 // Copyright 2009-2011 Microsoft Corporation; Saarland University;
4 // Yanmin Qian
5 // Univ. Erlangen-Nuremberg, Korbinian Riedhammer
6 
7 // See ../../COPYING for clarification regarding multiple authors
8 //
9 // Licensed under the Apache License, Version 2.0 (the "License");
10 // you may not use this file except in compliance with the License.
11 // You may obtain a copy of the License at
12 //
13 // http://www.apache.org/licenses/LICENSE-2.0
14 //
15 // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 // KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
17 // WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
18 // MERCHANTABLITY OR NON-INFRINGEMENT.
19 // See the Apache 2 License for the specific language governing permissions and
20 // limitations under the License.
21 
22 #ifndef KALDI_GMM_FULL_GMM_NORMAL_H_
23 #define KALDI_GMM_FULL_GMM_NORMAL_H_ 1
24 
25 #include <vector>
26 
27 #include "base/kaldi-common.h"
28 #include "gmm/model-common.h"
29 #include "gmm/full-gmm.h"
30 #include "matrix/matrix-lib.h"
31 
32 namespace kaldi {
33 
34 class FullGmm;
35 
46  public:
49 
50  explicit FullGmmNormal(const FullGmm &gmm) {
51  CopyFromFullGmm(gmm);
52  }
53 
55  void Resize(int32 nMix, int32 dim);
56 
58  void CopyFromFullGmm(const FullGmm &fullgmm);
59 
61  void CopyToFullGmm(FullGmm *fullgmm, GmmFlagsType flags = kGmmAll);
62 
64  void Rand(MatrixBase<BaseFloat> *feats);
65 
68  std::vector<SpMatrix<double> > vars_;
69 
71 };
72 
73 } // End namespace kaldi
74 
75 #endif // KALDI_GMM_FULL_GMM_NORMAL_H_
void Resize(int32 nMix, int32 dim)
Resizes arrays to this dim. Does not initialize data.
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
Definition for Gaussian Mixture Model with full covariances in normal mode: where the parameters are ...
Base class which provides matrix operations not involving resizing or allocation. ...
Definition: kaldi-matrix.h:49
Definition for Gaussian Mixture Model with full covariances.
Definition: full-gmm.h:40
kaldi::int32 int32
uint16 GmmFlagsType
Bitwise OR of the above flags.
Definition: model-common.h:35
FullGmmNormal(const FullGmm &gmm)
std::vector< SpMatrix< double > > vars_
covariances
Vector< double > weights_
weights (not log).
KALDI_DISALLOW_COPY_AND_ASSIGN(FullGmmNormal)
void Rand(MatrixBase< BaseFloat > *feats)
Generates random features from the model.
void CopyToFullGmm(FullGmm *fullgmm, GmmFlagsType flags=kGmmAll)
Copies to FullGmm.
FullGmmNormal()
Empty constructor.
Matrix< double > means_
Means.
void CopyFromFullGmm(const FullGmm &fullgmm)
Copies from given FullGmm.