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
dgl
Commits
655d7568
Unverified
Commit
655d7568
authored
Dec 28, 2019
by
Quan (Andy) Gan
Committed by
GitHub
Dec 28, 2019
Browse files
fix deprecation warning (#1147)
parent
913e3249
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python/dgl/backend/pytorch/tensor.py
python/dgl/backend/pytorch/tensor.py
+2
-2
No files found.
python/dgl/backend/pytorch/tensor.py
View file @
655d7568
...
@@ -333,7 +333,7 @@ class BinaryReduce(th.autograd.Function):
...
@@ -333,7 +333,7 @@ class BinaryReduce(th.autograd.Function):
reducer
,
binary_op
,
graph
,
lhs
,
rhs
,
lhs_map
,
rhs_map
,
out_map
,
\
reducer
,
binary_op
,
graph
,
lhs
,
rhs
,
lhs_map
,
rhs_map
,
out_map
,
\
lhs_data_nd
,
rhs_data_nd
,
feat_shape
,
degs
\
lhs_data_nd
,
rhs_data_nd
,
feat_shape
,
degs
\
=
ctx
.
backward_cache
=
ctx
.
backward_cache
out_data
,
=
ctx
.
saved_
variable
s
out_data
,
=
ctx
.
saved_
tensor
s
out_data_nd
=
zerocopy_to_dgl_ndarray
(
out_data
)
out_data_nd
=
zerocopy_to_dgl_ndarray
(
out_data
)
grad_lhs
=
None
grad_lhs
=
None
grad_rhs
=
None
grad_rhs
=
None
...
@@ -395,7 +395,7 @@ class CopyReduce(th.autograd.Function):
...
@@ -395,7 +395,7 @@ class CopyReduce(th.autograd.Function):
def
backward
(
ctx
,
grad_out
):
def
backward
(
ctx
,
grad_out
):
reducer
,
graph
,
target
,
in_map
,
out_map
,
in_data_nd
,
degs
\
reducer
,
graph
,
target
,
in_map
,
out_map
,
in_data_nd
,
degs
\
=
ctx
.
backward_cache
=
ctx
.
backward_cache
out_data
,
=
ctx
.
saved_
variable
s
out_data
,
=
ctx
.
saved_
tensor
s
out_data_nd
=
zerocopy_to_dgl_ndarray
(
out_data
)
out_data_nd
=
zerocopy_to_dgl_ndarray
(
out_data
)
grad_in
=
None
grad_in
=
None
if
reducer
==
'mean'
:
if
reducer
==
'mean'
:
...
...
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