Skip to content

Commit

Permalink
Add TFAutoModelForSemanticSegmentation to the main __init__.py (h…
Browse files Browse the repository at this point in the history
…uggingface#18600)

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
  • Loading branch information
2 people authored and oneraghavan committed Sep 26, 2022
1 parent 8b85df1 commit 4c5b6d2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/source/en/model_doc/auto.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ Likewise, if your `NewModel` is a subclass of [`PreTrainedModel`], make sure its

[[autodoc]] TFAutoModelForImageClassification

## TFAutoModelForSemanticSegmentation

[[autodoc]] TFAutoModelForSemanticSegmentation

## TFAutoModelForMaskedLM

[[autodoc]] TFAutoModelForMaskedLM
Expand Down
2 changes: 2 additions & 0 deletions src/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2105,6 +2105,7 @@
"TFAutoModelForNextSentencePrediction",
"TFAutoModelForPreTraining",
"TFAutoModelForQuestionAnswering",
"TFAutoModelForSemanticSegmentation",
"TFAutoModelForSeq2SeqLM",
"TFAutoModelForSequenceClassification",
"TFAutoModelForSpeechSeq2Seq",
Expand Down Expand Up @@ -4599,6 +4600,7 @@
TFAutoModelForNextSentencePrediction,
TFAutoModelForPreTraining,
TFAutoModelForQuestionAnswering,
TFAutoModelForSemanticSegmentation,
TFAutoModelForSeq2SeqLM,
TFAutoModelForSequenceClassification,
TFAutoModelForSpeechSeq2Seq,
Expand Down
2 changes: 2 additions & 0 deletions src/transformers/models/auto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
"TFAutoModelForNextSentencePrediction",
"TFAutoModelForPreTraining",
"TFAutoModelForQuestionAnswering",
"TFAutoModelForSemanticSegmentation",
"TFAutoModelForSeq2SeqLM",
"TFAutoModelForSequenceClassification",
"TFAutoModelForSpeechSeq2Seq",
Expand Down Expand Up @@ -271,6 +272,7 @@
TFAutoModelForNextSentencePrediction,
TFAutoModelForPreTraining,
TFAutoModelForQuestionAnswering,
TFAutoModelForSemanticSegmentation,
TFAutoModelForSeq2SeqLM,
TFAutoModelForSequenceClassification,
TFAutoModelForSpeechSeq2Seq,
Expand Down
7 changes: 7 additions & 0 deletions src/transformers/utils/dummy_tf_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,13 @@ def __init__(self, *args, **kwargs):
requires_backends(self, ["tf"])


class TFAutoModelForSemanticSegmentation(metaclass=DummyObject):
_backends = ["tf"]

def __init__(self, *args, **kwargs):
requires_backends(self, ["tf"])


class TFAutoModelForSeq2SeqLM(metaclass=DummyObject):
_backends = ["tf"]

Expand Down

0 comments on commit 4c5b6d2

Please sign in to comment.