You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Testing the random parafrac2 function fails throwing a error " ValueError: All the projection matrices of a PARAFAC2 tensor should have the same number of columns as the rank. However, rank=2 but projections[0].shape[1]=1" while validating when parafrac2Tensor object is being created by projection_matrices, weights and factors.
Steps or Code to Reproduce
For instance:
Arguments passed to random Tensor are
shapes = [(1, 1), (1, 1)]
rank =2
Expected behavior
projection shape should have the same rank as rank passed both 2
Actual result
But getting projection rank as 1 and actual rank is 2
Please paste or specifically describe the actual output or traceback.
for i, projection in enumerate(projections):
current_mode_size, current_rank = ivy.shape(projection)
if current_rank != rank:
> raise ValueError(
"All the projection matrices of a PARAFAC2 tensor should have the"
f" same number of columns as the rank. However, rank={rank} but"
f" projections[{i}].shape[1]={ivy.shape(projection)[1]}"
)
E ValueError: All the projection matrices of a PARAFAC2 tensor should have the same number of columns as the rank. However, rank=2 but projections[0].shape[1]=1
ivy/data_classes/factorized_tensor/parafac2_tensor.py:166: ValueError
Versions
The text was updated successfully, but these errors were encountered:
Thanks for the issue, @Mr-Niraj-Kulkarni. Does this ever happen with datasets of larger sizes? The rank cannot be larger than max(X.shape). We can certainly add a more descriptive error message for this situation.
aarmey
changed the title
Random Parafrac2 method projection_matrices failure
More descriptive message when random PARAFAC2 rank is infeasible given shape
Sep 27, 2023
Describe the bug
When Testing the random parafrac2 function fails throwing a error " ValueError: All the projection matrices of a PARAFAC2 tensor should have the same number of columns as the rank. However, rank=2 but projections[0].shape[1]=1" while validating when parafrac2Tensor object is being created by projection_matrices, weights and factors.
Steps or Code to Reproduce
For instance:
Arguments passed to random Tensor are
shapes = [(1, 1), (1, 1)]
rank =2
Expected behavior
projection shape should have the same rank as rank passed both 2
Actual result
But getting projection rank as 1 and actual rank is 2
Please paste or specifically describe the actual output or traceback.
Versions
The text was updated successfully, but these errors were encountered: