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
5b9304b9
Commit
5b9304b9
authored
Apr 12, 2020
by
bowendeng
Browse files
code clean
parent
0090f4ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
torch_sparse/metis.py
torch_sparse/metis.py
+2
-3
No files found.
torch_sparse/metis.py
View file @
5b9304b9
...
...
@@ -18,9 +18,8 @@ def metis_wgt(x):
return
(
x_ratio
*
arange
+
tick
).
long
(),
tick
,
arange
def
partition
(
src
:
SparseTensor
,
num_parts
:
int
,
recursive
:
bool
=
False
)
->
Tuple
[
SparseTensor
,
torch
.
Tensor
,
torch
.
Tensor
]:
def
partition
(
src
:
SparseTensor
,
num_parts
:
int
,
recursive
:
bool
=
False
)
->
Tuple
[
SparseTensor
,
torch
.
Tensor
,
torch
.
Tensor
]:
rowptr
,
col
=
src
.
storage
.
rowptr
().
cpu
(),
src
.
storage
.
col
().
cpu
()
edge_wgt
=
src
.
storage
.
value
().
cpu
()
edge_wgt
=
metis_wgt
(
edge_wgt
)[
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