Skip to content

Commit 5080235

Browse files
natkeholly1238
andauthored
Change get_lr() call to get_last_lr() as per warning (pytorch#1099)
Co-authored-by: holly1238 <[email protected]>
1 parent 0c83a7b commit 5080235

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beginner_source/transformer_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def train():
281281
print('| epoch {:3d} | {:5d}/{:5d} batches | '
282282
'lr {:02.2f} | ms/batch {:5.2f} | '
283283
'loss {:5.2f} | ppl {:8.2f}'.format(
284-
epoch, batch, len(train_data) // bptt, scheduler.get_lr()[0],
284+
epoch, batch, len(train_data) // bptt, scheduler.get_last_lr()[0],
285285
elapsed * 1000 / log_interval,
286286
cur_loss, math.exp(cur_loss)))
287287
total_loss = 0

0 commit comments

Comments
 (0)