#include <discriminative-supervision.h>
Classes | |
struct | LatticeInfo |
Public Types | |
typedef fst::ArcTpl< LatticeWeight > | LatticeArc |
typedef fst::VectorFst< LatticeArc > | Lattice |
Public Member Functions | |
DiscriminativeSupervisionSplitter (const SplitDiscriminativeSupervisionOptions &config, const TransitionModel &tmodel, const DiscriminativeSupervision &supervision) | |
void | GetFrameRange (int32 begin_frame, int32 frames_per_sequence, bool normalize, DiscriminativeSupervision *supervision) const |
const Lattice & | DenLat () const |
Private Member Functions | |
void | CreateRangeLattice (const Lattice &in_lat, const LatticeInfo &scores, int32 begin_frame, int32 end_frame, bool normalize, Lattice *out_lat) const |
void | ComputeLatticeScores (const Lattice &lat, LatticeInfo *scores) const |
void | PrepareLattice (Lattice *lat, LatticeInfo *scores) const |
void | CollapseTransitionIds (const std::vector< int32 > &state_times, Lattice *lat) const |
Private Attributes | |
const SplitDiscriminativeSupervisionOptions & | config_ |
const TransitionModel & | tmodel_ |
const DiscriminativeSupervision & | supervision_ |
LatticeInfo | den_lat_scores_ |
Lattice | den_lat_ |
Definition at line 140 of file discriminative-supervision.h.
typedef fst::VectorFst<LatticeArc> Lattice |
Definition at line 143 of file discriminative-supervision.h.
typedef fst::ArcTpl<LatticeWeight> LatticeArc |
Definition at line 142 of file discriminative-supervision.h.
DiscriminativeSupervisionSplitter | ( | const SplitDiscriminativeSupervisionOptions & | config, |
const TransitionModel & | tmodel, | ||
const DiscriminativeSupervision & | supervision | ||
) |
Definition at line 136 of file discriminative-supervision.cc.
References DiscriminativeSupervision::den_lat, DiscriminativeSupervisionSplitter::den_lat_, DiscriminativeSupervisionSplitter::den_lat_scores_, DiscriminativeSupervision::frames_per_sequence, KALDI_ASSERT, KALDI_WARN, DiscriminativeSupervision::num_sequences, DiscriminativeSupervisionSplitter::PrepareLattice(), DiscriminativeSupervisionSplitter::LatticeInfo::state_times, and DiscriminativeSupervisionSplitter::supervision_.
|
private |
Definition at line 169 of file discriminative-supervision.cc.
References count, KALDI_ASSERT, DiscriminativeSupervisionSplitter::tmodel_, and TransitionModel::TransitionIdToPdf().
Referenced by DiscriminativeSupervisionSplitter::CreateRangeLattice().
|
private |
Definition at line 393 of file discriminative-supervision.cc.
References DiscriminativeSupervisionSplitter::LatticeInfo::alpha, DiscriminativeSupervisionSplitter::LatticeInfo::beta, DiscriminativeSupervisionSplitter::LatticeInfo::Check(), kaldi::ComputeLatticeAlphasAndBetas(), kaldi::LatticeStateTimes(), and DiscriminativeSupervisionSplitter::LatticeInfo::state_times.
Referenced by DiscriminativeSupervisionSplitter::PrepareLattice().
|
private |
Definition at line 232 of file discriminative-supervision.cc.
References SplitDiscriminativeSupervisionOptions::acoustic_scale, fst::AcousticLatticeScale(), DiscriminativeSupervisionSplitter::LatticeInfo::alpha, DiscriminativeSupervisionSplitter::LatticeInfo::beta, SplitDiscriminativeSupervisionOptions::collapse_transition_ids, DiscriminativeSupervisionSplitter::CollapseTransitionIds(), DiscriminativeSupervisionSplitter::config_, SplitDiscriminativeSupervisionOptions::determinize, rnnlm::i, KALDI_ASSERT, KALDI_ERR, kaldi::LatticeStateTimes(), SplitDiscriminativeSupervisionOptions::minimize, LatticeWeightTpl< BaseFloat >::One(), fst::ScaleLattice(), LatticeWeightTpl< FloatType >::SetValue1(), LatticeWeightTpl< FloatType >::SetValue2(), DiscriminativeSupervisionSplitter::LatticeInfo::state_times, and kaldi::swap().
Referenced by DiscriminativeSupervisionSplitter::GetFrameRange().
|
inline |
Definition at line 167 of file discriminative-supervision.h.
void GetFrameRange | ( | int32 | begin_frame, |
int32 | frames_per_sequence, | ||
bool | normalize, | ||
DiscriminativeSupervision * | supervision | ||
) | const |
Definition at line 206 of file discriminative-supervision.cc.
References DiscriminativeSupervision::Check(), DiscriminativeSupervisionSplitter::CreateRangeLattice(), DiscriminativeSupervision::den_lat, DiscriminativeSupervisionSplitter::den_lat_, DiscriminativeSupervisionSplitter::den_lat_scores_, DiscriminativeSupervision::frames_per_sequence, KALDI_ASSERT, DiscriminativeSupervision::num_ali, DiscriminativeSupervision::num_sequences, DiscriminativeSupervisionSplitter::supervision_, and DiscriminativeSupervision::weight.
Referenced by kaldi::nnet3::ProcessFile().
|
private |
Definition at line 362 of file discriminative-supervision.cc.
References SplitDiscriminativeSupervisionOptions::acoustic_scale, fst::AcousticLatticeScale(), DiscriminativeSupervisionSplitter::ComputeLatticeScores(), DiscriminativeSupervisionSplitter::config_, KALDI_ASSERT, kaldi::LatticeStateTimes(), fst::ScaleLattice(), and DiscriminativeSupervisionSplitter::LatticeInfo::state_times.
Referenced by DiscriminativeSupervisionSplitter::DiscriminativeSupervisionSplitter().
|
private |
Definition at line 184 of file discriminative-supervision.h.
Referenced by DiscriminativeSupervisionSplitter::CreateRangeLattice(), and DiscriminativeSupervisionSplitter::PrepareLattice().
|
private |
Definition at line 199 of file discriminative-supervision.h.
Referenced by DiscriminativeSupervisionSplitter::DiscriminativeSupervisionSplitter(), and DiscriminativeSupervisionSplitter::GetFrameRange().
|
private |
Definition at line 195 of file discriminative-supervision.h.
Referenced by DiscriminativeSupervisionSplitter::DiscriminativeSupervisionSplitter(), and DiscriminativeSupervisionSplitter::GetFrameRange().
|
private |
Definition at line 191 of file discriminative-supervision.h.
Referenced by DiscriminativeSupervisionSplitter::DiscriminativeSupervisionSplitter(), and DiscriminativeSupervisionSplitter::GetFrameRange().
|
private |
Definition at line 188 of file discriminative-supervision.h.
Referenced by DiscriminativeSupervisionSplitter::CollapseTransitionIds().