From 63f889a4b01fa0cfa5ee46104b8ce45e204f9ff2 Mon Sep 17 00:00:00 2001 From: milesial Date: Thu, 11 Jun 2020 20:53:00 -0700 Subject: [PATCH] Fix eval frequency Former-commit-id: 1c6a9505c964fdd1bc7d55887725551afc94b956 --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index ecad51d..200ccfa 100644 --- a/train.py +++ b/train.py @@ -89,7 +89,7 @@ def train_net(net, pbar.update(imgs.shape[0]) global_step += 1 - if global_step % (len(dataset) // (10 * batch_size)) == 0: + if global_step % (n_train // (10 * batch_size)) == 0: for tag, value in net.named_parameters(): tag = tag.replace('.', '/') writer.add_histogram('weights/' + tag, value.data.cpu().numpy(), global_step)