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
 
void SetFrameOffset (int32 frame_offset)
 Sets the frame offset value. More...
 
int32 GetFrameOffset () const
 Returns the frame offset value. More...
 
- 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 DecodableNnetSimpleLoopedInfoinfo_
 
int32 frame_offset_
 

Detailed Description

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

Constructor & Destructor Documentation

◆ DecodableNnetLoopedOnline()

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

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

158  :
159  DecodableNnetLoopedOnlineBase(info, input_features, ivector_features) { }
DecodableNnetLoopedOnlineBase(const DecodableNnetSimpleLoopedInfo &info, OnlineFeatureInterface *input_features, OnlineFeatureInterface *ivector_features)

Member Function Documentation

◆ KALDI_DISALLOW_COPY_AND_ASSIGN()

KALDI_DISALLOW_COPY_AND_ASSIGN ( DecodableNnetLoopedOnline  )
private

◆ LogLikelihood()

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 NumFramesReady() > frame before calling this.

Implements DecodableInterface.

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

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

239  {
240  subsampled_frame += frame_offset_;
241  EnsureFrameIsComputed(subsampled_frame);
242  // note: we index by 'inde
243  return current_log_post_(
244  subsampled_frame - current_log_post_subsampled_offset_,
245  index - 1);
246 }
void EnsureFrameIsComputed(int32 subsampled_frame)
If the neural-network outputs for this frame are not cached, this function computes them (and possibl...

◆ NumIndices()

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

References DecodableNnetLoopedOnlineBase::info_, DecodableNnetLoopedOnlineBase::KALDI_DISALLOW_COPY_AND_ASSIGN(), DecodableInterface::LogLikelihood(), and DecodableNnetSimpleLoopedInfo::output_dim.


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