Skip to content

Commit 5566a85

Browse files
committed
train.py: Use best validation loss for lr scheduling
Previously the validation loss at the end of the epoch was used for learning rate scheduling. Change this to use the best validation loss for the complete epoch instead.
1 parent 1d20803 commit 5566a85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def main(args):
184184
stop = time.monotonic()
185185
print(f' ({timedelta(seconds=stop-start)})')
186186

187-
scheduler.step(val_loss)
187+
scheduler.step(best_val_loss)
188188
epoch += 1
189189

190190

0 commit comments

Comments
 (0)