From 655d75688ac5a34b05c1c52ea754cfff9f3a6cfa Mon Sep 17 00:00:00 2001 From: "Quan (Andy) Gan" Date: Sat, 28 Dec 2019 12:42:16 +0800 Subject: [PATCH] fix deprecation warning (#1147) --- python/dgl/backend/pytorch/tensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/dgl/backend/pytorch/tensor.py b/python/dgl/backend/pytorch/tensor.py index 0d926086a986..7e8dcb8453e0 100644 --- a/python/dgl/backend/pytorch/tensor.py +++ b/python/dgl/backend/pytorch/tensor.py @@ -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 @@ -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':