21 #ifndef KALDI_TRANSFORM_FMPE_H_ 22 #define KALDI_TRANSFORM_FMPE_H_ 1 72 FmpeOptions(): context_expansion(
"0,1.0:-1,1.0:1,1.0:-2,0.5;-3,0.5:2,0.5;3,0.5:-4,0.5;-5,0.5:4,0.5;5,0.5:-6,0.333;-7,0.333;-8,0.333:6,0.333;7,0.333;8,0.333"),
76 opts->
Register(
"post-scale", &post_scale,
"Scaling constant on posterior " 77 "element of offset features, to give it a faster learning " 79 opts->
Register(
"context-expansion", &context_expansion,
"Specifies the " 80 "temporal context-splicing of high-dimensional features.");
84 void Write(std::ostream &os,
bool binary)
const;
85 void Read(std::istream &is,
bool binary);
96 opts->
Register(
"learning-rate", &learning_rate,
97 "Learning rate constant (like inverse of E in fMPE papers)");
98 opts->
Register(
"l2-weight", &l2_weight,
99 "Weight on l2 regularization term in objective function.");
107 void Init(
const Fmpe &fmpe);
110 void Write(std::ostream &os,
bool binary)
const;
111 void Read(std::istream &is,
bool binary,
bool add =
false);
161 const std::vector<std::vector<int32> > &gselect,
168 const std::vector<std::vector<int32> > &gselect,
176 void Write(std::ostream &os,
bool binary)
const;
177 void Read(std::istream &is,
bool binary);
184 void SetContexts(std::string context_str);
186 void ComputeStddevs();
190 const std::vector<std::vector<int32> > &gselect,
195 const std::vector<std::vector<int32> > &gselect,
242 std::vector<std::vector<std::pair<int32, BaseFloat> > >
contexts_;
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Matrix< BaseFloat > deriv
FmpeStats(const Fmpe &fmpe)
Base class which provides matrix operations not involving resizing or allocation. ...
void Register(OptionsItf *opts)
BaseFloat ComputeAmGmmFeatureDeriv(const AmDiagGmm &am_gmm, const TransitionModel &trans_model, const Posterior &posterior, const MatrixBase< BaseFloat > &features, Matrix< BaseFloat > *direct_deriv, const AccumAmDiagGmm *model_diff, Matrix< BaseFloat > *indirect_deriv)
Computes derivatives of the likelihood of these states (weighted), w.r.t.
Matrix< BaseFloat > projT_
std::string context_expansion
std::vector< std::vector< std::pair< int32, BaseFloat > > > contexts_
virtual void Register(const std::string &name, bool *ptr, const std::string &doc)=0
void Read(std::istream &is, bool binary)
std::vector< std::vector< std::pair< int32, BaseFloat > > > Posterior
Posterior is a typedef for storing acoustic-state (actually, transition-id) posteriors over an uttera...
int32 ProjectionTNumCols() const
void Register(OptionsItf *opts)
Packed symetric matrix class.
int32 NumContexts() const
Definition for Gaussian Mixture Model with diagonal covariances.
Matrix< BaseFloat > stddevs_
int32 ProjectionTNumRows() const
void ApplyCReverse(MatrixBase< BaseFloat > *deriv) const
Sub-matrix representation.
void Write(std::ostream &os, bool binary) const