actual_first_ranks = np.array(first_static_ranks.as_list())[1:-1]
actual_first_ranks = actual_first_ranks[~np.isnan(actual_first_ranks)]
actual_second_ranks = np.array(second_static_ranks.as_list())[1:-1]
actual_second_ranks = actual_second_ranks[~np.isnan(actual_second_ranks)]
if any(actual_first_ranks % 2 != 0) or any(actual_second_ranks % 2 != 0):
raise ValueError("The TT-ranks of the arguments are not dividable by 2, it "
"seems like the arguments are not projections.\n"
"Consider using scalar_products_matrix which doesn\" "
After Change
Returns:
tf.tensor with the scalar product matrix.
if not hasattr(projected_tt_vectors_1, "projection_on") or \
not hasattr(projected_tt_vectors_2, "projection_on"):
raise ValueError("Both arguments should be projections on the tangent "
"space of some other TT-object. All projection* functions "