Skip to content

Commit

Permalink
Merge pull request #16 from alfatum/main
Browse files Browse the repository at this point in the history
Wrong device in ttv_tensor.py bug fixed
  • Loading branch information
MaksimEkin authored Dec 18, 2023
2 parents c580409 + 5c42f6c commit 129c948
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
description='pyCP_APR: CP-APR Tensor Decomposition with PyTorch Backend.',
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
package_dir={'pyCP_APR': 'pyCP_APR/'},
package_dir={'pyCP_APR': 'pyCP_APR'},
platforms = ["Linux", "Mac", "Windows"],
include_package_data=True,
setup_requires=[
Expand Down

0 comments on commit 129c948

Please sign in to comment.