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

#include <decodable-online-looped.h>

Inheritance diagram for DecodableNnetLoopedOnline:
Collaboration diagram for DecodableNnetLoopedOnline:

Public Member Functions

 DecodableNnetLoopedOnline (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 index)
 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 (DecodableNnetLoopedOnline)
 

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 137 of file decodable-online-looped.h.

Constructor & Destructor Documentation

DecodableNnetLoopedOnline ( const DecodableNnetSimpleLoopedInfo info,
OnlineFeatureInterface input_features,
OnlineFeatureInterface ivector_features 
)
inline

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

142  :
143  DecodableNnetLoopedOnlineBase(info, input_features, ivector_features) { }
DecodableNnetLoopedOnlineBase(const DecodableNnetSimpleLoopedInfo &info, OnlineFeatureInterface *input_features, OnlineFeatureInterface *ivector_features)

Member Function Documentation

KALDI_DISALLOW_COPY_AND_ASSIGN ( DecodableNnetLoopedOnline  )
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 232 of file decodable-online-looped.cc.

References DecodableNnetLoopedOnlineBase::current_log_post_, DecodableNnetLoopedOnlineBase::current_log_post_subsampled_offset_, and DecodableNnetLoopedOnlineBase::EnsureFrameIsComputed().

233  {
234  EnsureFrameIsComputed(subsampled_frame);
235  // note: we index by 'inde
236  return current_log_post_(
237  subsampled_frame - current_log_post_subsampled_offset_,
238  index - 1);
239 }
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 147 of file decodable-online-looped.h.

References DecodableNnetLoopedOnlineBase::info_, and DecodableNnetSimpleLoopedInfo::output_dim.


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