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
999540df
Unverified
Commit
999540df
authored
Nov 01, 2021
by
Nicolas Patry
Committed by
GitHub
Nov 01, 2021
Browse files
Tensor location is already handled (#14224)
in `base.py` not in subclasses.
parent
323f28dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
src/transformers/pipelines/text_classification.py
src/transformers/pipelines/text_classification.py
+1
-4
No files found.
src/transformers/pipelines/text_classification.py
View file @
999540df
...
...
@@ -145,9 +145,6 @@ class TextClassificationPipeline(Pipeline):
function_to_apply
=
ClassificationFunction
.
NONE
outputs
=
model_outputs
[
"logits"
][
0
]
if
self
.
framework
==
"pt"
:
outputs
=
outputs
.
cpu
().
numpy
()
else
:
outputs
=
outputs
.
numpy
()
if
function_to_apply
==
ClassificationFunction
.
SIGMOID
:
...
...
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