def test_numel(self): b = torch.ByteTensor(3, 100, 100) self.assertEqual(b.nelement(), 3*100*100) self.assertEqual(b.numel(), 3*100*100)