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
b5169527
Unverified
Commit
b5169527
authored
Jul 26, 2022
by
Yih-Dar
Committed by
GitHub
Jul 26, 2022
Browse files
Add TFAutoModelForImageClassification to pipelines.py (#18292)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
f374d391
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/transformers/pipelines/__init__.py
src/transformers/pipelines/__init__.py
+2
-1
No files found.
src/transformers/pipelines/__init__.py
View file @
b5169527
...
@@ -81,6 +81,7 @@ if is_tf_available():
...
@@ -81,6 +81,7 @@ if is_tf_available():
TF_MODEL_WITH_LM_HEAD_MAPPING
,
TF_MODEL_WITH_LM_HEAD_MAPPING
,
TFAutoModel
,
TFAutoModel
,
TFAutoModelForCausalLM
,
TFAutoModelForCausalLM
,
TFAutoModelForImageClassification
,
TFAutoModelForMaskedLM
,
TFAutoModelForMaskedLM
,
TFAutoModelForQuestionAnswering
,
TFAutoModelForQuestionAnswering
,
TFAutoModelForSeq2SeqLM
,
TFAutoModelForSeq2SeqLM
,
...
@@ -282,7 +283,7 @@ SUPPORTED_TASKS = {
...
@@ -282,7 +283,7 @@ SUPPORTED_TASKS = {
},
},
"image-classification"
:
{
"image-classification"
:
{
"impl"
:
ImageClassificationPipeline
,
"impl"
:
ImageClassificationPipeline
,
"tf"
:
(),
"tf"
:
(
TFAutoModelForImageClassification
,)
if
is_tf_available
()
else
(),
"pt"
:
(
AutoModelForImageClassification
,)
if
is_torch_available
()
else
(),
"pt"
:
(
AutoModelForImageClassification
,)
if
is_torch_available
()
else
(),
"default"
:
{
"model"
:
{
"pt"
:
(
"google/vit-base-patch16-224"
,
"5dca96d"
)}},
"default"
:
{
"model"
:
{
"pt"
:
(
"google/vit-base-patch16-224"
,
"5dca96d"
)}},
"type"
:
"image"
,
"type"
:
"image"
,
...
...
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