From: mruberry Date: Sat, 5 Jan 2019 17:04:54 +0000 (-0800) Subject: Removes print statements from test_torch.py (#15747) X-Git-Tag: accepted/tizen/6.5/unified/20211028.231830~2000 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6a8c45f57b65d11894c4a6e5a3267708ecec1c5;p=platform%2Fupstream%2Fpytorch.git Removes print statements from test_torch.py (#15747) Summary: These print statements do not affect the test, and tests (generally) shouldn't print. Pull Request resolved: https://github.com/pytorch/pytorch/pull/15747 Differential Revision: D13587289 Pulled By: soumith fbshipit-source-id: c758793c9e35faf02bacba6c7c6d072f7c40453f --- diff --git a/test/test_torch.py b/test/test_torch.py index 10f6085..006b256 100644 --- a/test/test_torch.py +++ b/test/test_torch.py @@ -9484,15 +9484,12 @@ tensor([[[1., 1., 1., ..., 1., 1., 1.], # test non-contiguous inputs and weights inputs = torch.tensor([[0, 0], [3, 1], [2, 1], [1, 1], [3, 4]], device=device) weights = torch.tensor([[.1, 1], [.2, 2], [.3, 3], [.4, 4], [.5, 5]], device=device) - print(inputs[:, 1]) - print(weights[:, 1]) for i in [0, 1]: assert not inputs[:, i].is_contiguous(), "Inputs are supposed to be non-contiguous" assert not weights[:, i].is_contiguous(), "Weights are supposed to be non-contiguous" # inputs are non-contiguous but weights are contiguous self.assertEqual(inputs[:, 0].bincount(), torch.tensor([1, 1, 1, 2])) # inputs and weights are non-contiguous - print(inputs[:, 1].bincount(weights[:, 1])) self.assertEqual(inputs[:, 1].bincount(weights[:, 1]), torch.tensor([1, 9, 0, 0, 5])) # weights are non-contiguous but inputs are contiguous self.assertEqual(inputs[:, 1].contiguous().bincount(weights[:, 1]),