SoftmaxRegression Fix
This commit is contained in:
@@ -348,18 +348,18 @@ BOOST_AUTO_TEST_CASE(SoftmaxRegressionDiffLambdaTest)
|
||||
|
||||
// Check that initial parameters and final parameters matrix
|
||||
// using saved model are different.
|
||||
bool flag = true;
|
||||
bool flag = false;
|
||||
bool* flagPtr = &flag;
|
||||
for (size_t i = 0; i < modelParam.n_elem; ++i)
|
||||
{
|
||||
if ((int) modelParam[i] * 1e+6 == (int) CLI::GetParam<SoftmaxRegression>
|
||||
("output_model").Parameters()[i] * 1e+6)
|
||||
if ((int) (modelParam[i] * 1e+6) != (int) (CLI::GetParam<SoftmaxRegression>
|
||||
("output_model").Parameters()[i] * 1e+6))
|
||||
{
|
||||
*flagPtr = false;
|
||||
*flagPtr = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
BOOST_REQUIRE_EQUAL(flag, false);
|
||||
BOOST_REQUIRE_EQUAL(flag, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -427,18 +427,18 @@ BOOST_AUTO_TEST_CASE(SoftmaxRegressionDiffMaxItrTest)
|
||||
|
||||
// Check that initial parameters and final parameters matrix
|
||||
// using saved model are different.
|
||||
bool flag = true;
|
||||
bool flag = false;
|
||||
bool* flagPtr = &flag;
|
||||
for (size_t i = 0; i < modelParam.n_elem; ++i)
|
||||
{
|
||||
if ((int) modelParam[i] * 1e+6 == (int) CLI::GetParam<SoftmaxRegression>
|
||||
("output_model").Parameters()[i] * 1e+6)
|
||||
if ((int) (modelParam[i] * 1e+6) != (int) (CLI::GetParam<SoftmaxRegression>
|
||||
("output_model").Parameters()[i] * 1e+6))
|
||||
{
|
||||
*flagPtr = false;
|
||||
*flagPtr = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
BOOST_REQUIRE_EQUAL(flag, false);
|
||||
BOOST_REQUIRE_EQUAL(flag, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user