aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/kernel_tests/summary_ops_test.py
diff options
context:
space:
mode:
authorGravatar Dan Mané <danmane@google.com>2016-11-30 12:50:52 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-11-30 13:04:47 -0800
commitc532a5b558a451d599190f1dbbdf68f08dfcaa88 (patch)
tree03ad4a5a6fc3055c52467e184c5741423cc7ba80 /tensorflow/python/kernel_tests/summary_ops_test.py
parent36ee2ec0e6480910720530c67ab18da0312f24dc (diff)
Migrate tf summary ops to use tf.contrib.deprecated endpoints.
Change: 140639557
Diffstat (limited to 'tensorflow/python/kernel_tests/summary_ops_test.py')
-rw-r--r--tensorflow/python/kernel_tests/summary_ops_test.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tensorflow/python/kernel_tests/summary_ops_test.py b/tensorflow/python/kernel_tests/summary_ops_test.py
index 7c434f4561..06148eefa4 100644
--- a/tensorflow/python/kernel_tests/summary_ops_test.py
+++ b/tensorflow/python/kernel_tests/summary_ops_test.py
@@ -30,7 +30,8 @@ class SummaryOpsTest(tf.test.TestCase):
def testScalarSummary(self):
with self.test_session() as sess:
const = tf.constant([10.0, 20.0])
- summ = tf.scalar_summary(["c1", "c2"], const, name="mysumm")
+ summ = tf.contrib.deprecated.scalar_summary(
+ ["c1", "c2"], const, name="mysumm")
value = sess.run(summ)
self.assertEqual([], summ.get_shape())
self.assertProtoEquals("""
@@ -41,7 +42,7 @@ class SummaryOpsTest(tf.test.TestCase):
def testScalarSummaryDefaultName(self):
with self.test_session() as sess:
const = tf.constant([10.0, 20.0])
- summ = tf.scalar_summary(["c1", "c2"], const)
+ summ = tf.contrib.deprecated.scalar_summary(["c1", "c2"], const)
value = sess.run(summ)
self.assertEqual([], summ.get_shape())
self.assertProtoEquals("""
@@ -53,7 +54,7 @@ class SummaryOpsTest(tf.test.TestCase):
with self.test_session() as sess:
const = tf.constant(10.0)
summ1 = tf.summary.histogram("h", const)
- summ2 = tf.scalar_summary("c", const)
+ summ2 = tf.contrib.deprecated.scalar_summary("c", const)
merge = tf.summary.merge([summ1, summ2])
value = sess.run(merge)
self.assertEqual([], merge.get_shape())
@@ -88,11 +89,12 @@ class SummaryOpsTest(tf.test.TestCase):
self.assertEqual(2, len(merge.op.inputs))
self.assertEqual(summ1, merge.op.inputs[0])
self.assertEqual(summ3, merge.op.inputs[1])
- merge = tf.merge_all_summaries("foo_key")
+ merge = tf.contrib.deprecated.merge_all_summaries("foo_key")
self.assertEqual("MergeSummary", merge.op.type)
self.assertEqual(1, len(merge.op.inputs))
self.assertEqual(summ2, merge.op.inputs[0])
- self.assertTrue(tf.merge_all_summaries("bar_key") is None)
+ self.assertTrue(
+ tf.contrib.deprecated.merge_all_summaries("bar_key") is None)
def testHistogramSummaryTypes(self):
with tf.Graph().as_default():