MCPcopy Index your code
hub / github.com/tensorflow/tensorboard / _value_from_op

Method _value_from_op

tensorboard/data_compat_test.py:41–50  ·  view source on GitHub ↗
(self, op)

Source from the content-addressed store, hash-verified

39 """
40
41 def _value_from_op(self, op):
42 with tf.compat.v1.Session() as sess:
43 summary_pbtxt = sess.run(op)
44 summary = summary_pb2.Summary()
45 summary.ParseFromString(summary_pbtxt)
46 # There may be multiple values (e.g., for an image summary that emits
47 # multiple images in one batch). That's fine; we'll choose any
48 # representative value, assuming that they're homogeneous.
49 assert summary.value
50 return summary.value[0]
51
52 def _assert_noop(self, value):
53 original_pbtxt = value.SerializeToString()

Callers 14

test_scalarMethod · 0.95
test_audioMethod · 0.95
test_textMethod · 0.95
test_imageMethod · 0.95
test_histogramMethod · 0.95
test_empty_histogramMethod · 0.95
test_new_style_imageMethod · 0.95

Calls 1

runMethod · 0.45

Tested by

no test coverage detected