Unverified Commit 655d7568 authored by Quan (Andy) Gan's avatar Quan (Andy) Gan Committed by GitHub
Browse files

fix deprecation warning (#1147)

parent 913e3249
...@@ -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_variables out_data, = ctx.saved_tensors
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_variables out_data, = ctx.saved_tensors
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':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment