#include <nnet-example-utils.h>
Classes | |
struct | IntSet |
Public Member Functions | |
ExampleMergingConfig (const char *default_minibatch_size="256") | |
void | Register (OptionsItf *po) |
void | ComputeDerived () |
int32 | MinibatchSize (int32 size_of_eg, int32 num_available_egs, bool input_ended) const |
This function tells you what minibatch size should be used for this eg. More... | |
Public Attributes | |
bool | compress |
std::string | measure_output_frames |
std::string | minibatch_size |
std::string | discard_partial_minibatches |
Static Private Member Functions | |
static bool | ParseIntSet (const std::string &str, IntSet *int_set) |
Private Attributes | |
std::vector< std::pair< int32, IntSet > > | rules |
Definition at line 321 of file nnet-example-utils.h.
|
inline |
Definition at line 329 of file nnet-example-utils.h.
void ComputeDerived | ( | ) |
Definition at line 958 of file nnet-example-utils.cc.
References kaldi::ConvertStringToInteger(), rnnlm::i, kaldi::IsSortedAndUniq(), KALDI_ERR, KALDI_WARN, and kaldi::SplitStringToVector().
Referenced by main().
This function tells you what minibatch size should be used for this eg.
[in] | size_of_eg | The "size" of the eg, as obtained by GetNnetExampleSize() or a similar function (up to the caller). |
[in] | num_available_egs | The number of egs of this size that are currently available; should be >0. The value returned will be <= this value, possibly zero. |
[in] | input_ended | True if the input has ended, false otherwise. This is important because before the input has ended, we will only batch egs into the largest possible minibatch size among the range allowed for that size of eg. |
Definition at line 1017 of file nnet-example-utils.cc.
References rnnlm::i, KALDI_ASSERT, and KALDI_ERR.
Referenced by DiscriminativeExampleMerger::AcceptExample(), ChainExampleMerger::AcceptExample(), ExampleMerger::AcceptExample(), DiscriminativeExampleMerger::Finish(), ChainExampleMerger::Finish(), and ExampleMerger::Finish().
|
staticprivate |
Definition at line 936 of file nnet-example-utils.cc.
References rnnlm::i, ExampleMergingConfig::IntSet::largest_size, ExampleMergingConfig::IntSet::ranges, kaldi::SplitStringToIntegers(), and kaldi::SplitStringToVector().
|
inline |
Definition at line 335 of file nnet-example-utils.h.
References ExampleGenerationConfig::ComputeDerived(), and OptionsItf::Register().
Referenced by main().
bool compress |
Definition at line 324 of file nnet-example-utils.h.
Referenced by DiscriminativeExampleMerger::WriteMinibatch(), ChainExampleMerger::WriteMinibatch(), and ExampleMerger::WriteMinibatch().
std::string discard_partial_minibatches |
Definition at line 327 of file nnet-example-utils.h.
std::string measure_output_frames |
Definition at line 325 of file nnet-example-utils.h.
std::string minibatch_size |
Definition at line 326 of file nnet-example-utils.h.
Definition at line 410 of file nnet-example-utils.h.