def test_randn(self): torch.manual_seed(123456) res1 = torch.randn(SIZE, SIZE) res2 = torch.Tensor() torch.manual_seed(123456) torch.randn(SIZE, SIZE, out=res2) self.assertEqual(res1, res2)