12 #ifndef MLPACK_METHODS_PERCEPTRON_INITIALIZATION_METHODS_RANDOM_INIT_HPP 13 #define MLPACK_METHODS_PERCEPTRON_INITIALIZATION_METHODS_RANDOM_INIT_HPP 18 namespace perceptron {
29 inline static void Initialize(arma::mat& weights,
31 const size_t numFeatures,
32 const size_t numClasses)
34 weights.randu(numFeatures, numClasses);
35 biases.randu(numClasses);
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.
This class is used to initialize weights for the weightVectors matrix in a random manner...
Definition: random_init.hpp:24