#include <train-nnet-ensemble.h>
Public Member Functions | |
NnetEnsembleTrainer (const NnetEnsembleTrainerConfig &config, std::vector< Nnet *> nnet_ensemble) | |
void | TrainOnExample (const NnetExample &value) |
TrainOnExample will take the example and add it to a buffer; if we've reached the minibatch size it will do the training. More... | |
~NnetEnsembleTrainer () | |
Private Member Functions | |
KALDI_DISALLOW_COPY_AND_ASSIGN (NnetEnsembleTrainer) | |
void | TrainOneMinibatch () |
void | BeginNewPhase (bool first_time) |
Private Attributes | |
NnetEnsembleTrainerConfig | config_ |
std::vector< Nnet * > | nnet_ensemble_ |
std::vector< NnetUpdater * > | updater_ensemble_ |
int32 | num_phases_ |
int32 | minibatches_seen_this_phase_ |
std::vector< NnetExample > | buffer_ |
double | beta_ |
double | avg_logprob_this_phase_ |
double | count_this_phase_ |
Definition at line 64 of file train-nnet-ensemble.h.
NnetEnsembleTrainer | ( | const NnetEnsembleTrainerConfig & | config, |
std::vector< Nnet *> | nnet_ensemble | ||
) |
Definition at line 34 of file train-nnet-ensemble.cc.
References NnetEnsembleTrainer::BeginNewPhase(), NnetEnsembleTrainerConfig::beta, NnetEnsembleTrainer::beta_, NnetEnsembleTrainer::config_, and NnetEnsembleTrainer::num_phases_.
~NnetEnsembleTrainer | ( | ) |
Definition at line 127 of file train-nnet-ensemble.cc.
References NnetEnsembleTrainer::BeginNewPhase(), NnetEnsembleTrainer::buffer_, KALDI_LOG, NnetEnsembleTrainer::minibatches_seen_this_phase_, and NnetEnsembleTrainer::TrainOneMinibatch().
|
private |
Definition at line 115 of file train-nnet-ensemble.cc.
References NnetEnsembleTrainer::avg_logprob_this_phase_, NnetEnsembleTrainer::count_this_phase_, KALDI_LOG, NnetEnsembleTrainer::minibatches_seen_this_phase_, and NnetEnsembleTrainer::num_phases_.
Referenced by NnetEnsembleTrainer::NnetEnsembleTrainer(), NnetEnsembleTrainer::TrainOneMinibatch(), and NnetEnsembleTrainer::~NnetEnsembleTrainer().
|
private |
|
private |
Definition at line 50 of file train-nnet-ensemble.cc.
References NnetEnsembleTrainer::avg_logprob_this_phase_, NnetEnsembleTrainer::BeginNewPhase(), NnetEnsembleTrainer::beta_, NnetEnsembleTrainer::buffer_, NnetEnsembleTrainer::config_, NnetEnsembleTrainer::count_this_phase_, rnnlm::i, CuMatrixBase< Real >::InvertElements(), KALDI_ASSERT, kaldi::nnet2::MakePair(), NnetEnsembleTrainerConfig::minibatches_per_phase, NnetEnsembleTrainer::minibatches_seen_this_phase_, CuMatrixBase< Real >::MulElements(), NnetEnsembleTrainer::nnet_ensemble_, and NnetEnsembleTrainer::updater_ensemble_.
Referenced by NnetEnsembleTrainer::TrainOnExample(), and NnetEnsembleTrainer::~NnetEnsembleTrainer().
void TrainOnExample | ( | const NnetExample & | value | ) |
TrainOnExample will take the example and add it to a buffer; if we've reached the minibatch size it will do the training.
Definition at line 44 of file train-nnet-ensemble.cc.
References NnetEnsembleTrainer::buffer_, NnetEnsembleTrainer::config_, NnetEnsembleTrainerConfig::minibatch_size, and NnetEnsembleTrainer::TrainOneMinibatch().
Referenced by main().
|
private |
Definition at line 96 of file train-nnet-ensemble.h.
Referenced by NnetEnsembleTrainer::BeginNewPhase(), and NnetEnsembleTrainer::TrainOneMinibatch().
|
private |
Definition at line 95 of file train-nnet-ensemble.h.
Referenced by NnetEnsembleTrainer::NnetEnsembleTrainer(), and NnetEnsembleTrainer::TrainOneMinibatch().
|
private |
Definition at line 92 of file train-nnet-ensemble.h.
Referenced by NnetEnsembleTrainer::TrainOneMinibatch(), NnetEnsembleTrainer::TrainOnExample(), and NnetEnsembleTrainer::~NnetEnsembleTrainer().
|
private |
Definition at line 84 of file train-nnet-ensemble.h.
Referenced by NnetEnsembleTrainer::NnetEnsembleTrainer(), NnetEnsembleTrainer::TrainOneMinibatch(), and NnetEnsembleTrainer::TrainOnExample().
|
private |
Definition at line 97 of file train-nnet-ensemble.h.
Referenced by NnetEnsembleTrainer::BeginNewPhase(), and NnetEnsembleTrainer::TrainOneMinibatch().
|
private |
Definition at line 91 of file train-nnet-ensemble.h.
Referenced by NnetEnsembleTrainer::BeginNewPhase(), NnetEnsembleTrainer::TrainOneMinibatch(), and NnetEnsembleTrainer::~NnetEnsembleTrainer().
|
private |
Definition at line 86 of file train-nnet-ensemble.h.
Referenced by NnetEnsembleTrainer::TrainOneMinibatch().
|
private |
Definition at line 90 of file train-nnet-ensemble.h.
Referenced by NnetEnsembleTrainer::BeginNewPhase(), and NnetEnsembleTrainer::NnetEnsembleTrainer().
|
private |
Definition at line 87 of file train-nnet-ensemble.h.
Referenced by NnetEnsembleTrainer::TrainOneMinibatch().