All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DecodableAmNnetLoopedOnline Class Reference

#include <decodable-online-looped.h>

Inheritance diagram for DecodableAmNnetLoopedOnline:
Collaboration diagram for DecodableAmNnetLoopedOnline:

Public Member Functions

 DecodableAmNnetLoopedOnline (const TransitionModel &trans_model, const DecodableNnetSimpleLoopedInfo &info, OnlineFeatureInterface *input_features, OnlineFeatureInterface *ivector_features)
 
virtual int32 NumIndices () const
 Returns the number of states in the acoustic model (they will be indexed one-based, i.e. More...
 
virtual BaseFloat LogLikelihood (int32 subsampled_frame, int32 transition_id)
 Returns the log likelihood, which will be negated in the decoder. More...
 
- Public Member Functions inherited from DecodableNnetLoopedOnlineBase
 DecodableNnetLoopedOnlineBase (const DecodableNnetSimpleLoopedInfo &info, OnlineFeatureInterface *input_features, OnlineFeatureInterface *ivector_features)
 
virtual bool IsLastFrame (int32 subsampled_frame) const
 Returns true if this is the last frame. More...
 
virtual int32 NumFramesReady () const
 The call NumFramesReady() will return the number of frames currently available for this decodable object. More...
 
int32 FrameSubsamplingFactor () const
 
- Public Member Functions inherited from DecodableInterface
virtual ~DecodableInterface ()
 

Private Member Functions

 KALDI_DISALLOW_COPY_AND_ASSIGN (DecodableAmNnetLoopedOnline)
 

Private Attributes

const TransitionModeltrans_model_
 

Additional Inherited Members

- Protected Member Functions inherited from DecodableNnetLoopedOnlineBase
void EnsureFrameIsComputed (int32 subsampled_frame)
 If the neural-network outputs for this frame are not cached, this function computes them (and possibly also some later frames). More...
 
- Protected Attributes inherited from DecodableNnetLoopedOnlineBase
Matrix< BaseFloatcurrent_log_post_
 
int32 num_chunks_computed_
 
int32 current_log_post_subsampled_offset_
 
const
DecodableNnetSimpleLoopedInfo
info_
 

Detailed Description

Definition at line 167 of file decodable-online-looped.h.

Constructor & Destructor Documentation

DecodableAmNnetLoopedOnline ( const TransitionModel trans_model,
const DecodableNnetSimpleLoopedInfo info,
OnlineFeatureInterface input_features,
OnlineFeatureInterface ivector_features 
)
inline

Definition at line 169 of file decodable-online-looped.h.

173  :
174  DecodableNnetLoopedOnlineBase(info, input_features, ivector_features),
175  trans_model_(trans_model) { }
DecodableNnetLoopedOnlineBase(const DecodableNnetSimpleLoopedInfo &info, OnlineFeatureInterface *input_features, OnlineFeatureInterface *ivector_features)

Member Function Documentation

KALDI_DISALLOW_COPY_AND_ASSIGN ( DecodableAmNnetLoopedOnline  )
private
BaseFloat LogLikelihood ( int32  frame,
int32  index 
)
virtual

Returns the log likelihood, which will be negated in the decoder.

The "frame" starts from zero. You should verify that IsLastFrame(frame-1) returns false before calling this.

Implements DecodableInterface.

Definition at line 242 of file decodable-online-looped.cc.

References DecodableNnetLoopedOnlineBase::current_log_post_, DecodableNnetLoopedOnlineBase::current_log_post_subsampled_offset_, DecodableNnetLoopedOnlineBase::EnsureFrameIsComputed(), DecodableAmNnetLoopedOnline::trans_model_, and TransitionModel::TransitionIdToPdf().

243  {
244  EnsureFrameIsComputed(subsampled_frame);
245  return current_log_post_(
246  subsampled_frame - current_log_post_subsampled_offset_,
248 }
int32 TransitionIdToPdf(int32 trans_id) const
void EnsureFrameIsComputed(int32 subsampled_frame)
If the neural-network outputs for this frame are not cached, this function computes them (and possibl...
virtual int32 NumIndices ( ) const
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 179 of file decodable-online-looped.h.

References TransitionModel::NumTransitionIds(), and DecodableAmNnetLoopedOnline::trans_model_.

179 { return trans_model_.NumTransitionIds(); }
int32 NumTransitionIds() const
Returns the total number of transition-ids (note, these are one-based).

Member Data Documentation


The documentation for this class was generated from the following files: