aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/summary
diff options
context:
space:
mode:
authorGravatar Igor Ganichev <iga@google.com>2017-12-12 19:28:44 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-12-12 19:32:29 -0800
commitb7308e3bd69349e9023497948a6bf55d3b0895d9 (patch)
tree007753cea20e6094251052f79b04496598b2b49e /tensorflow/contrib/summary
parent192bcb86d9e988d4f3b12bd2677e3638a9a0cae3 (diff)
Correctly pass name in layers.util.smart_cond
Before this change arguments were passed positionally and "name" argument was wrongly mapped to "strict" argument of tf.cond instead of the itended "name". Such a fix could potentially change operation names and cause an error when restoring a graph, but it seems like this particular change is safe for the following reasons. - smart_cond is not a public API. So users should not be calling it directly. - smart_cond is used in 38 places internally. All of them, except for in tf.contrib.summary don't use the "name" parameter. Such usage leads to the same names before and after this change. The names will change for users of tf.contrib.summary. Luckily, this is a very recent addition and has utility only in context of eager execution, which is in pre-alpha stage yet. Because this change reroutes the wrong "name" -> "strict" mapping to "name" -> "name", the value of "strict" is changing from "None" to "False". Luckily, this has no effect on the function's behavior. PiperOrigin-RevId: 178850766
Diffstat (limited to 'tensorflow/contrib/summary')
-rw-r--r--tensorflow/contrib/summary/summary_ops_graph_test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/summary/summary_ops_graph_test.py b/tensorflow/contrib/summary/summary_ops_graph_test.py
index 42ebb7ab9d..2b7806f80d 100644
--- a/tensorflow/contrib/summary/summary_ops_graph_test.py
+++ b/tensorflow/contrib/summary/summary_ops_graph_test.py
@@ -83,7 +83,7 @@ class DbTest(summary_test_util.SummaryDbTest):
sess.run(summary_ops.all_summary_ops())
events = summary_test_util.events_from_logdir(logdir)
self.assertEqual(len(events), 2)
- self.assertEqual(events[1].summary.value[0].tag, 'cond/my_scalar')
+ self.assertEqual(events[1].summary.value[0].tag, 'my_scalar')
def testSummaryGraphModeCond(self):
with ops.Graph().as_default(), self.test_session():