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
4114c9a7
Unverified
Commit
4114c9a7
authored
Sep 02, 2021
by
NielsRogge
Committed by
GitHub
Sep 02, 2021
Browse files
Add tokenizer docs (#13373)
parent
872e6be0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
docs/source/model_doc/layoutxlm.rst
docs/source/model_doc/layoutxlm.rst
+9
-0
No files found.
docs/source/model_doc/layoutxlm.rst
View file @
4114c9a7
...
@@ -40,6 +40,15 @@ One can directly plug in the weights of LayoutXLM into a LayoutLMv2 model, like
...
@@ -40,6 +40,15 @@ One can directly plug in the weights of LayoutXLM into a LayoutLMv2 model, like
model = LayoutLMv2Model.from_pretrained('
microsoft
/
layoutxlm
-
base
')
model = LayoutLMv2Model.from_pretrained('
microsoft
/
layoutxlm
-
base
')
Note that LayoutXLM requires a different tokenizer, based on :class:`~transformers.XLMRobertaTokenizer`. You can
initialize it as follows:
.. code-block::
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('
microsoft
/
layoutxlm
-
base
')
As LayoutXLM'
s
architecture
is
equivalent
to
that
of
LayoutLMv2
,
one
can
refer
to
:
doc
:`
LayoutLMv2
's documentation page
As LayoutXLM'
s
architecture
is
equivalent
to
that
of
LayoutLMv2
,
one
can
refer
to
:
doc
:`
LayoutLMv2
's documentation page
<layoutlmv2>` for all tips, code examples and notebooks.
<layoutlmv2>` for all tips, code examples and notebooks.
...
...
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