Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
267867e8
Unverified
Commit
267867e8
authored
Nov 15, 2021
by
Matt
Committed by
GitHub
Nov 15, 2021
Browse files
Quick fix to TF summarization example (#14401)
parent
29dfb2db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/tensorflow/summarization/run_summarization.py
examples/tensorflow/summarization/run_summarization.py
+1
-1
No files found.
examples/tensorflow/summarization/run_summarization.py
View file @
267867e8
...
@@ -577,7 +577,7 @@ def main():
...
@@ -577,7 +577,7 @@ def main():
# region Optimizer, loss and LR scheduling
# region Optimizer, loss and LR scheduling
# Scheduler and math around the number of training steps.
# Scheduler and math around the number of training steps.
num_update_steps_per_epoch
=
len
(
train_dataset
)
//
t
raining_args
.
per_device
_train_batch_size
num_update_steps_per_epoch
=
len
(
train_dataset
)
//
t
otal
_train_batch_size
num_train_steps
=
training_args
.
num_train_epochs
*
num_update_steps_per_epoch
num_train_steps
=
training_args
.
num_train_epochs
*
num_update_steps_per_epoch
optimizer
,
lr_schedule
=
create_optimizer
(
optimizer
,
lr_schedule
=
create_optimizer
(
init_lr
=
training_args
.
learning_rate
,
num_train_steps
=
num_train_steps
,
num_warmup_steps
=
0
init_lr
=
training_args
.
learning_rate
,
num_train_steps
=
num_train_steps
,
num_warmup_steps
=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment