FmpeOptions Struct Reference

#include <fmpe.h>

Collaboration diagram for FmpeOptions:

Public Member Functions

 FmpeOptions ()
 
void Register (OptionsItf *opts)
 
void Write (std::ostream &os, bool binary) const
 
void Read (std::istream &is, bool binary)
 

Public Attributes

std::string context_expansion
 
BaseFloat post_scale
 

Detailed Description

Definition at line 34 of file fmpe.h.

Constructor & Destructor Documentation

◆ FmpeOptions()

FmpeOptions ( )
inline

Definition at line 72 of file fmpe.h.

72  : context_expansion("0,1.0:-1,1.0:1,1.0:-2,0.5;-3,0.5:2,0.5;3,0.5:-4,0.5;-5,0.5:4,0.5;5,0.5:-6,0.333;-7,0.333;-8,0.333:6,0.333;7,0.333;8,0.333"),
73  post_scale(5.0) { }
std::string context_expansion
Definition: fmpe.h:47
BaseFloat post_scale
Definition: fmpe.h:67

Member Function Documentation

◆ Read()

void Read ( std::istream &  is,
bool  binary 
)

Definition at line 430 of file fmpe.cc.

References kaldi::ReadBasicType(), and kaldi::ReadToken().

Referenced by FmpeStats::FmpeStats(), Fmpe::ProjectionTNumCols(), Fmpe::Read(), and FmpeOptions::Register().

430  {
431  ReadToken(is, binary, &context_expansion);
432  ReadBasicType(is, binary, &post_scale);
433 }
void ReadBasicType(std::istream &is, bool binary, T *t)
ReadBasicType is the name of the read function for bool, integer types, and floating-point types...
Definition: io-funcs-inl.h:55
void ReadToken(std::istream &is, bool binary, std::string *str)
ReadToken gets the next token and puts it in str (exception on failure).
Definition: io-funcs.cc:154
std::string context_expansion
Definition: fmpe.h:47
BaseFloat post_scale
Definition: fmpe.h:67

◆ Register()

void Register ( OptionsItf opts)
inline

Definition at line 75 of file fmpe.h.

References FmpeOptions::Read(), OptionsItf::Register(), and FmpeOptions::Write().

Referenced by main().

75  {
76  opts->Register("post-scale", &post_scale, "Scaling constant on posterior "
77  "element of offset features, to give it a faster learning "
78  "rate.");
79  opts->Register("context-expansion", &context_expansion, "Specifies the "
80  "temporal context-splicing of high-dimensional features.");
81  }
std::string context_expansion
Definition: fmpe.h:47
BaseFloat post_scale
Definition: fmpe.h:67

◆ Write()

void Write ( std::ostream &  os,
bool  binary 
) const

Definition at line 426 of file fmpe.cc.

References kaldi::WriteBasicType(), and kaldi::WriteToken().

Referenced by FmpeStats::FmpeStats(), Fmpe::ProjectionTNumCols(), FmpeOptions::Register(), and Fmpe::Write().

426  {
427  WriteToken(os, binary, context_expansion);
428  WriteBasicType(os, binary, post_scale);
429 }
std::string context_expansion
Definition: fmpe.h:47
void WriteToken(std::ostream &os, bool binary, const char *token)
The WriteToken functions are for writing nonempty sequences of non-space characters.
Definition: io-funcs.cc:134
void WriteBasicType(std::ostream &os, bool binary, T t)
WriteBasicType is the name of the write function for bool, integer types, and floating-point types...
Definition: io-funcs-inl.h:34
BaseFloat post_scale
Definition: fmpe.h:67

Member Data Documentation

◆ context_expansion

std::string context_expansion

Definition at line 47 of file fmpe.h.

Referenced by Fmpe::Fmpe(), and Fmpe::Read().

◆ post_scale

BaseFloat post_scale

Definition at line 67 of file fmpe.h.

Referenced by Fmpe::ApplyProjection(), and Fmpe::ApplyProjectionReverse().


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