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 I'm trying to do this simple element wise multiplication:
"""
A = tn.ones(10,10).to(torch.long)
B = tn.rand(10,10).to(torch.long)
result = tn.mul(A,B)
"""
I get an error saying that tensors used as indices must be long, byte or bool. However, it seems like the error is produced within the tn.cross function. Any ideas on how to fix this?
Thank you and cheers,
Bastien
The text was updated successfully, but these errors were encountered:
Hi Bastien, I just tested this (with PyTorch 2.0) and this error is not thrown, but an error at a later point is thrown instead:
RuntimeError: linalg.vector_norm: Expected a floating point or complex tensor as input. Got Long
At the moment, several tensor algorithms like cross-approximation will work for floating-point data only, as PyTorch functions like torch.linalg.norm don't support integer types yet.
You can still do element-wise multiplication of two compressed tensors like this: A*B. However, keep in mind that for larger tensors this is less efficient than the cross-approximated version tn.mul().
Hi All,
When I'm trying to do this simple element wise multiplication:
"""
A = tn.ones(10,10).to(torch.long)
B = tn.rand(10,10).to(torch.long)
result = tn.mul(A,B)
"""
I get an error saying that tensors used as indices must be long, byte or bool. However, it seems like the error is produced within the tn.cross function. Any ideas on how to fix this?
Thank you and cheers,
Bastien
The text was updated successfully, but these errors were encountered: