MCPcopy Create free account
hub / github.com/albertpumarola/GANimation / print_current_train_errors

Method print_current_train_errors

utils/tb_visualizer.py:41–50  ·  view source on GitHub ↗
(self, epoch, i, iters_per_epoch, errors, t, visuals_were_stored)

Source from the content-addressed store, hash-verified

39 self._writer.add_scalar(sum_name, scalar, it)
40
41 def print_current_train_errors(self, epoch, i, iters_per_epoch, errors, t, visuals_were_stored):
42 log_time = time.strftime("[%d/%m/%Y %H:%M:%S]")
43 visuals_info = "v" if visuals_were_stored else ""
44 message = '%s (T%s, epoch: %d, it: %d/%d, t/smpl: %.3fs) ' % (log_time, visuals_info, epoch, i, iters_per_epoch, t)
45 for k, v in errors.items():
46 message += '%s:%.3f ' % (k, v)
47
48 print(message)
49 with open(self._log_path, "a") as log_file:
50 log_file.write('%s\n' % message)
51
52 def print_current_validate_errors(self, epoch, errors, t):
53 log_time = time.strftime("[%d/%m/%Y %H:%M:%S]")

Callers 1

_display_terminalMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected