Commit 12e44786 authored by wang-ps's avatar wang-ps
Browse files

Fix several typos

parent eabdc584
...@@ -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 dense matrix. * **m** *(int)* - The first dimension of sparse matrix.
* **n** *(int)* - The second dimension of corresponding dense matrix. * **n** *(int)* - The second dimension of sparse 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 dense matrix. * **m** *(int)* - The first dimension of sparse matrix.
* **n** *(int)* - The second dimension of corresponding dense matrix. * **n** *(int)* - The second dimension of sparse 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 dense matrix. * **m** *(int)* - The first dimension of sparse matrix.
* **n** *(int)* - The second dimension of corresponding dense matrix. * **n** *(int)* - The second dimension of sparse 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 dense matrix. * **m** *(int)* - The first dimension of first sparse matrix.
* **k** *(int)* - The second dimension of first corresponding dense matrix and first dimension of second corresponding dense matrix. * **k** *(int)* - The second dimension of first sparse matrix and first dimension of second sparse matrix.
* **n** *(int)* - The second dimension of second corresponding dense matrix. * **n** *(int)* - The second dimension of second sparse 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
......
...@@ -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 dense matrix. m (int): The first dimension of sparse matrix.
n (int): The second dimension of corresponding dense matrix. n (int): The second dimension of sparse matrix.
op (string, optional): The scatter operation to use. (default: op (string, optional): The scatter operation to use. (default:
:obj:`"add"`) :obj:`"add"`)
......
...@@ -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 dense matrix. m (int): The first dimension of sparse 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
......
...@@ -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 dense matrix. m (int): The first dimension of sparse matrix.
n (int): The second dimension of corresponding dense matrix. n (int): The second dimension of sparse matrix.
matrix (:class:`Tensor`): The dense matrix. matrix (:class:`Tensor`): The dense matrix.
:rtype: :class:`Tensor` :rtype: :class:`Tensor`
......
...@@ -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 dense matrix. m (int): The first dimension of first sparse matrix.
k (int): The second dimension of first corresponding dense matrix and k (int): The second dimension of first sparse matrix and first
first dimension of second corresponding dense matrix. dimension of second sparse matrix.
n (int): The second dimension of second corresponding dense matrix. n (int): The second dimension of second sparse 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`)
......
...@@ -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 dense matrix. m (int): The first dimension of sparse matrix.
n (int): The second dimension of corresponding dense matrix. n (int): The second dimension of sparse 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`)
......
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