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
b5625f13
Commit
b5625f13
authored
Jan 29, 2020
by
Lysandre
Committed by
Lysandre Debut
Jan 29, 2020
Browse files
Style
parent
44a5b4bb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/transformers/modeling_tf_xlm_roberta.py
src/transformers/modeling_tf_xlm_roberta.py
+7
-3
No files found.
src/transformers/modeling_tf_xlm_roberta.py
View file @
b5625f13
...
...
@@ -60,6 +60,7 @@ XLM_ROBERTA_START_DOCSTRING = r"""
Check out the :meth:`~transformers.PreTrainedModel.from_pretrained` method to load the model weights.
"""
@
add_start_docstrings
(
"The bare XLM-RoBERTa Model transformer outputting raw hidden-states without any specific head on top."
,
XLM_ROBERTA_START_DOCSTRING
,
...
...
@@ -69,19 +70,20 @@ class TFXLMRobertaModel(TFRobertaModel):
This class overrides :class:`~transformers.TFRobertaModel`. Please check the
superclass for the appropriate documentation alongside usage examples.
"""
config_class
=
XLMRobertaConfig
pretrained_model_archive_map
=
TF_XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP
@
add_start_docstrings
(
"""XLM-RoBERTa Model with a `language modeling` head on top. """
,
XLM_ROBERTA_START_DOCSTRING
,
"""XLM-RoBERTa Model with a `language modeling` head on top. """
,
XLM_ROBERTA_START_DOCSTRING
,
)
class
TFXLMRobertaForMaskedLM
(
TFRobertaForMaskedLM
):
"""
This class overrides :class:`~transformers.TFRobertaForMaskedLM`. Please check the
superclass for the appropriate documentation alongside usage examples.
"""
config_class
=
XLMRobertaConfig
pretrained_model_archive_map
=
TF_XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP
...
...
@@ -96,6 +98,7 @@ class TFXLMRobertaForSequenceClassification(TFRobertaForSequenceClassification):
This class overrides :class:`~transformers.TFRobertaForSequenceClassification`. Please check the
superclass for the appropriate documentation alongside usage examples.
"""
config_class
=
XLMRobertaConfig
pretrained_model_archive_map
=
TF_XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP
...
...
@@ -110,5 +113,6 @@ class TFXLMRobertaForTokenClassification(TFRobertaForTokenClassification):
This class overrides :class:`~transformers.TFRobertaForTokenClassification`. Please check the
superclass for the appropriate documentation alongside usage examples.
"""
config_class
=
XLMRobertaConfig
pretrained_model_archive_map
=
TF_XLM_ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP
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