[mlpack-git] master: Set strict = false (use auxiliary memory until the size change) when creating the gradient storage; the default setting changed in armadillo 6.000 from true to false since. (d765779)

gitdub at mlpack.org gitdub at mlpack.org
Mon Feb 22 13:18:52 EST 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/4f4bd200d2617a5448c3377a732d7aaa8206e92a...29dc196be362c8af44f36f331ac719d5a0e34acd

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

commit d765779ba62ad9934a1101db7ae878874b17afe4
Author: marcus <marcus.edel at fu-berlin.de>
Date:   Mon Feb 22 19:18:52 2016 +0100

    Set strict = false (use auxiliary memory until the size change) when creating the gradient storage; the default setting changed in armadillo 6.000 from true to false since.


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

d765779ba62ad9934a1101db7ae878874b17afe4
 src/mlpack/methods/ann/network_util_impl.hpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mlpack/methods/ann/network_util_impl.hpp b/src/mlpack/methods/ann/network_util_impl.hpp
index 7752d1e..fbb4041 100644
--- a/src/mlpack/methods/ann/network_util_impl.hpp
+++ b/src/mlpack/methods/ann/network_util_impl.hpp
@@ -75,7 +75,7 @@ LayerWeights(T& layer,
              arma::mat& /* unused */)
 {
   layer.Weights() = arma::mat(weights.memptr() + offset,
-      layer.Weights().n_rows, layer.Weights().n_cols, false);
+      layer.Weights().n_rows, layer.Weights().n_cols, false, false);
 
   return layer.Weights().n_elem;
 }
@@ -90,7 +90,7 @@ LayerWeights(T& layer,
 {
   layer.Weights() = arma::cube(weights.memptr() + offset,
       layer.Weights().n_rows, layer.Weights().n_cols,
-      layer.Weights().n_slices, false);
+      layer.Weights().n_slices, false, false);
 
   return layer.Weights().n_elem;
 }
@@ -135,7 +135,7 @@ LayerGradients(T& layer,
                arma::mat& /* unused */)
 {
   layer.Gradient() = arma::mat(gradients.memptr() + offset,
-      layer.Weights().n_rows, layer.Weights().n_cols, false);
+      layer.Weights().n_rows, layer.Weights().n_cols, false, false);
 
   return layer.Weights().n_elem;
 }
@@ -150,7 +150,7 @@ LayerGradients(T& layer,
 {
   layer.Gradient() = arma::cube(gradients.memptr() + offset,
       layer.Weights().n_rows, layer.Weights().n_cols,
-      layer.Weights().n_slices, false);
+      layer.Weights().n_slices, false, false);
 
   return layer.Weights().n_elem;
 }




More information about the mlpack-git mailing list