From ca5b7d6c69d612294898e16d9bf295e0b56f1935 Mon Sep 17 00:00:00 2001 From: Eren Golge Date: Tue, 12 Feb 2019 10:04:39 +0100 Subject: [PATCH] set learning rate for restored model --- train.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/train.py b/train.py index 1a175043..155a9571 100644 --- a/train.py +++ b/train.py @@ -389,6 +389,8 @@ def main(args): criterion.cuda() criterion_st.cuda() optimizer.load_state_dict(checkpoint['optimizer']) + for group in optimizer.param_groups: + group['lr'] = c.lr print( " > Model restored from step %d" % checkpoint['step'], flush=True) start_epoch = checkpoint['epoch']