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
2ca31691
Commit
2ca31691
authored
Jun 22, 2019
by
ekagra-ranjan
Browse files
Improve Code Docs
parent
bab40181
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
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.
torch_sparse/coalesce.py
View file @
2ca31691
...
@@ -13,8 +13,8 @@ def coalesce(index, value, m, n, op='add', fill_value=0):
...
@@ -13,8 +13,8 @@ def coalesce(index, value, m, n, op='add', fill_value=0):
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
spar
se matrix.
m (int): The first dimension of
corresponding den
se matrix.
n (int): The second dimension of
spar
se matrix.
n (int): The second dimension of
corresponding den
se matrix.
op (string, optional): The scatter operation to use. (default:
op (string, optional): The scatter operation to use. (default:
:obj:`"add"`)
:obj:`"add"`)
fill_value (int, optional): The initial fill value of scatter
fill_value (int, optional): The initial fill value of scatter
...
...
torch_sparse/eye.py
View file @
2ca31691
...
@@ -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
spar
se matrix.
m (int): The first dimension of
corresponding den
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 @
2ca31691
...
@@ -7,8 +7,8 @@ def spmm(index, value, m, n, matrix):
...
@@ -7,8 +7,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
spar
se matrix.
m (int): The first dimension of
corresponding den
se matrix.
n (int): The second dimension of
spar
se matrix.
n (int): The second dimension of
corresponding den
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 @
2ca31691
...
@@ -16,10 +16,10 @@ def spspmm(indexA, valueA, indexB, valueB, m, k, n):
...
@@ -16,10 +16,10 @@ def spspmm(indexA, valueA, indexB, valueB, m, k, n):
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
spar
se matrix.
m (int): The first dimension of first
corresponding den
se matrix.
k (int): The second dimension of first
spar
se matrix and first
k (int): The second dimension of first
corresponding den
se matrix and first
dimension of second
spar
se matrix.
dimension of second
corresponding den
se matrix.
n (int): The second dimension of second
spar
se matrix.
n (int): The second dimension of second
corresponding den
se matrix.
:rtype: (:class:`LongTensor`, :class:`Tensor`)
:rtype: (:class:`LongTensor`, :class:`Tensor`)
"""
"""
...
...
torch_sparse/transpose.py
View file @
2ca31691
...
@@ -8,8 +8,8 @@ def transpose(index, value, m, n):
...
@@ -8,8 +8,8 @@ def transpose(index, value, m, n):
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
spar
se matrix.
m (int): The first dimension of
corresponding den
se matrix.
n (int): The second dimension of
spar
se matrix.
n (int): The second dimension of
corresponding den
se matrix.
: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