(self, opt)
| 7 | |
| 8 | class 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() |
nothing calls this directly
no outgoing calls
no test coverage detected