MLPACK  1.0.11
random_init.hpp
Go to the documentation of this file.
1 
22 #ifndef _MLPACK_METHOS_PERCEPTRON_INITIALIZATION_METHODS_RANDOM_INIT_HPP
23 #define _MLPACK_METHOS_PERCEPTRON_INITIALIZATION_METHODS_RANDOM_INIT_HPP
24 
25 #include <mlpack/core.hpp>
26 
27 namespace mlpack {
28 namespace perceptron {
29 
35 {
36  public:
38 
39  inline static void Initialize(arma::mat& W,
40  const size_t row,
41  const size_t col)
42  {
43  W = arma::randu<arma::mat>(row, col);
44  }
45 }; // class RandomInitialization
46 
47 }; // namespace perceptron
48 }; // namespace mlpack
49 
50 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: load.hpp:31
static void Initialize(arma::mat &W, const size_t row, const size_t col)
Definition: random_init.hpp:39
This class is used to initialize weights for the weightVectors matrix in a random manner...
Definition: random_init.hpp:34