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
2b6d2b36
Unverified
Commit
2b6d2b36
authored
Apr 25, 2021
by
Matthias Fey
Committed by
GitHub
Apr 25, 2021
Browse files
Merge pull request #133 from wang-ps/master
Fix several typos
parents
eabdc584
12e44786
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
20 deletions
+20
-20
README.md
README.md
+9
-9
torch_sparse/coalesce.py
torch_sparse/coalesce.py
+2
-2
torch_sparse/eye.py
torch_sparse/eye.py
+1
-1
torch_sparse/spmm.py
torch_sparse/spmm.py
+2
-2
torch_sparse/spspmm.py
torch_sparse/spspmm.py
+4
-4
torch_sparse/transpose.py
torch_sparse/transpose.py
+2
-2
No files found.
README.md
View file @
2b6d2b36
...
@@ -113,8 +113,8 @@ For scattering, any operation of [`torch_scatter`](https://github.com/rusty1s/py
...
@@ -113,8 +113,8 @@ For scattering, any operation of [`torch_scatter`](https://github.com/rusty1s/py
*
**index**
*(LongTensor)*
- The index tensor of sparse matrix.
*
**index**
*(LongTensor)*
- The index tensor of 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 den
se matrix.
*
**m**
*(int)*
- The first dimension of
spar
se matrix.
*
**n**
*(int)*
- The second dimension of
corresponding den
se matrix.
*
**n**
*(int)*
- The second dimension of
spar
se matrix.
*
**op**
*(string, optional)*
- The scatter operation to use. (default:
`"add"`
)
*
**op**
*(string, optional)*
- The scatter operation to use. (default:
`"add"`
)
#### Returns
#### Returns
...
@@ -158,8 +158,8 @@ Transposes dimensions 0 and 1 of a sparse matrix.
...
@@ -158,8 +158,8 @@ Transposes dimensions 0 and 1 of a sparse matrix.
*
**index**
*(LongTensor)*
- The index tensor of sparse matrix.
*
**index**
*(LongTensor)*
- The index tensor of 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 den
se matrix.
*
**m**
*(int)*
- The first dimension of
spar
se matrix.
*
**n**
*(int)*
- The second dimension of
corresponding den
se matrix.
*
**n**
*(int)*
- The second dimension of
spar
se matrix.
*
**coalesced**
*(bool, optional)*
- If set to
`False`
, will not coalesce the output. (default:
`True`
)
*
**coalesced**
*(bool, optional)*
- If set to
`False`
, will not coalesce the output. (default:
`True`
)
#### Returns
#### Returns
...
@@ -203,8 +203,8 @@ Matrix product of a sparse matrix with a dense matrix.
...
@@ -203,8 +203,8 @@ Matrix product of a sparse matrix with a dense matrix.
*
**index**
*(LongTensor)*
- The index tensor of sparse matrix.
*
**index**
*(LongTensor)*
- The index tensor of 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 den
se matrix.
*
**m**
*(int)*
- The first dimension of
spar
se matrix.
*
**n**
*(int)*
- The second dimension of
corresponding den
se matrix.
*
**n**
*(int)*
- The second dimension of
spar
se matrix.
*
**matrix**
*(Tensor)*
- The dense matrix.
*
**matrix**
*(Tensor)*
- The dense matrix.
#### Returns
#### Returns
...
@@ -247,9 +247,9 @@ Both input sparse matrices need to be **coalesced** (use the `coalesced` attribu
...
@@ -247,9 +247,9 @@ Both input sparse matrices need to be **coalesced** (use the `coalesced` attribu
*
**valueA**
*(Tensor)*
- The value tensor of first sparse matrix.
*
**valueA**
*(Tensor)*
- The value tensor of first sparse matrix.
*
**indexB**
*(LongTensor)*
- The index tensor of second sparse matrix.
*
**indexB**
*(LongTensor)*
- The index tensor of second sparse matrix.
*
**valueB**
*(Tensor)*
- The value tensor of second sparse matrix.
*
**valueB**
*(Tensor)*
- The value tensor of second sparse matrix.
*
**m**
*(int)*
- The first dimension of first
corresponding den
se matrix.
*
**m**
*(int)*
- The first dimension of first
spar
se matrix.
*
**k**
*(int)*
- The second dimension of first
corresponding den
se matrix and first dimension of second
corresponding den
se matrix.
*
**k**
*(int)*
- The second dimension of first
spar
se matrix and first dimension of second
spar
se matrix.
*
**n**
*(int)*
- The second dimension of second
corresponding den
se matrix.
*
**n**
*(int)*
- The second dimension of second
spar
se matrix.
*
**coalesced**
*(bool, optional)*
: If set to
`True`
, will coalesce both input sparse matrices. (default:
`False`
)
*
**coalesced**
*(bool, optional)*
: If set to
`True`
, will coalesce both input sparse matrices. (default:
`False`
)
#### Returns
#### Returns
...
...
torch_sparse/coalesce.py
View file @
2b6d2b36
...
@@ -11,8 +11,8 @@ def coalesce(index, value, m, n, op="add"):
...
@@ -11,8 +11,8 @@ def coalesce(index, value, m, n, op="add"):
Args:
Args:
index (:class:`LongTensor`): The index tensor of sparse matrix.
index (:class:`LongTensor`): The index tensor of sparse matrix.
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 den
se matrix.
m (int): The first dimension of
spar
se matrix.
n (int): The second dimension of
corresponding den
se matrix.
n (int): The second dimension of
spar
se matrix.
op (string, optional): The scatter operation to use. (default:
op (string, optional): The scatter operation to use. (default:
:obj:`"add"`)
:obj:`"add"`)
...
...
torch_sparse/eye.py
View file @
2b6d2b36
...
@@ -5,7 +5,7 @@ def eye(m, dtype=None, device=None):
...
@@ -5,7 +5,7 @@ def eye(m, dtype=None, device=None):
"""Returns a sparse matrix with ones on the diagonal and zeros elsewhere.
"""Returns a sparse matrix with ones on the diagonal and zeros elsewhere.
Args:
Args:
m (int): The first dimension of
corresponding den
se matrix.
m (int): The first dimension of
spar
se matrix.
dtype (`torch.dtype`, optional): The desired data type of returned
dtype (`torch.dtype`, optional): The desired data type of returned
value vector. (default is set by `torch.set_default_tensor_type()`)
value vector. (default is set by `torch.set_default_tensor_type()`)
device (`torch.device`, optional): The desired device of returned
device (`torch.device`, optional): The desired device of returned
...
...
torch_sparse/spmm.py
View file @
2b6d2b36
...
@@ -8,8 +8,8 @@ def spmm(index, value, m, n, matrix):
...
@@ -8,8 +8,8 @@ def spmm(index, value, m, n, matrix):
Args:
Args:
index (:class:`LongTensor`): The index tensor of sparse matrix.
index (:class:`LongTensor`): The index tensor of sparse matrix.
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 den
se matrix.
m (int): The first dimension of
spar
se matrix.
n (int): The second dimension of
corresponding den
se matrix.
n (int): The second dimension of
spar
se matrix.
matrix (:class:`Tensor`): The dense matrix.
matrix (:class:`Tensor`): The dense matrix.
:rtype: :class:`Tensor`
:rtype: :class:`Tensor`
...
...
torch_sparse/spspmm.py
View file @
2b6d2b36
...
@@ -12,10 +12,10 @@ def spspmm(indexA, valueA, indexB, valueB, m, k, n, coalesced=False):
...
@@ -12,10 +12,10 @@ def spspmm(indexA, valueA, indexB, valueB, m, k, n, coalesced=False):
valueA (:class:`Tensor`): The value tensor of first sparse matrix.
valueA (:class:`Tensor`): The value tensor of first sparse matrix.
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 den
se matrix.
m (int): The first dimension of first
spar
se matrix.
k (int): The second dimension of first
corresponding den
se matrix and
k (int): The second dimension of first
spar
se matrix and
first
first
dimension of second
corresponding den
se matrix.
dimension of second
spar
se matrix.
n (int): The second dimension of second
corresponding den
se matrix.
n (int): The second dimension of second
spar
se matrix.
coalesced (bool, optional): If set to :obj:`True`, will coalesce both
coalesced (bool, optional): If set to :obj:`True`, will coalesce both
input sparse matrices. (default: :obj:`False`)
input sparse matrices. (default: :obj:`False`)
...
...
torch_sparse/transpose.py
View file @
2b6d2b36
...
@@ -42,8 +42,8 @@ def transpose(index, value, m, n, coalesced=True):
...
@@ -42,8 +42,8 @@ def transpose(index, value, m, n, coalesced=True):
Args:
Args:
index (:class:`LongTensor`): The index tensor of sparse matrix.
index (:class:`LongTensor`): The index tensor of sparse matrix.
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 den
se matrix.
m (int): The first dimension of
spar
se matrix.
n (int): The second dimension of
corresponding den
se matrix.
n (int): The second dimension of
spar
se matrix.
coalesced (bool, optional): If set to :obj:`False`, will not coalesce
coalesced (bool, optional): If set to :obj:`False`, will not coalesce
the output. (default: :obj:`True`)
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