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
7bb2fac5
"vscode:/vscode.git/clone" did not exist on "8b4f8ba764ae4c358bf896288344db8831814b06"
Unverified
Commit
7bb2fac5
authored
Jun 22, 2019
by
Matthias Fey
Committed by
GitHub
Jun 22, 2019
Browse files
Merge pull request #20 from ekagra-ranjan/patch-2
Fix Docs
parents
bbcfa9b7
ccd5ddd3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
README.md
README.md
+6
-2
No files found.
README.md
View file @
7bb2fac5
...
...
@@ -77,6 +77,7 @@ For scattering, any operation of [`torch_scatter`](https://github.com/rusty1s/py
### Example
```
python
import
torch
from
torch_sparse
import
coalesce
index
=
torch
.
tensor
([[
1
,
0
,
1
,
0
,
2
,
1
],
...
...
@@ -120,6 +121,7 @@ Transposes dimensions 0 and 1 of a sparse matrix.
### Example
```
python
import
torch
from
torch_sparse
import
transpose
index
=
torch
.
tensor
([[
1
,
0
,
1
,
0
,
2
,
1
],
...
...
@@ -163,6 +165,7 @@ Matrix product of a sparse matrix with a dense matrix.
### Example
```
python
import
torch
from
torch_sparse
import
spmm
index
=
torch
.
tensor
([[
0
,
0
,
1
,
2
,
2
],
...
...
@@ -207,6 +210,7 @@ Both input sparse matrices need to be **coalesced**.
### Example
```
python
import
torch
from
torch_sparse
import
spspmm
indexA
=
torch
.
tensor
([[
0
,
0
,
1
,
2
,
2
],
[
1
,
2
,
0
,
0
,
1
]])
...
...
@@ -219,10 +223,10 @@ indexC, valueC = spspmm(indexA, valueA, indexB, valueB, 3, 3, 2)
```
```
print(index)
print(index
C
)
tensor([[0, 1, 2],
[0, 1, 1]])
print(value)
print(value
C
)
tensor([8.0, 6.0, 8.0])
```
...
...
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