[mlpack-git] master: Use testData and testResponses to create the test set. (a1486eb)
gitdub at mlpack.org
gitdub at mlpack.org
Tue Feb 23 10:06:35 EST 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/4ce5e6f1d242c2f13399a2c4dda2bbf8916a8ac4...a1486ebcf59391b69ffca6790d8f56239a03f1c5
>---------------------------------------------------------------
commit a1486ebcf59391b69ffca6790d8f56239a03f1c5
Author: marcus <marcus.edel at fu-berlin.de>
Date: Tue Feb 23 16:06:21 2016 +0100
Use testData and testResponses to create the test set.
>---------------------------------------------------------------
a1486ebcf59391b69ffca6790d8f56239a03f1c5
src/mlpack/methods/ann/layer/base_layer.hpp | 16 +++-------------
src/mlpack/tests/minibatch_sgd_test.cpp | 8 ++++----
2 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/src/mlpack/methods/ann/layer/base_layer.hpp b/src/mlpack/methods/ann/layer/base_layer.hpp
index d3c3b77..1b9f0d8 100644
--- a/src/mlpack/methods/ann/layer/base_layer.hpp
+++ b/src/mlpack/methods/ann/layer/base_layer.hpp
@@ -51,16 +51,6 @@ class BaseLayer
// Nothing to do here.
}
- BaseLayer(BaseLayer &&layer) noexcept
- {
- *this = std::move(layer);
- }
-
- BaseLayer& operator=(BaseLayer &&/* unused */) noexcept
- {
- return *this;
- }
-
/**
* Ordinary feed forward pass of a neural network, evaluating the function
* f(x) by propagating the activity forward through f.
@@ -130,17 +120,17 @@ class BaseLayer
}
//! Get the input parameter.
- InputDataType& InputParameter() const {return inputParameter; }
+ InputDataType& InputParameter() const { return inputParameter; }
//! Modify the input parameter.
InputDataType& InputParameter() { return inputParameter; }
//! Get the output parameter.
- OutputDataType& OutputParameter() const {return outputParameter; }
+ OutputDataType& OutputParameter() const { return outputParameter; }
//! Modify the output parameter.
OutputDataType& OutputParameter() { return outputParameter; }
//! Get the delta.
- OutputDataType const& Delta() const {return delta; }
+ OutputDataType const& Delta() const { return delta; }
//! Modify the delta.
OutputDataType& Delta() { return delta; }
diff --git a/src/mlpack/tests/minibatch_sgd_test.cpp b/src/mlpack/tests/minibatch_sgd_test.cpp
index 972980b..8be384d 100644
--- a/src/mlpack/tests/minibatch_sgd_test.cpp
+++ b/src/mlpack/tests/minibatch_sgd_test.cpp
@@ -104,13 +104,13 @@ BOOST_AUTO_TEST_CASE(LogisticRegressionTest)
arma::Row<size_t> testResponses(1000);
for (size_t i = 0; i < 500; ++i)
{
- data.col(i) = g1.Random();
- responses[i] = 0;
+ testData.col(i) = g1.Random();
+ testResponses[i] = 0;
}
for (size_t i = 501; i < 1000; ++i)
{
- data.col(i) = g2.Random();
- responses[i] = 1;
+ testData.col(i) = g2.Random();
+ testResponses[i] = 1;
}
// Now run mini-batch SGD with a couple of batch sizes.
More information about the mlpack-git
mailing list