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
499770c0
Unverified
Commit
499770c0
authored
Mar 10, 2023
by
Sylvain Gugger
Committed by
GitHub
Mar 10, 2023
Browse files
Fix imports of TF MobileViT (#22065)
* Fix imports of TF MobileViT * Fix copies
parent
bdec2768
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
src/transformers/__init__.py
src/transformers/__init__.py
+3
-1
src/transformers/utils/dummy_tf_objects.py
src/transformers/utils/dummy_tf_objects.py
+3
-3
No files found.
src/transformers/__init__.py
View file @
499770c0
...
@@ -6222,7 +6222,6 @@ if TYPE_CHECKING:
...
@@ -6222,7 +6222,6 @@ if TYPE_CHECKING:
from
.models.mbart
import
TFMBartForConditionalGeneration
,
TFMBartModel
,
TFMBartPreTrainedModel
from
.models.mbart
import
TFMBartForConditionalGeneration
,
TFMBartModel
,
TFMBartPreTrainedModel
from
.models.mobilebert
import
(
from
.models.mobilebert
import
(
TF_MOBILEBERT_PRETRAINED_MODEL_ARCHIVE_LIST
,
TF_MOBILEBERT_PRETRAINED_MODEL_ARCHIVE_LIST
,
TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST
,
TFMobileBertForMaskedLM
,
TFMobileBertForMaskedLM
,
TFMobileBertForMultipleChoice
,
TFMobileBertForMultipleChoice
,
TFMobileBertForNextSentencePrediction
,
TFMobileBertForNextSentencePrediction
,
...
@@ -6233,6 +6232,9 @@ if TYPE_CHECKING:
...
@@ -6233,6 +6232,9 @@ if TYPE_CHECKING:
TFMobileBertMainLayer
,
TFMobileBertMainLayer
,
TFMobileBertModel
,
TFMobileBertModel
,
TFMobileBertPreTrainedModel
,
TFMobileBertPreTrainedModel
,
)
from
.models.mobilevit
import
(
TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST
,
TFMobileViTForImageClassification
,
TFMobileViTForImageClassification
,
TFMobileViTForSemanticSegmentation
,
TFMobileViTForSemanticSegmentation
,
TFMobileViTModel
,
TFMobileViTModel
,
...
...
src/transformers/utils/dummy_tf_objects.py
View file @
499770c0
...
@@ -1647,9 +1647,6 @@ class TFMBartPreTrainedModel(metaclass=DummyObject):
...
@@ -1647,9 +1647,6 @@ class TFMBartPreTrainedModel(metaclass=DummyObject):
TF_MOBILEBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
TF_MOBILEBERT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
class
TFMobileBertForMaskedLM
(
metaclass
=
DummyObject
):
class
TFMobileBertForMaskedLM
(
metaclass
=
DummyObject
):
_backends
=
[
"tf"
]
_backends
=
[
"tf"
]
...
@@ -1720,6 +1717,9 @@ class TFMobileBertPreTrainedModel(metaclass=DummyObject):
...
@@ -1720,6 +1717,9 @@ class TFMobileBertPreTrainedModel(metaclass=DummyObject):
requires_backends
(
self
,
[
"tf"
])
requires_backends
(
self
,
[
"tf"
])
TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST
=
None
class
TFMobileViTForImageClassification
(
metaclass
=
DummyObject
):
class
TFMobileViTForImageClassification
(
metaclass
=
DummyObject
):
_backends
=
[
"tf"
]
_backends
=
[
"tf"
]
...
...
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