diff --git a/HISTORY.md b/HISTORY.md index b29f02cc2..882c72be3 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -6,6 +6,8 @@ * Fix potential infinite loop in CMAES ([#331](https://github.com/mlpack/ensmallen/pull/331)). + * Fix SCD partial gradient test + ([#332](https://github.com/mlpack/ensmallen/pull/332)). ### ensmallen 2.18.0: "Fairmount Bagel" ###### 2021-10-20 diff --git a/tests/scd_test.cpp b/tests/scd_test.cpp index 7cc5bd252..fa415942e 100644 --- a/tests/scd_test.cpp +++ b/tests/scd_test.cpp @@ -196,7 +196,7 @@ TEST_CASE("SoftmaxRegressionFunctionPartialGradientTest", "[SCDTest]") // Create random class labels. arma::Row labels = arma::randi >( - points, arma::distr_param(0, numClasses)); + points, arma::distr_param(0, numClasses - 1)); // 2 objects for 2 terms in the cost function. Each term contributes towards // the gradient and thus need to be checked independently.