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
ef8d32c5
Unverified
Commit
ef8d32c5
authored
May 10, 2021
by
Matt
Committed by
GitHub
May 10, 2021
Browse files
Fix suggested by @bhadreshpsavani (#11660)
parent
575c9791
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/tensorflow/text-classification/run_text_classification.py
...tensorflow/text-classification/run_text_classification.py
+1
-1
No files found.
examples/tensorflow/text-classification/run_text_classification.py
View file @
ef8d32c5
...
...
@@ -522,7 +522,7 @@ def main():
# region Prediction losses
# This section is outside the scope() because it's very quick to compute, but behaves badly inside it
if
"label"
in
datasets
[
"test"
].
features
:
if
"test"
in
datasets
and
"label"
in
datasets
[
"test"
].
features
:
print
(
"Computing prediction loss on test labels..."
)
labels
=
datasets
[
"test"
][
"label"
]
loss
=
float
(
loss_fn
(
labels
,
predictions
).
numpy
())
...
...
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