[mlpack-git] master: fix bug--range error (b317138)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Mon Nov 30 10:40:19 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/5aaf0e441dd64a5de9a0210aa7a837eecf162d12...e4519fc42a2a340cf0387ab082bf49b9715c871b
>---------------------------------------------------------------
commit b317138877bd01ab1b2c7f4d167105a7ede63190
Author: stereomatchingkiss <stereomatchingkiss at gmail.com>
Date: Fri Nov 6 11:41:48 2015 +0800
fix bug--range error
>---------------------------------------------------------------
b317138877bd01ab1b2c7f4d167105a7ede63190
src/mlpack/methods/sparse_autoencoder/maximal_inputs.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mlpack/methods/sparse_autoencoder/maximal_inputs.cpp b/src/mlpack/methods/sparse_autoencoder/maximal_inputs.cpp
index db68616..661c6c5 100644
--- a/src/mlpack/methods/sparse_autoencoder/maximal_inputs.cpp
+++ b/src/mlpack/methods/sparse_autoencoder/maximal_inputs.cpp
@@ -85,10 +85,10 @@ void ColumnsToBlocks(const arma::mat &maximalInputs,
for(arma::uword i = 0; i != rows; ++i) {
for(arma::uword j = 0; j != cols; ++j) {
// Now, copy the elements of the row to the output submatrix.
- const arma::uword minRow = i * offset;
- const arma::uword minCol = j * offset;
- const arma::uword maxRow = i * offset + squareRows - 1;
- const arma::uword maxCol = j * offset + squareRows - 1;
+ const arma::uword minRow = buf + i * offset;
+ const arma::uword minCol = buf + j * offset;
+ const arma::uword maxRow = i * offset + squareRows;
+ const arma::uword maxCol = j * offset + squareRows;
outputs.submat(minRow, minCol, maxRow, maxCol) =
arma::reshape(maximalInputs.col(k++), squareRows, squareRows);
More information about the mlpack-git
mailing list