#include <discriminative-training.h>
Public Member Functions | |
void | Print (const std::string &criterion, bool print_avg_gradients=false, bool print_avg_output=false) const |
void | PrintAll (const std::string &criterion) const |
void | PrintAvgGradientForPdf (int32 pdf_id) const |
void | Add (const DiscriminativeObjectiveInfo &other) |
double | TotalObjf (const std::string &criterion) const |
bool | AccumulateGradients () const |
bool | AccumulateOutput () const |
DiscriminativeObjectiveInfo () | |
DiscriminativeObjectiveInfo (int32 num_pdfs) | |
DiscriminativeObjectiveInfo (const DiscriminativeOptions &opts) | |
void | Reset () |
void | Configure (const DiscriminativeOptions &opts) |
Public Attributes | |
double | tot_t |
double | tot_t_weighted |
double | tot_objf |
double | tot_num_count |
double | tot_den_count |
double | tot_num_objf |
double | tot_l2_term |
bool | accumulate_gradients |
bool | accumulate_output |
int32 | num_pdfs |
CuVector< double > | gradients |
CuVector< double > | output |
Definition at line 130 of file discriminative-training.h.
Definition at line 28 of file discriminative-training.cc.
DiscriminativeObjectiveInfo | ( | int32 | num_pdfs | ) |
Definition at line 32 of file discriminative-training.cc.
References DiscriminativeObjectiveInfo::gradients, DiscriminativeObjectiveInfo::output, DiscriminativeObjectiveInfo::Reset(), and CuVector< Real >::Resize().
DiscriminativeObjectiveInfo | ( | const DiscriminativeOptions & | opts | ) |
Definition at line 42 of file discriminative-training.cc.
References DiscriminativeObjectiveInfo::gradients, DiscriminativeOptions::num_pdfs, DiscriminativeObjectiveInfo::output, DiscriminativeObjectiveInfo::Reset(), and CuVector< Real >::Resize().
|
inline |
Definition at line 188 of file discriminative-training.h.
References CuVectorBase< Real >::Dim().
Referenced by DiscriminativeComputation::Compute().
|
inline |
Definition at line 195 of file discriminative-training.h.
References kaldi::discriminative::ComputeDiscriminativeObjfAndDeriv(), and CuVectorBase< Real >::Dim().
Referenced by DiscriminativeComputation::Compute().
void Add | ( | const DiscriminativeObjectiveInfo & | other | ) |
Definition at line 560 of file discriminative-training.cc.
References DiscriminativeObjectiveInfo::gradients, DiscriminativeObjectiveInfo::output, DiscriminativeObjectiveInfo::tot_den_count, DiscriminativeObjectiveInfo::tot_l2_term, DiscriminativeObjectiveInfo::tot_num_count, DiscriminativeObjectiveInfo::tot_num_objf, DiscriminativeObjectiveInfo::tot_objf, DiscriminativeObjectiveInfo::tot_t, and DiscriminativeObjectiveInfo::tot_t_weighted.
Referenced by DiscriminativeComputation::Compute().
void Configure | ( | const DiscriminativeOptions & | opts | ) |
Definition at line 66 of file discriminative-training.cc.
References DiscriminativeOptions::accumulate_gradients, DiscriminativeObjectiveInfo::accumulate_gradients, DiscriminativeOptions::accumulate_output, DiscriminativeObjectiveInfo::accumulate_output, DiscriminativeObjectiveInfo::gradients, DiscriminativeOptions::num_pdfs, DiscriminativeObjectiveInfo::num_pdfs, DiscriminativeObjectiveInfo::output, and CuVector< Real >::Resize().
void Print | ( | const std::string & | criterion, |
bool | print_avg_gradients = false , |
||
bool | print_avg_output = false |
||
) | const |
Definition at line 577 of file discriminative-training.cc.
References KALDI_LOG, KALDI_VLOG, and VectorBase< Real >::Scale().
Referenced by DiscriminativeComputation::Compute().
|
inline |
Definition at line 169 of file discriminative-training.h.
References fst::Print().
Referenced by DiscriminativeComputation::Compute(), and NnetDiscriminativeComputeObjf::PrintTotalStats().
void PrintAvgGradientForPdf | ( | int32 | pdf_id | ) | const |
Definition at line 632 of file discriminative-training.cc.
References KALDI_LOG.
void Reset | ( | ) |
Definition at line 53 of file discriminative-training.cc.
References DiscriminativeObjectiveInfo::gradients, DiscriminativeObjectiveInfo::output, CuVectorBase< Real >::SetZero(), DiscriminativeObjectiveInfo::tot_den_count, DiscriminativeObjectiveInfo::tot_l2_term, DiscriminativeObjectiveInfo::tot_num_count, DiscriminativeObjectiveInfo::tot_num_objf, DiscriminativeObjectiveInfo::tot_objf, DiscriminativeObjectiveInfo::tot_t, and DiscriminativeObjectiveInfo::tot_t_weighted.
Referenced by DiscriminativeComputation::Compute(), and DiscriminativeObjectiveInfo::DiscriminativeObjectiveInfo().
|
inline |
Definition at line 180 of file discriminative-training.h.
Referenced by DiscriminativeComputation::Compute(), and NnetDiscriminativeComputeObjf::PrintTotalStats().
bool accumulate_gradients |
Definition at line 148 of file discriminative-training.h.
Referenced by DiscriminativeObjectiveInfo::Configure().
bool accumulate_output |
Definition at line 151 of file discriminative-training.h.
Referenced by DiscriminativeObjectiveInfo::Configure().
CuVector<double> gradients |
int32 num_pdfs |
Definition at line 155 of file discriminative-training.h.
Referenced by DiscriminativeObjectiveInfo::Configure().
CuVector<double> output |
double tot_den_count |
Definition at line 136 of file discriminative-training.h.
Referenced by DiscriminativeObjectiveInfo::Add(), DiscriminativeComputation::Compute(), and DiscriminativeObjectiveInfo::Reset().
double tot_l2_term |
Definition at line 140 of file discriminative-training.h.
Referenced by DiscriminativeObjectiveInfo::Add(), DiscriminativeComputation::Compute(), NnetDiscriminativeComputeObjf::PrintTotalStats(), and DiscriminativeObjectiveInfo::Reset().
double tot_num_count |
Definition at line 135 of file discriminative-training.h.
Referenced by DiscriminativeObjectiveInfo::Add(), DiscriminativeComputation::Compute(), and DiscriminativeObjectiveInfo::Reset().
double tot_num_objf |
Definition at line 137 of file discriminative-training.h.
Referenced by DiscriminativeObjectiveInfo::Add(), DiscriminativeComputation::Compute(), and DiscriminativeObjectiveInfo::Reset().
double tot_objf |
Definition at line 133 of file discriminative-training.h.
Referenced by DiscriminativeObjectiveInfo::Add(), DiscriminativeComputation::Compute(), NnetDiscriminativeComputeObjf::ProcessOutputs(), NnetDiscriminativeTrainer::ProcessOutputs(), and DiscriminativeObjectiveInfo::Reset().
double tot_t |
Definition at line 131 of file discriminative-training.h.
Referenced by DiscriminativeObjectiveInfo::Add(), DiscriminativeComputation::Compute(), and DiscriminativeObjectiveInfo::Reset().
double tot_t_weighted |
Definition at line 132 of file discriminative-training.h.
Referenced by DiscriminativeObjectiveInfo::Add(), DiscriminativeComputation::Compute(), NnetDiscriminativeComputeObjf::PrintTotalStats(), NnetDiscriminativeComputeObjf::ProcessOutputs(), NnetDiscriminativeTrainer::ProcessOutputs(), and DiscriminativeObjectiveInfo::Reset().