From b5c7605050d1795108d9c13bc4044fd17447609d Mon Sep 17 00:00:00 2001 From: JanFschr Date: Mon, 22 Nov 2021 18:56:01 +0100 Subject: [PATCH] added missing log_* functions --- mainscripts/Trainer.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/mainscripts/Trainer.py b/mainscripts/Trainer.py index 732d6f9..e212d2c 100644 --- a/mainscripts/Trainer.py +++ b/mainscripts/Trainer.py @@ -124,6 +124,25 @@ def trainerThread (s2c, c2s, e, def model_backup(): if not debug and not is_reached_goal: model.create_backup() + + def log_step(step, step_time, src_loss, dst_loss): + c2s.put({ + 'op': 'tb', + 'action': 'step', + 'step': step, + 'step_time': step_time, + 'src_loss': src_loss, + 'dst_loss': dst_loss + }) + + def log_previews(step, previews, static_previews): + c2s.put({ + 'op': 'tb', + 'action': 'preview', + 'step': step, + 'previews': previews, + 'static_previews': static_previews + }) def send_preview(): if not debug: