Skip to content

Commit

Permalink
fix deprecation warning (dmlc#1147)
Browse files Browse the repository at this point in the history
  • Loading branch information
BarclayII authored Dec 28, 2019
1 parent 913e324 commit 655d756
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/dgl/backend/pytorch/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def backward(ctx, grad_out):
reducer, binary_op, graph, lhs, rhs, lhs_map, rhs_map, out_map, \
lhs_data_nd, rhs_data_nd, feat_shape, degs \
= ctx.backward_cache
out_data, = ctx.saved_variables
out_data, = ctx.saved_tensors
out_data_nd = zerocopy_to_dgl_ndarray(out_data)
grad_lhs = None
grad_rhs = None
Expand Down Expand Up @@ -395,7 +395,7 @@ def forward(ctx, reducer, graph, target, in_data, out_size, in_map,
def backward(ctx, grad_out):
reducer, graph, target, in_map, out_map, in_data_nd, degs \
= ctx.backward_cache
out_data, = ctx.saved_variables
out_data, = ctx.saved_tensors
out_data_nd = zerocopy_to_dgl_ndarray(out_data)
grad_in = None
if reducer == 'mean':
Expand Down

0 comments on commit 655d756

Please sign in to comment.