#include <decodable-sum.h>
Public Member Functions | |
DecodableSum (DecodableInterface *d1, BaseFloat w1, DecodableInterface *d2, BaseFloat w2) | |
DecodableSum (const std::vector< std::pair< DecodableInterface *, BaseFloat > > &decodables) | |
void | CheckSizes () const |
virtual BaseFloat | LogLikelihood (int32 frame, int32 state_index) |
Returns the log likelihood, which will be negated in the decoder. More... | |
virtual int32 | NumIndices () const |
Returns the number of states in the acoustic model (they will be indexed one-based, i.e. More... | |
virtual bool | IsLastFrame (int32 frame) const |
Returns true if this is the last frame. More... | |
Public Member Functions inherited from DecodableInterface | |
virtual int32 | NumFramesReady () const |
The call NumFramesReady() will return the number of frames currently available for this decodable object. More... | |
virtual | ~DecodableInterface () |
Private Member Functions | |
KALDI_DISALLOW_COPY_AND_ASSIGN (DecodableSum) | |
Private Attributes | |
std::vector< std::pair< DecodableInterface *, BaseFloat > > | decodables_ |
Definition at line 36 of file decodable-sum.h.
|
inline |
Definition at line 40 of file decodable-sum.h.
References DecodableSum::CheckSizes(), and DecodableSum::decodables_.
|
inline |
Definition at line 48 of file decodable-sum.h.
References DecodableSum::CheckSizes().
|
inline |
Definition at line 52 of file decodable-sum.h.
References DecodableSum::decodables_, rnnlm::i, and KALDI_ASSERT.
Referenced by DecodableSum::DecodableSum().
Returns true if this is the last frame.
Frames are zero-based, so the first frame is zero. IsLastFrame(-1) will return false, unless the file is empty (which is a case that I'm not sure all the code will handle, so be careful). Caution: the behavior of this function in an online setting is being changed somewhat. In future it may return false in cases where we haven't yet decided to terminate decoding, but later true if we decide to terminate decoding. The plan in future is to rely more on NumFramesReady(), and in future, IsLastFrame() would always return false in an online-decoding setting, and would only return true in a decoding-from-matrix setting where we want to allow the last delta or LDA features to be flushed out for compatibility with the baseline setup.
Implements DecodableInterface.
Definition at line 76 of file decodable-sum.h.
References DecodableSum::decodables_.
|
private |
Returns the log likelihood, which will be negated in the decoder.
The "frame" starts from zero. You should verify that NumFramesReady() > frame before calling this.
Implements DecodableInterface.
Reimplemented in DecodableSumScaled.
Definition at line 63 of file decodable-sum.h.
References DecodableSum::decodables_.
Referenced by DecodableSumScaled::LogLikelihood().
|
inlinevirtual |
Returns the number of states in the acoustic model (they will be indexed one-based, i.e.
from 1 to NumIndices(); this is for compatibility with OpenFst).
Implements DecodableInterface.
Definition at line 74 of file decodable-sum.h.
References DecodableSum::decodables_.
|
private |
Definition at line 82 of file decodable-sum.h.
Referenced by DecodableSum::CheckSizes(), DecodableSum::DecodableSum(), DecodableSum::IsLastFrame(), DecodableSum::LogLikelihood(), and DecodableSum::NumIndices().