mlpack  1.0.12
random_init.hpp
Go to the documentation of this file.
1 
14 #ifndef _MLPACK_METHOS_PERCEPTRON_INITIALIZATION_METHODS_RANDOM_INIT_HPP
15 #define _MLPACK_METHOS_PERCEPTRON_INITIALIZATION_METHODS_RANDOM_INIT_HPP
16 
17 #include <mlpack/core.hpp>
18 
19 namespace mlpack {
20 namespace perceptron {
21 
27 {
28  public:
30 
31  inline static void Initialize(arma::mat& W,
32  const size_t row,
33  const size_t col)
34  {
35  W = arma::randu<arma::mat>(row, col);
36  }
37 }; // class RandomInitialization
38 
39 }; // namespace perceptron
40 }; // namespace mlpack
41 
42 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: load.hpp:23
static void Initialize(arma::mat &W, const size_t row, const size_t col)
Definition: random_init.hpp:31
This class is used to initialize weights for the weightVectors matrix in a random manner...
Definition: random_init.hpp:26