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
8fa0c956
"src/routes/vscode:/vscode.git/clone" did not exist on "39b8e4430ebe84c409163b9970145b0d7d53a36c"
Unverified
Commit
8fa0c956
authored
Oct 07, 2020
by
Lysandre Debut
Committed by
GitHub
Oct 07, 2020
Browse files
Add GPT2 to sequence classification auto model (#7630)
parent
e084089e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/transformers/modeling_auto.py
src/transformers/modeling_auto.py
+2
-1
No files found.
src/transformers/modeling_auto.py
View file @
8fa0c956
...
@@ -129,7 +129,7 @@ from .modeling_funnel import (
...
@@ -129,7 +129,7 @@ from .modeling_funnel import (
FunnelForTokenClassification
,
FunnelForTokenClassification
,
FunnelModel
,
FunnelModel
,
)
)
from
.modeling_gpt2
import
GPT2LMHeadModel
,
GPT2Model
from
.modeling_gpt2
import
GPT2ForSequenceClassification
,
GPT2LMHeadModel
,
GPT2Model
from
.modeling_layoutlm
import
LayoutLMForMaskedLM
,
LayoutLMForTokenClassification
,
LayoutLMModel
from
.modeling_layoutlm
import
LayoutLMForMaskedLM
,
LayoutLMForTokenClassification
,
LayoutLMModel
from
.modeling_longformer
import
(
from
.modeling_longformer
import
(
LongformerForMaskedLM
,
LongformerForMaskedLM
,
...
@@ -377,6 +377,7 @@ MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING = OrderedDict(
...
@@ -377,6 +377,7 @@ MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING = OrderedDict(
(
ElectraConfig
,
ElectraForSequenceClassification
),
(
ElectraConfig
,
ElectraForSequenceClassification
),
(
FunnelConfig
,
FunnelForSequenceClassification
),
(
FunnelConfig
,
FunnelForSequenceClassification
),
(
DebertaConfig
,
DebertaForSequenceClassification
),
(
DebertaConfig
,
DebertaForSequenceClassification
),
(
GPT2Config
,
GPT2ForSequenceClassification
),
]
]
)
)
...
...
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