MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / testTextSummary

Method testTextSummary

tensorflow/python/summary/summary_test.py:192–205  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

190
191 @test_util.run_deprecated_v1
192 def testTextSummary(self):
193 with self.cached_session():
194 with self.assertRaises(ValueError):
195 num = array_ops.constant(1)
196 summary_lib.text('foo', num)
197
198 # The API accepts vectors.
199 arr = array_ops.constant(['one', 'two', 'three'])
200 summ = summary_lib.text('foo', arr)
201 self.assertEqual(summ.op.type, 'TensorSummaryV2')
202
203 # the API accepts scalars
204 summ = summary_lib.text('foo', array_ops.constant('one'))
205 self.assertEqual(summ.op.type, 'TensorSummaryV2')
206
207 @test_util.run_deprecated_v1
208 def testSummaryNameConversion(self):

Callers

nothing calls this directly

Calls 3

textMethod · 0.80
cached_sessionMethod · 0.45
constantMethod · 0.45

Tested by

no test coverage detected