larger lr for stop token

pull/10/head
Eren Golge 2018-05-14 19:04:29 -07:00
parent 02d72ccbfe
commit b2e09f9f58
1 changed files with 2 additions and 1 deletions

View File

@ -88,12 +88,13 @@ def train(model, criterion, criterion_st, data_loader, optimizer, optimizer_st,
# setup lr # setup lr
current_lr = lr_decay(c.lr, current_step, c.warmup_steps) current_lr = lr_decay(c.lr, current_step, c.warmup_steps)
current_lr_st = lr_decay(0.01, current_step, c.warmup_steps)
for params_group in optimizer.param_groups: for params_group in optimizer.param_groups:
params_group['lr'] = current_lr params_group['lr'] = current_lr
for params_group in optimizer_st.param_groups: for params_group in optimizer_st.param_groups:
params_group['lr'] = current_lr params_group['lr'] = current_lr_st
optimizer.zero_grad() optimizer.zero_grad()
optimizer_st.zero_grad() optimizer_st.zero_grad()