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
f2208025
Commit
f2208025
authored
Apr 12, 2018
by
rusty1s
Browse files
0.3.0 fix
parent
0ea4cb8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
torch_spline_conv/utils/degree.py
torch_spline_conv/utils/degree.py
+6
-1
No files found.
torch_spline_conv/utils/degree.py
View file @
f2208025
...
...
@@ -4,6 +4,11 @@ from .new import new
def
node_degree
(
index
,
n
,
out
=
None
):
zero
=
torch
.
zeros
(
n
)
if
out
is
None
else
out
.
resize_
(
n
).
fill_
(
0
)
if
out
is
None
:
zero
=
torch
.
zeros
(
n
)
else
:
out
.
resize_
(
n
)
if
torch
.
is_tensor
(
out
)
else
out
.
data
.
resize_
(
n
)
zero
=
out
.
fill_
(
0
)
one
=
new
(
zero
,
index
.
size
(
0
)).
fill_
(
1
)
return
zero
.
scatter_add_
(
0
,
index
,
one
)
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