DaNNet
Namespaces | Functions
dnn_misc.h File Reference

Go to the source code of this file.

Namespaces

 dnn
 

Functions

std::string dnn::version_info (void)
 Generate DaNNet version string. More...
 
template<typename T >
void dnn::pol2cart (const T phi, const T r, T &x, T &y)
 Polar to cartesian convertion. More...
 
template<typename T >
void dnn::pol2cart (const arma::Mat< T > phi, const arma::Mat< T > r, arma::Mat< T > &x, arma::Mat< T > &y)
 Polar to cartesian convertion (matrix) More...
 
template<typename T >
void dnn::cart2pol (const T x, const T y, T &phi, T &r)
 Cartesian to polar convertion. More...
 
template<typename T >
void dnn::cart2pol (const arma::Mat< T > x, const arma::Mat< T > y, arma::Mat< T > &phi, arma::Mat< T > &r)
 Cartesian to polar convertion (matrix) More...
 
arma_inline arma::Mat< DNN_Dtype > dnn::row2col (const arma::Mat< DNN_Dtype > &A)
 Flattens a matrix row-wise to a one column matrix. More...
 
arma_inline arma::Mat< DNN_Dtype > dnn::col2col (const arma::Mat< DNN_Dtype > &A)
 Flattens a matrix col-wise to a one column matrix. More...
 
arma_inline arma::Mat< DNN_Dtype > dnn::mat2mat (const arma::Mat< DNN_Dtype > &A, const arma::uword rows, const arma::uword cols)
 Reshapes a matrix. More...
 
arma_inline arma::Cube< DNN_Dtype > dnn::mat2cube (const arma::Mat< DNN_Dtype > &A, const arma::uword rows, const arma::uword cols, const arma::uword slices)
 Converts a matrix to a cube. More...
 
arma_inline arma::Mat< DNN_Dtype > dnn::cube2mat (arma::Cube< DNN_Dtype > &A, const arma::uword rows, const arma::uword cols)
 Converts a cube to a matrix. More...
 
void dnn::gen_spiral (arma::Mat< DNN_Dtype > &X, arma::Mat< DNN_Dtype > &T, arma::uword N, arma::uword K, const double ph_var=0.1, const double r_min=0.1, const double ph_max=7)
 Dataset generator: a rotating spiral with K classes. More...
 
uint32_t dnn::swap_endian (uint32_t i)
 Endian converter for IDX1 and IDX3 file. More...
 
bool dnn::read_idx3 (std::string fname, arma::Cube< DNN_Dtype > &img, const double frac=1.0)
 Reads a IDX3 file. More...
 
bool dnn::read_idx1 (std::string fname, arma::ivec &label, const double frac=1.0)
 Reads a IDX1 file. More...
 
void dnn::read_MNIST (std::string fname_X, std::string fname_T, arma::Mat< DNN_Dtype > &X, arma::Mat< DNN_Dtype > &T, double frac=1.0)
 Reads a MNIST digit dataset. More...
 
void dnn::progress_bar (const std::string str, double p)
 Console progress bar. More...
 
void dnn::progress_bar (const std::string str, arma::uword num, arma::uword maxnum)
 Console progress bar. More...
 
void dnn::remove_progress_bar (void)
 Clears progress bar. More...