Skip to content

Commit

Permalink
update BCD printing
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT committed Aug 22, 2023
1 parent 4008a5e commit 4a1304c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions btas/generic/cp_bcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ namespace btas{
// initial : gradient = E
// gradient = E - A1
for (long b = 1; b < n_blocks; ++b) {
std::cout << "\tnorm (remainder) / tref: " << norm(gradient) / norm(tensor_ref) << std::endl;
this->AtA = std::vector<Tensor>(ndim);
BCD(block_sizes[b - 1], block_sizes[b], max_als, fast_pI, matlab, converge_test, s);
std::cout << "\tnorm (remainder) / tref: " << norm(gradient) / norm(tensor_ref) << std::endl;
// Test the system to see if converged. Doing the hard way first
// To compute the accuracy fully compute CP approximation using blocks 0 through b.
if(compute_full_fit) {
Expand All @@ -187,7 +187,7 @@ namespace btas{
// compute_full(block_step + last_blocksize, one_over_tref, change, fit);
// }
// }
std::cout << "\t\tnorm grad / tref: " << norm(gradient) / norm(tensor_ref) << std::endl;
//std::cout << "\t\tnorm grad / tref: " << norm(gradient) / norm(tensor_ref) << std::endl;
epsilon = (compute_full_fit == false ?
1.0 - this->norm(gradient) * one_over_tref
: fit);
Expand Down Expand Up @@ -269,7 +269,7 @@ namespace btas{
gradient += reconstruct(A, order, A[ndim]);

}
std::cout << "\t\tnorm(remainder + hat{T}_block) / tref: " << norm(gradient) / norm(tensor_ref) << std::endl;
//std::cout << "\t\tnorm(remainder + hat{T}_block) / tref: " << norm(gradient) / norm(tensor_ref) << std::endl;
// Do the ALS loop
//CP_ALS::ALS(cur_block_size, converge_test, dir, max_als, calculate_epsilon, epsilon, fast_pI);
// First do it manually, so we know its right
Expand All @@ -278,7 +278,7 @@ namespace btas{
size_t count = 0;
bool is_converged = false;
detail::set_norm(converge_test, this->norm(gradient));
converge_test.verbose(true);
converge_test.verbose(false);
do {
++count;
this->num_ALS++;
Expand Down

0 comments on commit 4a1304c

Please sign in to comment.