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