NnetExample is the input data and corresponding label (or labels) for one or more frames of input, used for standard cross-entropy training of neural nets (and possibly for other objective functions). More...
#include <nnet-example.h>
Public Member Functions | |
void | Write (std::ostream &os, bool binary) const |
void | Read (std::istream &is, bool binary) |
NnetExample () | |
NnetExample (const NnetExample &other) | |
void | Swap (NnetExample *other) |
void | Compress () |
Compresses any (input) features that are not sparse. More... | |
bool | operator== (const NnetExample &other) const |
Caution: this operator == is not very efficient. More... | |
Public Attributes | |
std::vector< NnetIo > | io |
"io" contains the input and output. More... | |
NnetExample is the input data and corresponding label (or labels) for one or more frames of input, used for standard cross-entropy training of neural nets (and possibly for other objective functions).
Definition at line 111 of file nnet-example.h.
|
inline |
Definition at line 121 of file nnet-example.h.
|
inline |
Definition at line 123 of file nnet-example.h.
void Compress | ( | ) |
Compresses any (input) features that are not sparse.
Definition at line 130 of file nnet-example.cc.
Referenced by kaldi::nnet3::ProcessFile(), and kaldi::nnet3::WriteExamples().
|
inline |
Caution: this operator == is not very efficient.
It's only used in testing code.
Definition at line 132 of file nnet-example.h.
References NnetExample::io.
void Read | ( | std::istream & | is, |
bool | binary | ||
) |
Definition at line 116 of file nnet-example.cc.
References kaldi::nnet3::ExpectToken(), rnnlm::i, KALDI_ERR, NnetIo::Read(), and kaldi::ReadBasicType().
Referenced by kaldi::nnet3::UnitTestNnetExample().
|
inline |
Definition at line 125 of file nnet-example.h.
References NnetExample::io.
void Write | ( | std::ostream & | os, |
bool | binary | ||
) | const |
Definition at line 103 of file nnet-example.cc.
References rnnlm::i, KALDI_ASSERT, NnetIo::Write(), kaldi::WriteBasicType(), and kaldi::WriteToken().
Referenced by kaldi::nnet3::UnitTestNnetExample(), and kaldi::nnet3::UnitTestNnetMergeExamples().
std::vector<NnetIo> io |
"io" contains the input and output.
In principle there can be multiple types of both input and output, with different names. The order is irrelevant.
Definition at line 116 of file nnet-example.h.
Referenced by NnetLdaStatsAccumulator::AccStats(), NnetLdaStatsAccumulator::AccStatsFromOutput(), NnetComputerFromEg::Compute(), NnetComputeProb::Compute(), kaldi::nnet3::ContainsSingleExample(), kaldi::nnet3::ExampleApproxEqual(), kaldi::nnet3::FilterExample(), kaldi::nnet3::GenerateSimpleNnetTrainingExample(), kaldi::nnet3::GetComputationRequest(), kaldi::nnet3::GetNnetExampleSize(), main(), kaldi::nnet3::MergeChainExamples(), kaldi::nnet3::MergeDiscriminativeExamples(), kaldi::nnet3::MergeIo(), kaldi::nnet3::NumOutputIndexes(), NnetExampleStructureCompare::operator()(), NnetExample::operator==(), kaldi::nnet3::PerturbImageInNnetExample(), kaldi::nnet3::ProcessFile(), NnetComputeProb::ProcessOutputs(), NnetTrainer::ProcessOutputs(), kaldi::nnet3::RenameOutputs(), kaldi::nnet3::ScaleSupervisionWeight(), kaldi::nnet3::ShiftExampleTimes(), NnetExample::Swap(), NnetTrainer::TrainInternal(), NnetTrainer::TrainInternalBackstitch(), and kaldi::nnet3::WriteExamples().