14 #ifndef MLPACK_METHODS_ANN_INIT_RULES_CONST_INIT_HPP 15 #define MLPACK_METHODS_ANN_INIT_RULES_CONST_INIT_HPP 42 void Initialize(arma::Mat<eT>& W,
const size_t rows,
const size_t cols)
45 W.set_size(rows, cols);
59 Log::Fatal <<
"Cannot initialize an empty matrix." << std::endl;
79 W.set_size(rows, cols, slices);
93 Log::Fatal <<
"Cannot initialize an empty cube." << std::endl;
Linear algebra utility functions, generally performed on matrices or vectors.
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.
ConstInitialization(const double initVal=0)
Create the ConstantInitialization object.
void Initialize(arma::Cube< eT > &W)
Initialize the elements of the specified weight (3rd order tensor).
double const & InitValue() const
Get the initialization value.
static MLPACK_EXPORT util::PrefixedOutStream Fatal
Prints fatal messages prefixed with [FATAL], then terminates the program.
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).
This class is used to initialize weight matrix with constant values.
void Initialize(arma::Mat< eT > &W)
Initialize the elements of the specified weight matrix.
double & initValue()
Modify the initialization value.