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
26173960
Unverified
Commit
26173960
authored
Apr 22, 2021
by
Matt
Committed by
GitHub
Apr 22, 2021
Browse files
Correctly cast num_train_epochs to int (#11379)
parent
881945c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
examples/tensorflow/text-classification/run_text_classification.py
...tensorflow/text-classification/run_text_classification.py
+4
-1
No files found.
examples/tensorflow/text-classification/run_text_classification.py
View file @
26173960
...
@@ -492,7 +492,10 @@ def main():
...
@@ -492,7 +492,10 @@ def main():
callbacks
=
[
SavePretrainedCallback
(
output_dir
=
training_args
.
output_dir
)]
callbacks
=
[
SavePretrainedCallback
(
output_dir
=
training_args
.
output_dir
)]
model
.
fit
(
model
.
fit
(
training_dataset
,
validation_data
=
eval_dataset
,
epochs
=
training_args
.
num_train_epochs
,
callbacks
=
callbacks
training_dataset
,
validation_data
=
eval_dataset
,
epochs
=
int
(
training_args
.
num_train_epochs
),
callbacks
=
callbacks
,
)
)
elif
"validation"
in
datasets
:
elif
"validation"
in
datasets
:
# If there's a validation dataset but no training set, just evaluate the metrics
# If there's a validation dataset but no training set, just evaluate the metrics
...
...
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