Go to the documentation of this file.
12 #ifndef MLPACK_METHODS_ANN_INIT_RULES_ORTHOGONAL_INIT_HPP
13 #define MLPACK_METHODS_ANN_INIT_RULES_ORTHOGONAL_INIT_HPP
43 void Initialize(arma::Mat<eT>& W,
const size_t rows,
const size_t cols)
48 arma::svd_econ(W, s, V, arma::randu<arma::Mat<eT> >(rows, cols));
64 arma::svd_econ(W, s, V, arma::randu<arma::Mat<eT> >(W.n_rows, W.n_cols));
84 W.set_size(rows, cols, slices);
86 for (
size_t i = 0; i < slices; ++i)
100 Log::Fatal <<
"Cannot initialize an empty cube." << std::endl;
102 for (
size_t i = 0; i < W.n_slices; ++i)
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Initialize(arma::Mat< eT > &W, const size_t rows, const size_t cols)
Initialize the elements of the specified weight matrix with the orthogonal matrix initialization meth...
void Initialize(arma::Mat< eT > &W)
Initialize the elements of the specified weight matrix with the orthogonal matrix initialization meth...
Linear algebra utility functions, generally performed on matrices or vectors.
static MLPACK_EXPORT util::PrefixedOutStream Fatal
Prints fatal messages prefixed with [FATAL], then terminates the program.
void Initialize(arma::Cube< eT > &W)
Initialize the elements of the specified weight 3rd order tensor with the orthogonal matrix initializ...
This class is used to initialize the weight matrix with the orthogonal matrix initialization.
OrthogonalInitialization(const double gain=1.0)
Initialize the orthogonal matrix initialization rule with the given gain.
void Initialize(arma::Cube< eT > &W, const size_t rows, const size_t cols, const size_t slices)
Initialize the elements of the specified weight 3rd order tensor with the orthogonal matrix initializ...