Skip to content

Commit 7e0a794

Browse files
authored
Update test_nn.py
1 parent 8b0a143 commit 7e0a794

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_nn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15318,7 +15318,7 @@ def test_upsamplingBilinear2d(self, device, antialias, align_corners):
1531815318

1531915319
# Forward AD does not support XLA because XLA tensors don't have storage
1532015320
check_forward_ad = torch.device(device).type != 'xla'
15321-
15321+
1532215322
kwargs = dict(mode='bilinear', align_corners=align_corners, antialias=antialias)
1532315323
for memory_format in [torch.contiguous_format, torch.channels_last]:
1532415324
# test float scale factor up & downsampling
@@ -15335,7 +15335,7 @@ def test_upsamplingBilinear2d(self, device, antialias, align_corners):
1533515335

1533615336
input = torch.randn(1, 2, 2, 2, device=device).contiguous(memory_format=memory_format).requires_grad_()
1533715337
gradcheck(lambda x: F.interpolate(x, out_size, **kwargs), [input], check_forward_ad=check_forward_ad)
15338-
gradgradcheck(lambda x: F.interpolate(x, out_size, **kwargs), [input], check_fwd_over_rev=check_forward_ad)
15338+
gradgradcheck(lambda x: F.interpolate(x, out_size, **kwargs), [input], check_fwd_over_rev=check_forward_ad)
1533915339

1534015340
# Assert that cpu and cuda give same results
1534115341
if torch.device(device).type == 'cuda':

0 commit comments

Comments
 (0)