MCPcopy Index your code
hub / github.com/tensorflow/models / write_summary

Function write_summary

official/core/train_utils.py:451–459  ·  view source on GitHub ↗

Write evaluation metrics to TF summary.

(summary_writer, global_step, eval_metrics)

Source from the content-addressed store, hash-verified

449
450
451def write_summary(summary_writer, global_step, eval_metrics):
452 """Write evaluation metrics to TF summary."""
453 numeric_dict = {}
454 for name, value in eval_metrics.items():
455 numeric_dict[name] = float(orbit.utils.get_value(value))
456 with summary_writer.as_default():
457 for name, value in numeric_dict.items():
458 tf.summary.scalar(name, value, step=global_step)
459 summary_writer.flush()
460
461
462def remove_ckpts(model_dir):

Callers

nothing calls this directly

Calls 1

flushMethod · 0.45

Tested by

no test coverage detected