[mlpack-git] master: Fix 'no known conversion from arma::Mat<double> to arma::Cube<double>' error that occurred on some systems. Actually the build should be fine even without the change, but I guess some systems like to draw our attention on some 'incredibly long' templates in the error log. (ef29032)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Fri Sep 4 08:47:08 EDT 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/df9446c5a37c0de0955b6e1f20983cdcf611074c...ef290321115f6dfd21522ba7ccec5f08b52d7631

>---------------------------------------------------------------

commit ef290321115f6dfd21522ba7ccec5f08b52d7631
Author: Marcus Edel <marcus.edel at fu-berlin.de>
Date:   Fri Sep 4 14:46:59 2015 +0200

    Fix 'no known conversion from arma::Mat<double> to arma::Cube<double>' error that occurred on some systems. Actually the build should be fine even without the change, but I guess some systems like to draw our attention on some 'incredibly long' templates in the error log.


>---------------------------------------------------------------

ef290321115f6dfd21522ba7ccec5f08b52d7631
 src/mlpack/methods/ann/layer/bias_layer.hpp | 8 ++++----
 src/mlpack/tests/CMakeLists.txt             | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mlpack/methods/ann/layer/bias_layer.hpp b/src/mlpack/methods/ann/layer/bias_layer.hpp
index f693fea..2828c05 100644
--- a/src/mlpack/methods/ann/layer/bias_layer.hpp
+++ b/src/mlpack/methods/ann/layer/bias_layer.hpp
@@ -125,8 +125,8 @@ class BiasLayer
    * @param d The calculated error.
    * @param g The calculated gradient.
    */
-  template<typename eT, typename GradientDataType>
-  void Gradient(const arma::Cube<eT>& d, GradientDataType& g)
+  template<typename eT>
+  void Gradient(const arma::Cube<eT>& d, InputDataType& g)
   {
     g = arma::Mat<eT>(weights.n_rows, weights.n_cols);
     for (size_t s = 0; s < d.n_slices; s++)
@@ -141,8 +141,8 @@ class BiasLayer
    * @param d The calculated error.
    * @param g The calculated gradient.
    */
-  template<typename eT, typename GradientDataType>
-  void Gradient(const arma::Mat<eT>& d, GradientDataType& g)
+  template<typename eT>
+  void Gradient(const arma::Mat<eT>& d, InputDataType& g)
   {
     g = d * bias;
   }
diff --git a/src/mlpack/tests/CMakeLists.txt b/src/mlpack/tests/CMakeLists.txt
index 7ad44ac..fa65a7d 100644
--- a/src/mlpack/tests/CMakeLists.txt
+++ b/src/mlpack/tests/CMakeLists.txt
@@ -10,7 +10,7 @@ add_executable(mlpack_test
   aug_lagrangian_test.cpp
   cf_test.cpp
   cli_test.cpp
-#  convolutional_network_test.cpp
+  convolutional_network_test.cpp
   cosine_tree_test.cpp
   decision_stump_test.cpp
   det_test.cpp



More information about the mlpack-git mailing list