13 #ifndef MLPACK_METHODS_ANN_INIT_RULES_RANDOM_INIT_HPP 14 #define MLPACK_METHODS_ANN_INIT_RULES_RANDOM_INIT_HPP 56 void Initialize(arma::Mat<eT>& W,
const size_t rows,
const size_t cols)
58 W =
lowerBound + arma::randu<arma::Mat<eT>>(rows, cols) *
75 W = arma::Cube<eT>(rows, cols, slices);
77 for (
size_t i = 0; i < slices; i++)
Linear algebra utility functions, generally performed on matrices or vectors.
RandomInitialization(const double bound)
Initialize the random initialization rule with the given bound.
This class is used to initialize randomly the weight matrix.
The core includes that mlpack expects; standard C++ includes and Armadillo.
const double upperBound
The number used as upper bound.
void Initialize(arma::Cube< eT > &W, const size_t rows, const size_t cols, const size_t slices)
Initialize randomly the elements of the specified weight 3rd order tensor.
RandomInitialization(const double lowerBound=-1, const double upperBound=1)
Initialize the random initialization rule with the given lower bound and upper bound.
const double lowerBound
The number used as lower bound.
void Initialize(arma::Mat< eT > &W, const size_t rows, const size_t cols)
Initialize randomly the elements of the specified weight matrix.