Skip to content

Commit 267867e

Browse files
Quick fix to TF summarization example (#14401)
1 parent 29dfb2d commit 267867e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/tensorflow/summarization/run_summarization.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ def postprocess_text(preds, labels):
577577

578578
# region Optimizer, loss and LR scheduling
579579
# Scheduler and math around the number of training steps.
580-
num_update_steps_per_epoch = len(train_dataset) // training_args.per_device_train_batch_size
580+
num_update_steps_per_epoch = len(train_dataset) // total_train_batch_size
581581
num_train_steps = training_args.num_train_epochs * num_update_steps_per_epoch
582582
optimizer, lr_schedule = create_optimizer(
583583
init_lr=training_args.learning_rate, num_train_steps=num_train_steps, num_warmup_steps=0

0 commit comments

Comments
 (0)