Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
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
Hide 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(
...
@@ -460,6 +460,7 @@ MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING = OrderedDict(
(
LongformerConfig
,
LongformerForSequenceClassification
),
(
LongformerConfig
,
LongformerForSequenceClassification
),
(
RobertaConfig
,
RobertaForSequenceClassification
),
(
RobertaConfig
,
RobertaForSequenceClassification
),
(
SqueezeBertConfig
,
SqueezeBertForSequenceClassification
),
(
SqueezeBertConfig
,
SqueezeBertForSequenceClassification
),
(
LayoutLMConfig
,
LayoutLMForSequenceClassification
),
(
BertConfig
,
BertForSequenceClassification
),
(
BertConfig
,
BertForSequenceClassification
),
(
XLNetConfig
,
XLNetForSequenceClassification
),
(
XLNetConfig
,
XLNetForSequenceClassification
),
(
MobileBertConfig
,
MobileBertForSequenceClassification
),
(
MobileBertConfig
,
MobileBertForSequenceClassification
),
...
@@ -475,7 +476,6 @@ MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING = OrderedDict(
...
@@ -475,7 +476,6 @@ MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING = OrderedDict(
(
TransfoXLConfig
,
TransfoXLForSequenceClassification
),
(
TransfoXLConfig
,
TransfoXLForSequenceClassification
),
(
MPNetConfig
,
MPNetForSequenceClassification
),
(
MPNetConfig
,
MPNetForSequenceClassification
),
(
TapasConfig
,
TapasForSequenceClassification
),
(
TapasConfig
,
TapasForSequenceClassification
),
(
LayoutLMConfig
,
LayoutLMForSequenceClassification
),
]
]
)
)
...
...
tests/test_modeling_auto.py
View file @
a1100fac
...
@@ -241,7 +241,7 @@ class AutoModelTest(unittest.TestCase):
...
@@ -241,7 +241,7 @@ class AutoModelTest(unittest.TestCase):
for
parent_config
,
parent_model
in
mapping
[:
index
+
1
]:
for
parent_config
,
parent_model
in
mapping
[:
index
+
1
]:
assert
not
issubclass
(
assert
not
issubclass
(
child_config
,
parent_config
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
(
assert
not
issubclass
(
child_model
,
parent_model
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