Commit 0b790779 authored by rusty1s's avatar rusty1s
Browse files

inverse if

parent f6aaacc1
......@@ -35,10 +35,10 @@ def transpose_matrix(index, value, m, n):
assert value.dim() == 1
if not index.is_cuda:
if index.is_cuda:
return transpose(index, value, m, n)
else:
mat = to_scipy(index, value, m, n).tocsc()
(col, row), value = from_scipy(mat)
index = torch.stack([row, col], dim=0)
return index, value
else:
return transpose(index, value, m, n)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment