Commit bccaa10e authored by rusty1s's avatar rusty1s
Browse files

merge

parents 76d04d6f 668dd20c
...@@ -20,6 +20,6 @@ def coalesce(index, value, m, n, op="add"): ...@@ -20,6 +20,6 @@ def coalesce(index, value, m, n, op="add"):
""" """
storage = SparseStorage(row=index[0], col=index[1], value=value, storage = SparseStorage(row=index[0], col=index[1], value=value,
sparse_sizes=torch.Size([m, n], is_sorted=False)) sparse_sizes=torch.Size([m, n]), is_sorted=False)
storage = storage.coalesce(reduce=op) storage = storage.coalesce(reduce=op)
return torch.stack([storage.row(), storage.col()], dim=0), storage.value() return torch.stack([storage.row(), storage.col()], dim=0), storage.value()
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