diff options
author | Allen Lavoie <allenl@google.com> | 2017-12-11 14:49:48 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-12-11 14:53:57 -0800 |
commit | 4d1d1a1f2fc76f72903363f59853e346a7aa52aa (patch) | |
tree | 83bc432fd6838aa1653c4f05bdd2a6b70bab0725 /tensorflow/python/training/adam_test.py | |
parent | f86016ea29911d60643b0b606330ecbc792498d9 (diff) |
Fix for variable naming when executing eagerly
name_scope bypassed the Graph.name_scope slash-stripping logic (strip a trailing
slash if it exists, then add one back unconditionally) when executing eagerly,
leading to extra slashes at the end of some variable names and a failure to break
out of nested name scopes.
PiperOrigin-RevId: 178676873
Diffstat (limited to 'tensorflow/python/training/adam_test.py')
-rw-r--r-- | tensorflow/python/training/adam_test.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/python/training/adam_test.py b/tensorflow/python/training/adam_test.py index 0d534db60d..ffb66abc4c 100644 --- a/tensorflow/python/training/adam_test.py +++ b/tensorflow/python/training/adam_test.py @@ -207,6 +207,9 @@ class AdamOptimizerTest(test.TestCase): # Validate updated params self.assertAllCloseAccordingToType(var0_np, self.evaluate(var0)) self.assertAllCloseAccordingToType(var1_np, self.evaluate(var1)) + if use_resource: + self.assertEqual("var0_%d/Adam:0" % (i,), + opt.get_slot(var=var0, name="m").name) def testBasic(self): with self.test_session(): |