def testSlotsUniqueEager(self):
    with context.eager_mode():
        v1 = resource_variable_ops.ResourceVariable(1.0)
        v2 = resource_variable_ops.ResourceVariable(1.0)
        opt = adam.Adam(1.0)
        opt.minimize((lambda : (v1 + v2)), var_list=[v1, v2])
        self.assertEqual(5, len(set(opt.variables())))
        self.assertEqual(self.evaluate(opt.variables()[0]), self.evaluate(opt.iterations))
def testSlotsUniqueEager(self):
    with context.eager_mode():
        v1 = resource_variable_ops.ResourceVariable(1.0)
        v2 = resource_variable_ops.ResourceVariable(1.0)
        opt = adam.Adam(1.0)
        opt.minimize((lambda : (v1 + v2)), var_list=[v1, v2])
        self.assertEqual(5, len(set(opt.variables())))
        self.assertEqual(self.evaluate(opt.variables()[0]), self.evaluate(opt.iterations))