DecodableAmDiagGmmScaled Class Reference

#include <decodable-am-diag-gmm.h>

Inheritance diagram for DecodableAmDiagGmmScaled:
Collaboration diagram for DecodableAmDiagGmmScaled:

Public Member Functions

 DecodableAmDiagGmmScaled (const AmDiagGmm &am, const TransitionModel &tm, const Matrix< BaseFloat > &feats, BaseFloat scale, BaseFloat log_sum_exp_prune=-1.0)
 
 DecodableAmDiagGmmScaled (const AmDiagGmm &am, const TransitionModel &tm, BaseFloat scale, BaseFloat log_sum_exp_prune, Matrix< BaseFloat > *feats)
 
virtual BaseFloat LogLikelihood (int32 frame, int32 tid)
 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...
 
const TransitionModelTransModel ()
 
virtual ~DecodableAmDiagGmmScaled ()
 
- Public Member Functions inherited from DecodableAmDiagGmmUnmapped
 DecodableAmDiagGmmUnmapped (const AmDiagGmm &am, const Matrix< BaseFloat > &feats, BaseFloat log_sum_exp_prune=-1.0)
 If you set log_sum_exp_prune to a value greater than 0 it will prune in the LogSumExp operation (larger = more exact); I suggest 5. More...
 
virtual int32 NumFramesReady () const
 The call NumFramesReady() will return the number of frames currently available for this decodable object. More...
 
virtual bool IsLastFrame (int32 frame) const
 Returns true if this is the last frame. More...
 
- Public Member Functions inherited from DecodableInterface
virtual ~DecodableInterface ()
 

Private Member Functions

 KALDI_DISALLOW_COPY_AND_ASSIGN (DecodableAmDiagGmmScaled)
 

Private Attributes

const TransitionModeltrans_model_
 
BaseFloat scale_
 
Matrix< BaseFloat > * delete_feats_
 

Additional Inherited Members

- Protected Member Functions inherited from DecodableAmDiagGmmUnmapped
void ResetLogLikeCache ()
 
virtual BaseFloat LogLikelihoodZeroBased (int32 frame, int32 state_index)
 
- Protected Attributes inherited from DecodableAmDiagGmmUnmapped
const AmDiagGmmacoustic_model_
 
const Matrix< BaseFloat > & feature_matrix_
 
int32 previous_frame_
 
BaseFloat log_sum_exp_prune_
 
std::vector< LikelihoodCacheRecordlog_like_cache_
 

Detailed Description

Definition at line 121 of file decodable-am-diag-gmm.h.

Constructor & Destructor Documentation

◆ DecodableAmDiagGmmScaled() [1/2]

DecodableAmDiagGmmScaled ( const AmDiagGmm am,
const TransitionModel tm,
const Matrix< BaseFloat > &  feats,
BaseFloat  scale,
BaseFloat  log_sum_exp_prune = -1.0 
)
inline

Definition at line 123 of file decodable-am-diag-gmm.h.

127  :
128  DecodableAmDiagGmmUnmapped(am, feats, log_sum_exp_prune), trans_model_(tm),
129  scale_(scale), delete_feats_(NULL) {}
const TransitionModel & trans_model_
DecodableAmDiagGmmUnmapped(const AmDiagGmm &am, const Matrix< BaseFloat > &feats, BaseFloat log_sum_exp_prune=-1.0)
If you set log_sum_exp_prune to a value greater than 0 it will prune in the LogSumExp operation (larg...

◆ DecodableAmDiagGmmScaled() [2/2]

DecodableAmDiagGmmScaled ( const AmDiagGmm am,
const TransitionModel tm,
BaseFloat  scale,
BaseFloat  log_sum_exp_prune,
Matrix< BaseFloat > *  feats 
)
inline

Definition at line 133 of file decodable-am-diag-gmm.h.

137  :
138  DecodableAmDiagGmmUnmapped(am, *feats, log_sum_exp_prune),
139  trans_model_(tm), scale_(scale), delete_feats_(feats) {}
const TransitionModel & trans_model_
DecodableAmDiagGmmUnmapped(const AmDiagGmm &am, const Matrix< BaseFloat > &feats, BaseFloat log_sum_exp_prune=-1.0)
If you set log_sum_exp_prune to a value greater than 0 it will prune in the LogSumExp operation (larg...

◆ ~DecodableAmDiagGmmScaled()

virtual ~DecodableAmDiagGmmScaled ( )
inlinevirtual

Definition at line 151 of file decodable-am-diag-gmm.h.

151  {
152  delete delete_feats_;
153  }

Member Function Documentation

◆ KALDI_DISALLOW_COPY_AND_ASSIGN()

KALDI_DISALLOW_COPY_AND_ASSIGN ( DecodableAmDiagGmmScaled  )
private

◆ LogLikelihood()

virtual BaseFloat LogLikelihood ( int32  frame,
int32  index 
)
inlinevirtual

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.

Reimplemented from DecodableAmDiagGmmUnmapped.

Definition at line 142 of file decodable-am-diag-gmm.h.

References DecodableAmDiagGmmUnmapped::LogLikelihoodZeroBased().

142  {
143  return scale_*LogLikelihoodZeroBased(frame,
145  }
int32 TransitionIdToPdf(int32 trans_id) const
const TransitionModel & trans_model_
virtual BaseFloat LogLikelihoodZeroBased(int32 frame, int32 state_index)

◆ 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).

Reimplemented from DecodableAmDiagGmmUnmapped.

Definition at line 147 of file decodable-am-diag-gmm.h.

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

◆ TransModel()

const TransitionModel* TransModel ( )
inline

Definition at line 149 of file decodable-am-diag-gmm.h.

149 { return &trans_model_; }
const TransitionModel & trans_model_

Member Data Documentation

◆ delete_feats_

Matrix<BaseFloat>* delete_feats_
private

Definition at line 158 of file decodable-am-diag-gmm.h.

◆ scale_

BaseFloat scale_
private

Definition at line 157 of file decodable-am-diag-gmm.h.

◆ trans_model_

const TransitionModel& trans_model_
private

Definition at line 156 of file decodable-am-diag-gmm.h.


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