#include <discriminative-supervision.h>
Public Member Functions | |
DiscriminativeSupervision () | |
DiscriminativeSupervision (const DiscriminativeSupervision &other) | |
bool | Initialize (const std::vector< int32 > &alignment, const Lattice &lat, BaseFloat weight) |
void | Swap (DiscriminativeSupervision *other) |
bool | operator== (const DiscriminativeSupervision &other) const |
void | Check () const |
int32 | NumFrames () const |
void | Write (std::ostream &os, bool binary) const |
void | Read (std::istream &is, bool binary) |
Public Attributes | |
BaseFloat | weight |
int32 | num_sequences |
int32 | frames_per_sequence |
std::vector< int32 > | num_ali |
Lattice | den_lat |
Definition at line 75 of file discriminative-supervision.h.
|
inline |
Definition at line 106 of file discriminative-supervision.h.
References fst::operator==().
DiscriminativeSupervision | ( | const DiscriminativeSupervision & | other | ) |
Definition at line 28 of file discriminative-supervision.cc.
void Check | ( | ) | const |
Definition at line 124 of file discriminative-supervision.cc.
References DiscriminativeSupervision::den_lat, DiscriminativeSupervision::frames_per_sequence, KALDI_ASSERT, kaldi::LatticeStateTimes(), DiscriminativeSupervision::num_ali, and DiscriminativeSupervision::num_sequences.
Referenced by DiscriminativeSupervisionSplitter::GetFrameRange(), DiscriminativeSupervision::Initialize(), and kaldi::discriminative::MergeSupervision().
Definition at line 105 of file discriminative-supervision.cc.
References DiscriminativeSupervision::Check(), DiscriminativeSupervision::den_lat, DiscriminativeSupervision::frames_per_sequence, KALDI_ASSERT, DiscriminativeSupervision::num_ali, DiscriminativeSupervision::num_sequences, and DiscriminativeSupervision::weight.
Referenced by main().
|
inline |
Definition at line 129 of file discriminative-supervision.h.
bool operator== | ( | const DiscriminativeSupervision & | other | ) | const |
Definition at line 42 of file discriminative-supervision.cc.
References DiscriminativeSupervision::den_lat, DiscriminativeSupervision::frames_per_sequence, DiscriminativeSupervision::num_ali, DiscriminativeSupervision::num_sequences, and DiscriminativeSupervision::weight.
void Read | ( | std::istream & | is, |
bool | binary | ||
) |
Definition at line 75 of file discriminative-supervision.cc.
References DiscriminativeSupervision::den_lat, kaldi::ExpectToken(), DiscriminativeSupervision::frames_per_sequence, KALDI_ASSERT, KALDI_ERR, DiscriminativeSupervision::num_ali, DiscriminativeSupervision::num_sequences, kaldi::ReadBasicType(), kaldi::ReadIntegerVector(), kaldi::ReadLattice(), and DiscriminativeSupervision::weight.
Referenced by NnetDiscriminativeSupervision::Read().
void Swap | ( | DiscriminativeSupervision * | other | ) |
Definition at line 34 of file discriminative-supervision.cc.
References DiscriminativeSupervision::den_lat, DiscriminativeSupervision::frames_per_sequence, DiscriminativeSupervision::num_ali, DiscriminativeSupervision::num_sequences, kaldi::swap(), and DiscriminativeSupervision::weight.
Referenced by kaldi::nnet3::MergeSupervision(), and NnetDiscriminativeSupervision::Swap().
void Write | ( | std::ostream & | os, |
bool | binary | ||
) | const |
Definition at line 51 of file discriminative-supervision.cc.
References DiscriminativeSupervision::den_lat, DiscriminativeSupervision::frames_per_sequence, KALDI_ASSERT, KALDI_ERR, DiscriminativeSupervision::num_ali, DiscriminativeSupervision::num_sequences, DiscriminativeSupervision::weight, kaldi::WriteBasicType(), kaldi::WriteIntegerVector(), kaldi::WriteLattice(), and kaldi::WriteToken().
Referenced by NnetDiscriminativeSupervision::Write().
Lattice den_lat |
Definition at line 104 of file discriminative-supervision.h.
Referenced by DiscriminativeSupervision::Check(), DiscriminativeComputation::DiscriminativeComputation(), DiscriminativeSupervisionSplitter::DiscriminativeSupervisionSplitter(), DiscriminativeSupervisionSplitter::GetFrameRange(), DiscriminativeSupervision::Initialize(), kaldi::discriminative::MergeSupervision(), DiscriminativeSupervision::operator==(), DiscriminativeSupervision::Read(), DiscriminativeSupervision::Swap(), and DiscriminativeSupervision::Write().
int32 frames_per_sequence |
Definition at line 91 of file discriminative-supervision.h.
Referenced by DiscriminativeSupervision::Check(), NnetDiscriminativeSupervision::CheckDim(), DiscriminativeComputation::Compute(), DiscriminativeSupervisionSplitter::DiscriminativeSupervisionSplitter(), DiscriminativeSupervisionSplitter::GetFrameRange(), DiscriminativeSupervision::Initialize(), DiscriminativeComputation::LookupNnetOutput(), kaldi::discriminative::MergeSupervision(), NnetDiscriminativeSupervision::NnetDiscriminativeSupervision(), DiscriminativeSupervision::operator==(), kaldi::nnet3::ProcessFile(), DiscriminativeComputation::ProcessPosteriors(), DiscriminativeSupervision::Read(), DiscriminativeSupervision::Swap(), and DiscriminativeSupervision::Write().
std::vector<int32> num_ali |
Definition at line 97 of file discriminative-supervision.h.
Referenced by DiscriminativeSupervision::Check(), DiscriminativeComputation::Compute(), DiscriminativeComputation::ComputeObjfAndDeriv(), DiscriminativeSupervisionSplitter::GetFrameRange(), DiscriminativeSupervision::Initialize(), DiscriminativeComputation::LookupNnetOutput(), kaldi::discriminative::MergeSupervision(), DiscriminativeSupervision::operator==(), DiscriminativeSupervision::Read(), DiscriminativeSupervision::Swap(), and DiscriminativeSupervision::Write().
int32 num_sequences |
Definition at line 85 of file discriminative-supervision.h.
Referenced by DiscriminativeSupervision::Check(), NnetDiscriminativeSupervision::CheckDim(), DiscriminativeComputation::Compute(), DiscriminativeSupervisionSplitter::DiscriminativeSupervisionSplitter(), DiscriminativeSupervisionSplitter::GetFrameRange(), DiscriminativeSupervision::Initialize(), DiscriminativeComputation::LookupNnetOutput(), kaldi::discriminative::MergeSupervision(), NnetDiscriminativeSupervision::NnetDiscriminativeSupervision(), DiscriminativeSupervision::operator==(), kaldi::nnet3::ProcessFile(), DiscriminativeComputation::ProcessPosteriors(), DiscriminativeSupervision::Read(), DiscriminativeSupervision::Swap(), and DiscriminativeSupervision::Write().
BaseFloat weight |
Definition at line 79 of file discriminative-supervision.h.
Referenced by DiscriminativeComputation::Compute(), DiscriminativeSupervisionSplitter::GetFrameRange(), DiscriminativeSupervision::Initialize(), kaldi::discriminative::MergeSupervision(), DiscriminativeSupervision::operator==(), DiscriminativeComputation::ProcessPosteriors(), DiscriminativeSupervision::Read(), DiscriminativeSupervision::Swap(), and DiscriminativeSupervision::Write().