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
a1100fac
Unverified
Commit
a1100fac
authored
Jan 12, 2021
by
Lysandre Debut
Committed by
GitHub
Jan 12, 2021
Browse files
LayoutLM Config (#9539)
parent
e45eba3b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/transformers/models/auto/modeling_auto.py
src/transformers/models/auto/modeling_auto.py
+1
-1
tests/test_modeling_auto.py
tests/test_modeling_auto.py
+2
-2
No files found.
src/transformers/models/auto/modeling_auto.py
View file @
a1100fac
...
...
@@ -460,6 +460,7 @@ MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING = OrderedDict(
(
LongformerConfig
,
LongformerForSequenceClassification
),
(
RobertaConfig
,
RobertaForSequenceClassification
),
(
SqueezeBertConfig
,
SqueezeBertForSequenceClassification
),
(
LayoutLMConfig
,
LayoutLMForSequenceClassification
),
(
BertConfig
,
BertForSequenceClassification
),
(
XLNetConfig
,
XLNetForSequenceClassification
),
(
MobileBertConfig
,
MobileBertForSequenceClassification
),
...
...
@@ -475,7 +476,6 @@ MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING = OrderedDict(
(
TransfoXLConfig
,
TransfoXLForSequenceClassification
),
(
MPNetConfig
,
MPNetForSequenceClassification
),
(
TapasConfig
,
TapasForSequenceClassification
),
(
LayoutLMConfig
,
LayoutLMForSequenceClassification
),
]
)
...
...
tests/test_modeling_auto.py
View file @
a1100fac
...
...
@@ -241,7 +241,7 @@ class AutoModelTest(unittest.TestCase):
for
parent_config
,
parent_model
in
mapping
[:
index
+
1
]:
assert
not
issubclass
(
child_config
,
parent_config
),
"{child_config.__name__} is child of {parent_config.__name__}"
),
f
"
{
child_config
.
__name__
}
is child of
{
parent_config
.
__name__
}
"
assert
not
issubclass
(
child_model
,
parent_model
),
"{child_config.__name__} is child of {parent_config.__name__}"
),
f
"
{
child_config
.
__name__
}
is child of
{
parent_config
.
__name__
}
"
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