Skip to content

Commit

Permalink
I was testing the wrong function on accident
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Jan 22, 2024
1 parent d21ee08 commit fd015d5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions unittest/ztensor_cp_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,16 @@ TEST_CASE("ZCP") {
conv.verbose(false);
}
#endif
std::cout.precision(16);
SECTION("ALS MODE = 4, Finite error") {
CP_ALS<ztensor, zconv_class> A1(Z4);
conv.set_norm(norm4.real());
double diff = A1.compute_error(conv, 1e-5, 1, 100, true, 57);
std::cout << diff << std::endl;
std::cout << epsilon << std::endl;
std::cout << A1.get_factor_matrices()[1].extent(1) << std::endl;
double diff = A1.compute_error(conv, 1e-2, 1, 100, true, 57);
CHECK(std::abs(diff) <= epsilon);
}
SECTION("ALS MODE = 4, Finite rank") {
CP_ALS<ztensor, zconv_class> A1(Z4);
conv.set_norm(norm4.real());
double diff = A1.compute_rank(80, conv, 1, true, 80);
double diff = A1.compute_rank(57, conv, 1, true, 57);
CHECK(std::abs(diff) <= epsilon);
}
#if BTAS_ENABLE_TUCKER_CP_UT
Expand Down Expand Up @@ -156,7 +152,11 @@ TEST_CASE("ZCP") {
SECTION("RALS MODE = 4, Finite error"){
CP_RALS<ztensor, zconv_class> A1(Z4);
conv.set_norm(norm4.real());
double diff = A1.compute_error(conv, 1e-2, 1, 67, true, 65);
double diff = A1.compute_error(conv, 1e-5, 1, 100, true, 65);
std::cout.precision(16);
std::cout << diff << std::endl;
std::cout << epsilon << std::endl;
std::cout << A1.get_factor_matrices()[1].extent(1) << std::endl;
CHECK(std::abs(diff) <= epsilon);
}
#if BTAS_ENABLE_TUCKER_CP_UT
Expand Down

0 comments on commit fd015d5

Please sign in to comment.