47 KALDI_ERR <<
"Dimension of priors cannot exceed number of pdfs.";
51 <<
NumPdfs() <<
": extending with zeros, in case you had " 52 <<
"unseen pdf's, but this possibly indicates a serious problem.";
58 std::ostringstream ostr;
59 ostr <<
"prior dimension: " <<
priors_.Dim();
61 ostr <<
", prior sum: " <<
priors_.Sum() <<
", prior min: " <<
priors_.Min()
70 KALDI_WARN <<
"Initializing neural net: prior dimension mismatch, " 71 <<
"discarding old priors.";
79 priors_.Set(1.0 / new_num_pdfs);
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
void Read(std::istream &is, bool binary)
Vector< BaseFloat > priors_
void Read(std::istream &is, bool binary)
int32 OutputDim() const
The output dimension of the network – typically the number of pdfs.
void Write(std::ostream &os, bool binary) const
void ResizeOutputLayer(int32 new_num_pdfs)
This function is used when doing transfer learning to a new system.
void Init(std::istream &config_is)
Initialize the neural network based acoustic model from a config file.
void Write(std::ostream &os, bool binary) const
void Init(std::istream &is)
Initialize from config file.
void ResizeOutputLayer(int32 new_num_pdfs)
This function is used when doing transfer learning to a new system.
void SetPriors(const VectorBase< BaseFloat > &priors)
Provides a vector abstraction class.