From 015748b94eae670ff756bb237a130c6a69e672c0 Mon Sep 17 00:00:00 2001 From: Cyan <44364112+blessyyyu@users.noreply.github.com> Date: Thu, 14 Apr 2022 16:02:18 +0800 Subject: [PATCH] learning rate won't initiate from 0.001 when continuing training from checkpoint (#67) * add .gitattributes * add long wav * fix some bugs * updated lint error * back the hi_xiaowen/run.sh to the same * remove the space * better one * remove 'num_keyword' parameter * remove files * flask8 examine * override the score and compute_det file * remove defaultdict * remove import defaultdict * learning rate won't initial from 0.001 when continuing training from checkpoint * fix intent bug with initial learning rate != 0.001 --- kws/bin/train.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kws/bin/train.py b/kws/bin/train.py index c7b092a..4d178c9 100644 --- a/kws/bin/train.py +++ b/kws/bin/train.py @@ -157,7 +157,9 @@ def main(): infos = {} start_epoch = infos.get('epoch', -1) + 1 cv_loss = infos.get('cv_loss', 0.0) - + # get the last epoch lr + lr_last_epoch = infos.get('lr', configs['optim_conf']['lr']) + configs['optim_conf']['lr'] = lr_last_epoch model_dir = args.model_dir writer = None if rank == 0: