From 94234c80b2b27b52284743f6a10651ad551f23b6 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 4 Sep 2019 14:58:18 +0200 Subject: [PATCH] updates Signed-off-by: Glenn Jocher --- train.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/train.py b/train.py index a657d378..3f30b539 100644 --- a/train.py +++ b/train.py @@ -202,10 +202,6 @@ def train(): model.train() print(('\n' + '%10s' * 8) % ('Epoch', 'gpu_mem', 'GIoU', 'obj', 'cls', 'total', 'targets', 'img_size')) - # Update scheduler - if epoch > 0: - scheduler.step() - # Freeze backbone at epoch 0, unfreeze at epoch 1 (optional) freeze_backbone = False if freeze_backbone and epoch < 2: @@ -286,6 +282,9 @@ def train(): # end batch ------------------------------------------------------------------------------------------------ + # Update scheduler + scheduler.step() + # Process epoch results final_epoch = epoch + 1 == epochs if opt.prebias: