Skip to content

Commit 77b4b50

Browse files
authored
Merge pull request #13 from AntoinePrv/deprecation_warning
Replace saved_variables to saved_tensors.
2 parents db57478 + 9bf31c6 commit 77b4b50

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

torch_scatter/div.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def forward(ctx, out, src, index, dim):
1818

1919
@staticmethod
2020
def backward(ctx, grad_out):
21-
out, src, index = ctx.saved_variables
21+
out, src, index = ctx.saved_tensors
2222

2323
grad_src = None
2424
if ctx.needs_input_grad[1]:

torch_scatter/max.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def forward(ctx, out, src, index, dim):
1919

2020
@staticmethod
2121
def backward(ctx, grad_out, grad_arg):
22-
index, arg = ctx.saved_variables
22+
index, arg = ctx.saved_tensors
2323

2424
grad_src = None
2525
if ctx.needs_input_grad[1]:

torch_scatter/min.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def forward(ctx, out, src, index, dim):
1919

2020
@staticmethod
2121
def backward(ctx, grad_out, grad_arg):
22-
index, arg = ctx.saved_variables
22+
index, arg = ctx.saved_tensors
2323

2424
grad_src = None
2525
if ctx.needs_input_grad[1]:

torch_scatter/mul.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def forward(ctx, out, src, index, dim):
1818

1919
@staticmethod
2020
def backward(ctx, grad_out):
21-
out, src, index = ctx.saved_variables
21+
out, src, index = ctx.saved_tensors
2222

2323
grad_src = None
2424
if ctx.needs_input_grad[1]:

0 commit comments

Comments
 (0)