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-cluster
Commits
59121c84
Commit
59121c84
authored
Mar 26, 2018
by
rusty1s
Browse files
added todos
parent
abac33d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
test/test_random.py
test/test_random.py
+8
-3
No files found.
test/test_random.py
View file @
59121c84
...
...
@@ -7,7 +7,12 @@ def test_random():
[
2
,
3
,
6
,
5
,
0
,
0
,
4
,
5
,
3
,
1
,
3
,
6
,
0
,
3
]])
# edge_attr = torch.Tensor([2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2])
rid
=
torch
.
arange
(
edge_index
.
max
()
+
1
,
out
=
edge_index
.
new
())
output
=
random_cluster
(
edge_index
,
rid
=
rid
,
perm_edges
=
False
)
#
output = random_cluster(edge_index, rid=rid, perm_edges=False)
expected_output
=
[
0
,
1
,
2
,
0
,
3
,
1
,
4
]
assert
output
.
tolist
()
==
expected_output
# expected_output = [0, 1, 2, 0, 3, 1, 4]
# assert output.tolist() == expected_output
# TODO: Test only if conditions are met:
# * at most two pairs with the same cluster
# * pairs need to be neighbors of each other
# TODO: Rename to serial
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