nnet-utils.h File Reference
#include <string>
#include <vector>
#include <iterator>
#include <algorithm>
#include "base/kaldi-common.h"
#include "cudamatrix/cu-matrix.h"
#include "cudamatrix/cu-array.h"
#include "hmm/posterior.h"
#include "hmm/transition-model.h"
Include dependency graph for nnet-utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 kaldi
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for mispronunciations detection tasks, the reference:
 
 kaldi::nnet1
 

Functions

template<typename T >
std::ostream & operator<< (std::ostream &os, const std::vector< T > &v)
 Define stream insertion opeartor for 'std::vector', useful for log-prints,. More...
 
template<typename T >
std::string ToString (const T &t)
 Convert basic type to a string (please don't overuse),. More...
 
template<typename Real >
std::string MomentStatistics (const VectorBase< Real > &vec)
 Get a string with statistics of the data in a vector, so we can print them easily. More...
 
template<typename Real >
std::string MomentStatistics (const MatrixBase< Real > &mat)
 Overload MomentStatistics to MatrixBase<Real> More...
 
template<typename Real >
std::string MomentStatistics (const CuVectorBase< Real > &vec)
 Overload MomentStatistics to CuVectorBase<Real> More...
 
template<typename Real >
std::string MomentStatistics (const CuMatrixBase< Real > &mat)
 Overload MomentStatistics to CuMatrix<Real> More...
 
template<typename Real >
void CheckNanInf (const CuMatrixBase< Real > &mat, const char *msg="")
 Check that matrix contains no nan or inf. More...
 
template<typename Real >
Real ComputeStdDev (const CuMatrixBase< Real > &mat)
 Get the standard deviation of values in the matrix. More...
 
template<typename Real >
void RandGauss (BaseFloat mu, BaseFloat sigma, CuMatrixBase< Real > *mat, struct RandomState *state=NULL)
 Fill CuMatrix with random numbers (Gaussian distribution): mu = the mean value, sigma = standard deviation,. More...
 
template<typename Real >
void RandUniform (BaseFloat mu, BaseFloat range, CuMatrixBase< Real > *mat, struct RandomState *state=NULL)
 Fill CuMatrix with random numbers (Uniform distribution): mu = the mean value, range = the 'width' of the uniform PDF (spanning mu-range/2 . More...
 
template<typename Real >
void RandUniform (BaseFloat mu, BaseFloat range, CuVectorBase< Real > *vec, struct RandomState *state=NULL)
 Fill CuVector with random numbers (Uniform distribution): mu = the mean value, range = the 'width' of the uniform PDF (spanning mu-range/2 . More...
 
void BuildIntegerVector (const std::vector< std::vector< int32 > > &in, std::vector< int32 > *out)
 Build 'integer vector' out of vector of 'matlab-like' representation: 'b, b:e, b:s:e'. More...
 
void BuildIntegerVector (const std::vector< std::vector< int32 > > &in, CuArray< int32 > *out)
 Wrapper with 'CuArray<int32>' output. More...
 
template<typename Real >
void PosteriorToMatrix (const Posterior &post, const int32 post_dim, CuMatrix< Real > *mat)
 Wrapper of PosteriorToMatrix with CuMatrix argument. More...
 
template<typename Real >
void PosteriorToPdfMatrix (const Posterior &post, const TransitionModel &model, CuMatrix< Real > *mat)
 Wrapper of PosteriorToMatrixMapped with CuMatrix argument. More...