From afe55f2e017adbdf5c15583cb53c057bfffa6adf Mon Sep 17 00:00:00 2001 From: bananabowl <42554856+bananabowl@users.noreply.github.com> Date: Mon, 17 Dec 2018 14:53:47 -0800 Subject: [PATCH] Explicitly pass values kwarg to tf.name_scope Explicitly pass values kwarg to tf.name_scope as it is currently being treated as the default_name kwarg instead. This causes an exception to be thrown in eager mode. --- tfmpl/samples/sgd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tfmpl/samples/sgd.py b/tfmpl/samples/sgd.py index 562e6e4..47f96ce 100644 --- a/tfmpl/samples/sgd.py +++ b/tfmpl/samples/sgd.py @@ -20,7 +20,7 @@ def beale(x, y): '''Beale surface for optimization tests.''' - with tf.name_scope('beale', [x, y]): + with tf.name_scope('beale', values=[x, y]): return (1.5 - x + x*y)**2 + (2.25 - x + x*y**2)**2 + (2.625 - x + x*y**3)**2 # List of optimizers to compare @@ -102,4 +102,4 @@ def draw(xy, z): summary = sess.run(all_summaries) writer.add_summary(summary, global_step=i) writer.flush() - sess.run(train) \ No newline at end of file + sess.run(train)