Skip to content

Commit

Permalink
Change get_lr() call to get_last_lr() as per warning (pytorch#1099)
Browse files Browse the repository at this point in the history
Co-authored-by: holly1238 <77758406+holly1238@users.noreply.github.com>
  • Loading branch information
natke and holly1238 committed Apr 9, 2021
1 parent 0c83a7b commit 5080235
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beginner_source/transformer_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def train():
print('| epoch {:3d} | {:5d}/{:5d} batches | '
'lr {:02.2f} | ms/batch {:5.2f} | '
'loss {:5.2f} | ppl {:8.2f}'.format(
epoch, batch, len(train_data) // bptt, scheduler.get_lr()[0],
epoch, batch, len(train_data) // bptt, scheduler.get_last_lr()[0],
elapsed * 1000 / log_interval,
cur_loss, math.exp(cur_loss)))
total_loss = 0
Expand Down

0 comments on commit 5080235

Please sign in to comment.