Fix imports of TF MobileViT (#22065)

* Fix imports of TF MobileViT

* Fix copies
This commit is contained in:
Sylvain Gugger 2023-03-10 14:46:34 -05:00 committed by GitHub
parent bdec2768bd
commit 499770c088
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -6222,7 +6222,6 @@ if TYPE_CHECKING:
from .models.mbart import TFMBartForConditionalGeneration, TFMBartModel, TFMBartPreTrainedModel
from .models.mobilebert import (
TF_MOBILEBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
TFMobileBertForMaskedLM,
TFMobileBertForMultipleChoice,
TFMobileBertForNextSentencePrediction,
@ -6233,6 +6232,9 @@ if TYPE_CHECKING:
TFMobileBertMainLayer,
TFMobileBertModel,
TFMobileBertPreTrainedModel,
)
from .models.mobilevit import (
TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
TFMobileViTForImageClassification,
TFMobileViTForSemanticSegmentation,
TFMobileViTModel,

View File

@ -1647,9 +1647,6 @@ class TFMBartPreTrainedModel(metaclass=DummyObject):
TF_MOBILEBERT_PRETRAINED_MODEL_ARCHIVE_LIST = None
TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST = None
class TFMobileBertForMaskedLM(metaclass=DummyObject):
_backends = ["tf"]
@ -1720,6 +1717,9 @@ class TFMobileBertPreTrainedModel(metaclass=DummyObject):
requires_backends(self, ["tf"])
TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST = None
class TFMobileViTForImageClassification(metaclass=DummyObject):
_backends = ["tf"]