Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-sparse
Commits
496203d8
Commit
496203d8
authored
Jun 22, 2019
by
rusty1s
Browse files
linting
parent
98ecdbed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
README.md
README.md
+1
-1
torch_sparse/spspmm.py
torch_sparse/spspmm.py
+2
-2
torch_sparse/transpose.py
torch_sparse/transpose.py
+3
-2
No files found.
README.md
View file @
496203d8
...
@@ -112,7 +112,7 @@ Transposes dimensions 0 and 1 of a sparse matrix.
...
@@ -112,7 +112,7 @@ Transposes dimensions 0 and 1 of a sparse matrix.
*
**value**
*(Tensor)*
- The value tensor of sparse matrix.
*
**value**
*(Tensor)*
- The value tensor of sparse matrix.
*
**m**
*(int)*
- The first dimension of corresponding dense matrix.
*
**m**
*(int)*
- The first dimension of corresponding dense matrix.
*
**n**
*(int)*
- The second dimension of corresponding dense matrix.
*
**n**
*(int)*
- The second dimension of corresponding dense matrix.
*
**coalesce**
*(bool, optional)*
-
To return coalesced index and value or no
t (default:
`True`
)
*
**coalesce
d
**
*(bool, optional)*
-
If set to
`False`
, will not coalesce the outpu
t (default:
`True`
)
### Returns
### Returns
...
...
torch_sparse/spspmm.py
View file @
496203d8
...
@@ -17,8 +17,8 @@ def spspmm(indexA, valueA, indexB, valueB, m, k, n):
...
@@ -17,8 +17,8 @@ def spspmm(indexA, valueA, indexB, valueB, m, k, n):
indexB (:class:`LongTensor`): The index tensor of second sparse matrix.
indexB (:class:`LongTensor`): The index tensor of second sparse matrix.
valueB (:class:`Tensor`): The value tensor of second sparse matrix.
valueB (:class:`Tensor`): The value tensor of second sparse matrix.
m (int): The first dimension of first corresponding dense matrix.
m (int): The first dimension of first corresponding dense matrix.
k (int): The second dimension of first corresponding dense matrix and
first
k (int): The second dimension of first corresponding dense matrix and
dimension of second corresponding dense matrix.
first
dimension of second corresponding dense matrix.
n (int): The second dimension of second corresponding dense matrix.
n (int): The second dimension of second corresponding dense matrix.
:rtype: (:class:`LongTensor`, :class:`Tensor`)
:rtype: (:class:`LongTensor`, :class:`Tensor`)
...
...
torch_sparse/transpose.py
View file @
496203d8
...
@@ -2,7 +2,7 @@ import torch
...
@@ -2,7 +2,7 @@ import torch
from
torch_sparse
import
to_scipy
,
from_scipy
,
coalesce
from
torch_sparse
import
to_scipy
,
from_scipy
,
coalesce
def
transpose
(
index
,
value
,
m
,
n
m
coalesce
=
True
):
def
transpose
(
index
,
value
,
m
,
n
,
coalesce
d
=
True
):
"""Transposes dimensions 0 and 1 of a sparse tensor.
"""Transposes dimensions 0 and 1 of a sparse tensor.
Args:
Args:
...
@@ -10,7 +10,8 @@ def transpose(index, value, m, nm coalesce=True):
...
@@ -10,7 +10,8 @@ def transpose(index, value, m, nm coalesce=True):
value (:class:`Tensor`): The value tensor of sparse matrix.
value (:class:`Tensor`): The value tensor of sparse matrix.
m (int): The first dimension of corresponding dense matrix.
m (int): The first dimension of corresponding dense matrix.
n (int): The second dimension of corresponding dense matrix.
n (int): The second dimension of corresponding dense matrix.
coalesce (bool, optional): To return coalesced index and value or not (default: :obj:`True`)
coalesced (bool, optional): If set to :obj:`False`, will not coalesce
the output (default: :obj:`True`)
:rtype: (:class:`LongTensor`, :class:`Tensor`)
:rtype: (:class:`LongTensor`, :class:`Tensor`)
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment