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-spline-conv
Commits
c7bef763
Commit
c7bef763
authored
Apr 29, 2018
by
rusty1s
Browse files
bugfix
parent
64777175
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torch_spline_conv/utils/degree.py
torch_spline_conv/utils/degree.py
+1
-1
No files found.
torch_spline_conv/utils/degree.py
View file @
c7bef763
...
...
@@ -2,6 +2,6 @@ import torch
def
degree
(
index
,
num_nodes
=
None
,
dtype
=
None
,
device
=
None
):
num_nodes
=
index
.
max
()
+
1
if
num_nodes
is
None
else
num_nodes
num_nodes
=
index
.
max
()
.
item
()
+
1
if
num_nodes
is
None
else
num_nodes
out
=
torch
.
zeros
((
num_nodes
),
dtype
=
dtype
,
device
=
device
)
return
out
.
scatter_add_
(
0
,
index
,
out
.
new_ones
((
index
.
size
(
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