[mlpack-git] master: Use the correct type. (ec35c2d)
gitdub at mlpack.org
gitdub at mlpack.org
Fri Feb 12 15:39:50 EST 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/a1662ef23d326f48b2e7dd3f5a4231a12b29eb42...ec35c2d4bc564e1431abf7c9aa14737c1d40328b
>---------------------------------------------------------------
commit ec35c2d4bc564e1431abf7c9aa14737c1d40328b
Author: Ryan Curtin <ryan at ratml.org>
Date: Fri Feb 12 12:39:50 2016 -0800
Use the correct type.
>---------------------------------------------------------------
ec35c2d4bc564e1431abf7c9aa14737c1d40328b
src/mlpack/core/optimizers/sgd/sgd_impl.hpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mlpack/core/optimizers/sgd/sgd_impl.hpp b/src/mlpack/core/optimizers/sgd/sgd_impl.hpp
index dacf5e5..d95624a 100644
--- a/src/mlpack/core/optimizers/sgd/sgd_impl.hpp
+++ b/src/mlpack/core/optimizers/sgd/sgd_impl.hpp
@@ -35,10 +35,10 @@ double SGD<DecomposableFunctionType>::Optimize(arma::mat& iterate)
const size_t numFunctions = function.NumFunctions();
// This is used only if shuffle is true.
- arma::vec visitationOrder;
+ arma::Col<size_t> visitationOrder;
if (shuffle)
- visitationOrder = arma::shuffle(arma::linspace(0, (numFunctions - 1),
- numFunctions));
+ visitationOrder = arma::shuffle(arma::linspace<arma::Col<size_t>>(0,
+ (numFunctions - 1), numFunctions));
// To keep track of where we are and how things are going.
size_t currentFunction = 0;
More information about the mlpack-git
mailing list