From a7425bab381c96ac4b9d9b31baa3a7cd108230c9 Mon Sep 17 00:00:00 2001 From: Yanhua Sun Date: Wed, 14 Aug 2019 16:27:04 -0700 Subject: [PATCH] Replace set(tensor) with id(tensor) for eq change PiperOrigin-RevId: 263454392 --- tensorflow/python/training/adam_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow/python/training/adam_test.py b/tensorflow/python/training/adam_test.py index 15958112bd8..8ac5f944cd6 100644 --- a/tensorflow/python/training/adam_test.py +++ b/tensorflow/python/training/adam_test.py @@ -366,7 +366,8 @@ class AdamOptimizerTest(test.TestCase): opt.minimize(lambda: v1 + v2) # There should be two non-slot variables, and two unique slot variables # for v1 and v2 respectively. - self.assertEqual(6, len(set(opt.variables()))) + self.assertEqual(6, len({id(v) for v in opt.variables()})) + if __name__ == "__main__": test.main()