MLPACK  1.0.10
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