def test_rand(self): torch.manual_seed(123456) res1 = torch.rand(SIZE, SIZE) res2 = torch.Tensor() torch.manual_seed(123456) torch.rand(res2, SIZE, SIZE) self.assertEqual(res1, res2)