From 6c8c8eb56800eabe5d8cbcde459ae83978795b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=95=9C=EC=A7=80=EC=8A=B9?= Date: Mon, 14 May 2018 18:06:16 +0900 Subject: [PATCH] Solved Visdom 'win is none' issue It has a issue when it met the first epoch. when epoch is 0, the 'update_vis_plot' function mapped parameter(iteration) and it execute if iteration == 0, and viz.line with windows2 is none --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 427dd9244..99ace9a47 100644 --- a/train.py +++ b/train.py @@ -150,12 +150,12 @@ def train(): batch_iterator = iter(data_loader) for iteration in range(args.start_iter, cfg['max_iter']): if args.visdom and iteration != 0 and (iteration % epoch_size == 0): + epoch += 1 update_vis_plot(epoch, loc_loss, conf_loss, epoch_plot, None, 'append', epoch_size) # reset epoch loss counters loc_loss = 0 conf_loss = 0 - epoch += 1 if iteration in cfg['lr_steps']: step_index += 1