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

Method __init__

utils/tb_visualizer.py:9–19  ·  view source on GitHub ↗
(self, opt)

Source from the content-addressed store, hash-verified

7
8class TBVisualizer:
9 def __init__(self, opt):
10 self._opt = opt
11 self._save_path = os.path.join(opt.checkpoints_dir, opt.name)
12
13 self._log_path = os.path.join(self._save_path, 'loss_log2.txt')
14 self._tb_path = os.path.join(self._save_path, 'summary.json')
15 self._writer = SummaryWriter(self._save_path)
16
17 with open(self._log_path, "a") as log_file:
18 now = time.strftime("%c")
19 log_file.write('================ Training Loss (%s) ================\n' % now)
20
21 def __del__(self):
22 self._writer.close()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected