[mlpack-git] master: Adjust the performance function test; use the simplified performance function. (61d7876)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Mon Jun 1 17:28:35 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/0547fb75a32eda7e273651a7e6b6a258c5885a1e...61d7876048f2208cf45d41d71f9d4baa825e2a51
>---------------------------------------------------------------
commit 61d7876048f2208cf45d41d71f9d4baa825e2a51
Author: Marcus Edel <marcus.edel at fu-berlin.de>
Date: Mon Jun 1 23:28:09 2015 +0200
Adjust the performance function test; use the simplified performance function.
>---------------------------------------------------------------
61d7876048f2208cf45d41d71f9d4baa825e2a51
src/mlpack/methods/ann/init_rules/random_init.hpp | 4 ++--
src/mlpack/tests/activation_functions_test.cpp | 2 +-
src/mlpack/tests/performance_functions_test.cpp | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/mlpack/methods/ann/init_rules/random_init.hpp b/src/mlpack/methods/ann/init_rules/random_init.hpp
index c7714f8..4e38623 100644
--- a/src/mlpack/methods/ann/init_rules/random_init.hpp
+++ b/src/mlpack/methods/ann/init_rules/random_init.hpp
@@ -26,8 +26,8 @@ class RandomInitialization
* @param lowerBound The number used as lower bound.
* @param upperBound The number used as upper bound.
*/
- RandomInitialization(const double lowerBound = -0.05,
- const double upperBound = 0.05) :
+ RandomInitialization(const double lowerBound = -1,
+ const double upperBound = 1) :
lowerBound(lowerBound), upperBound(upperBound) { }
/**
diff --git a/src/mlpack/tests/activation_functions_test.cpp b/src/mlpack/tests/activation_functions_test.cpp
index 5d2ce2d..1aa9926 100644
--- a/src/mlpack/tests/activation_functions_test.cpp
+++ b/src/mlpack/tests/activation_functions_test.cpp
@@ -215,7 +215,7 @@ void CheckGradientNumericallyCorrect(const arma::colvec input,
const double threshold)
{
// Specify the structure of the feed forward neural network.
- RandomInitialization<> randInit(-0.5, 0.5);
+ RandomInitialization randInit(-0.5, 0.5);
arma::colvec error;
NeuronLayer<ActivationFunction> inputLayer(input.n_elem);
diff --git a/src/mlpack/tests/performance_functions_test.cpp b/src/mlpack/tests/performance_functions_test.cpp
index 31eec7e..84839a1 100644
--- a/src/mlpack/tests/performance_functions_test.cpp
+++ b/src/mlpack/tests/performance_functions_test.cpp
@@ -24,7 +24,7 @@ BOOST_AUTO_TEST_CASE(MeanSquaredErrorTest)
arma::colvec input("1.0 0.0 1.0 0.0 -1.0 0.0 -1.0 0.0");
arma::colvec target = arma::zeros<arma::colvec>(8);
- BOOST_REQUIRE_EQUAL(MeanSquaredErrorFunction<>::Error(input, target), 0.5);
+ BOOST_REQUIRE_EQUAL(MeanSquaredErrorFunction::Error(input, target), 0.5);
}
// Test the cross entropy performance function.
@@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE(SumSquaredErrorTest)
arma::colvec input("1.0 0.0 1.0 0.0 -1.0 0.0 -1.0 0.0");
arma::colvec target = arma::zeros<arma::colvec>(8);
- BOOST_REQUIRE_EQUAL(SumSquaredErrorFunction<>::Error(input, target), 4);
+ BOOST_REQUIRE_EQUAL(SumSquaredErrorFunction::Error(input, target), 4);
}
BOOST_AUTO_TEST_SUITE_END();
More information about the mlpack-git
mailing list