(self, op)
| 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() |
no test coverage detected