Skip to content

Commit

Permalink
wrong device in ttv_tensor.py bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
alfatum committed Dec 18, 2023
1 parent bdaed6e commit 5c42f6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyCP_APR/torch_backend/ttv_sptensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def ttv(M, vecs, dims=[]):
product of KRUSKAL tensor X with a (column) vector vecs.
"""

dims = tr.arange(M.Dimensions)
vidx = tr.arange(M.Dimensions)
dims = tr.arange(M.Dimensions).to(M.device)
vidx = tr.arange(M.Dimensions).to(M.device)

combined = tr.cat((dims, vidx))
uniques, counts = combined.unique(return_counts=True)
Expand Down

0 comments on commit 5c42f6c

Please sign in to comment.