import{S as Uy,i as Qy,s as Vy,e as a,k as p,w as L,t,M as Hy,c as r,d as o,m as u,a as i,x as k,h as n,b as l,N as Ky,G as e,g as m,y as w,q as T,o as x,B as M,v as Gy,L as bt}from"../../chunks/vendor-hf-doc-builder.js";import{T as vo}from"../../chunks/Tip-hf-doc-builder.js";import{D as K}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Lt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as He}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as yt}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as Ng}from"../../chunks/PipelineTag-hf-doc-builder.js";function Yy(P){let c,b,g,_,y;return{c(){c=a("p"),b=t("LayoutLMv3 is nearly identical to LayoutLMv2, so we\u2019ve also included LayoutLMv2 resources you can adapt for LayoutLMv3 tasks. For these notebooks, take care to use "),g=a("a"),_=t("LayoutLMv2Processor"),y=t(" instead when preparing data for the model!"),this.h()},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"LayoutLMv3 is nearly identical to LayoutLMv2, so we\u2019ve also included LayoutLMv2 resources you can adapt for LayoutLMv3 tasks. For these notebooks, take care to use "),g=r(h,"A",{href:!0});var F=i(g);_=n(F,"LayoutLMv2Processor"),F.forEach(o),y=n(h," instead when preparing data for the model!"),h.forEach(o),this.h()},h(){l(g,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv2#transformers.LayoutLMv2Processor")},m(d,h){m(d,c,h),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function Xy(P){let c,b,g,_,y;return _=new Lt({props:{code:`from transformers import LayoutLMv3Config, LayoutLMv3Model

# Initializing a LayoutLMv3 microsoft/layoutlmv3-base style configuration
configuration = LayoutLMv3Config()

# Initializing a model (with random weights) from the microsoft/layoutlmv3-base style configuration
model = LayoutLMv3Model(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LayoutLMv3Config, LayoutLMv3Model

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a LayoutLMv3 microsoft/layoutlmv3-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = LayoutLMv3Config()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the microsoft/layoutlmv3-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = LayoutLMv3Model(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){c=a("p"),b=t("Example:"),g=p(),L(_.$$.fragment)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Example:"),h.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,h){m(d,c,h),e(c,b),m(d,g,h),w(_,d,h),y=!0},p:bt,i(d){y||(T(_.$$.fragment,d),y=!0)},o(d){x(_.$$.fragment,d),y=!1},d(d){d&&o(c),d&&o(g),M(_,d)}}}function Jy(P){let c,b,g,_,y;return{c(){c=a("p"),b=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),_=t("Module"),y=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(h,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(o)},m(d,h){m(d,c,h),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function Zy(P){let c,b,g,_,y;return _=new Lt({props:{code:`from transformers import AutoProcessor, AutoModel
from datasets import load_dataset

processor = AutoProcessor.from_pretrained("microsoft/layoutlmv3-base", apply_ocr=False)
model = AutoModel.from_pretrained("microsoft/layoutlmv3-base")

dataset = load_dataset("nielsr/funsd-layoutlmv3", split="train")
example = dataset[0]
image = example["image"]
words = example["tokens"]
boxes = example["bboxes"]

encoding = processor(image, words, boxes=boxes, return_tensors="pt")

outputs = model(**encoding)
last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>, apply_ocr=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/funsd-layoutlmv3&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>words = example[<span class="hljs-string">&quot;tokens&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes = example[<span class="hljs-string">&quot;bboxes&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, words, boxes=boxes, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){c=a("p"),b=t("Examples:"),g=p(),L(_.$$.fragment)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Examples:"),h.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,h){m(d,c,h),e(c,b),m(d,g,h),w(_,d,h),y=!0},p:bt,i(d){y||(T(_.$$.fragment,d),y=!0)},o(d){x(_.$$.fragment,d),y=!1},d(d){d&&o(c),d&&o(g),M(_,d)}}}function eb(P){let c,b,g,_,y;return{c(){c=a("p"),b=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),_=t("Module"),y=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(h,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(o)},m(d,h){m(d,c,h),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function ob(P){let c,b,g,_,y;return _=new Lt({props:{code:`from transformers import AutoProcessor, AutoModelForSequenceClassification
from datasets import load_dataset
import torch

processor = AutoProcessor.from_pretrained("microsoft/layoutlmv3-base", apply_ocr=False)
model = AutoModelForSequenceClassification.from_pretrained("microsoft/layoutlmv3-base")

dataset = load_dataset("nielsr/funsd-layoutlmv3", split="train")
example = dataset[0]
image = example["image"]
words = example["tokens"]
boxes = example["bboxes"]

encoding = processor(image, words, boxes=boxes, return_tensors="pt")
sequence_label = torch.tensor([1])

outputs = model(**encoding, labels=sequence_label)
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModelForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>, apply_ocr=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/funsd-layoutlmv3&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>words = example[<span class="hljs-string">&quot;tokens&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes = example[<span class="hljs-string">&quot;bboxes&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, words, boxes=boxes, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sequence_label = torch.tensor([<span class="hljs-number">1</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding, labels=sequence_label)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){c=a("p"),b=t("Examples:"),g=p(),L(_.$$.fragment)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Examples:"),h.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,h){m(d,c,h),e(c,b),m(d,g,h),w(_,d,h),y=!0},p:bt,i(d){y||(T(_.$$.fragment,d),y=!0)},o(d){x(_.$$.fragment,d),y=!1},d(d){d&&o(c),d&&o(g),M(_,d)}}}function tb(P){let c,b,g,_,y;return{c(){c=a("p"),b=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),_=t("Module"),y=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(h,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(o)},m(d,h){m(d,c,h),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function nb(P){let c,b,g,_,y;return _=new Lt({props:{code:`from transformers import AutoProcessor, AutoModelForTokenClassification
from datasets import load_dataset

processor = AutoProcessor.from_pretrained("microsoft/layoutlmv3-base", apply_ocr=False)
model = AutoModelForTokenClassification.from_pretrained("microsoft/layoutlmv3-base", num_labels=7)

dataset = load_dataset("nielsr/funsd-layoutlmv3", split="train")
example = dataset[0]
image = example["image"]
words = example["tokens"]
boxes = example["bboxes"]
word_labels = example["ner_tags"]

encoding = processor(image, words, boxes=boxes, word_labels=word_labels, return_tensors="pt")

outputs = model(**encoding)
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModelForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>, apply_ocr=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>, num_labels=<span class="hljs-number">7</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/funsd-layoutlmv3&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>words = example[<span class="hljs-string">&quot;tokens&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes = example[<span class="hljs-string">&quot;bboxes&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>word_labels = example[<span class="hljs-string">&quot;ner_tags&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, words, boxes=boxes, word_labels=word_labels, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){c=a("p"),b=t("Examples:"),g=p(),L(_.$$.fragment)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Examples:"),h.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,h){m(d,c,h),e(c,b),m(d,g,h),w(_,d,h),y=!0},p:bt,i(d){y||(T(_.$$.fragment,d),y=!0)},o(d){x(_.$$.fragment,d),y=!1},d(d){d&&o(c),d&&o(g),M(_,d)}}}function sb(P){let c,b,g,_,y;return{c(){c=a("p"),b=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),_=t("Module"),y=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(h,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(o)},m(d,h){m(d,c,h),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function ab(P){let c,b,g,_,y;return _=new Lt({props:{code:`from transformers import AutoProcessor, AutoModelForQuestionAnswering
from datasets import load_dataset
import torch

processor = AutoProcessor.from_pretrained("microsoft/layoutlmv3-base", apply_ocr=False)
model = AutoModelForQuestionAnswering.from_pretrained("microsoft/layoutlmv3-base")

dataset = load_dataset("nielsr/funsd-layoutlmv3", split="train")
example = dataset[0]
image = example["image"]
question = "what's his name?"
words = example["tokens"]
boxes = example["bboxes"]

encoding = processor(image, question, words, boxes=boxes, return_tensors="pt")
start_positions = torch.tensor([1])
end_positions = torch.tensor([3])

outputs = model(**encoding, start_positions=start_positions, end_positions=end_positions)
loss = outputs.loss
start_scores = outputs.start_logits
end_scores = outputs.end_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModelForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>, apply_ocr=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/funsd-layoutlmv3&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>question = <span class="hljs-string">&quot;what&#x27;s his name?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>words = example[<span class="hljs-string">&quot;tokens&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes = example[<span class="hljs-string">&quot;bboxes&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, question, words, boxes=boxes, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_positions = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>end_positions = torch.tensor([<span class="hljs-number">3</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding, start_positions=start_positions, end_positions=end_positions)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){c=a("p"),b=t("Examples:"),g=p(),L(_.$$.fragment)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Examples:"),h.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,h){m(d,c,h),e(c,b),m(d,g,h),w(_,d,h),y=!0},p:bt,i(d){y||(T(_.$$.fragment,d),y=!0)},o(d){x(_.$$.fragment,d),y=!1},d(d){d&&o(c),d&&o(g),M(_,d)}}}function rb(P){let c,b,g,_,y,d,h,F,we,_e,R,ae,se,$,Te,V,xe,ve,O,Me,ie,G,$e,pe,Y,qe,ue,X,Fe,ye,oe,C,A,he,H,Ee,be,Q,ze,Le,z,re,J,me,Ce,Z,le,fe,B,Pe,j,Ae,te,I,Ie,N,Ne,je;return{c(){c=a("p"),b=t("TensorFlow models and layers in "),g=a("code"),_=t("transformers"),y=t(" accept two formats as input:"),d=p(),h=a("ul"),F=a("li"),we=t("having all inputs as keyword arguments (like PyTorch models), or"),_e=p(),R=a("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),se=p(),$=a("p"),Te=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=a("code"),xe=t("model.fit()"),ve=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a("code"),Me=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),$e=t("fit()"),pe=t(" and "),Y=a("code"),qe=t("predict()"),ue=t(`, such as when creating your own layers or models with
the Keras `),X=a("code"),Fe=t("Functional"),ye=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),C=a("ul"),A=a("li"),he=t("a single Tensor with "),H=a("code"),Ee=t("input_ids"),be=t(" only and nothing else: "),Q=a("code"),ze=t("model(input_ids)"),Le=p(),z=a("li"),re=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=a("code"),me=t("model([input_ids, attention_mask])"),Ce=t(" or "),Z=a("code"),le=t("model([input_ids, attention_mask, token_type_ids])"),fe=p(),B=a("li"),Pe=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=a("code"),Ae=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=p(),I=a("p"),Ie=t(`Note that when creating models and layers with
`),N=a("a"),Ne=t("subclassing"),je=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){c=r(v,"P",{});var q=i(c);b=n(q,"TensorFlow models and layers in "),g=r(q,"CODE",{});var Ye=i(g);_=n(Ye,"transformers"),Ye.forEach(o),y=n(q," accept two formats as input:"),q.forEach(o),d=u(v),h=r(v,"UL",{});var ne=i(h);F=r(ne,"LI",{});var Xe=i(F);we=n(Xe,"having all inputs as keyword arguments (like PyTorch models), or"),Xe.forEach(o),_e=u(ne),R=r(ne,"LI",{});var Je=i(R);ae=n(Je,"having all inputs as a list, tuple or dict in the first positional argument."),Je.forEach(o),ne.forEach(o),se=u(v),$=r(v,"P",{});var E=i($);Te=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=r(E,"CODE",{});var ge=i(V);xe=n(ge,"model.fit()"),ge.forEach(o),ve=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=r(E,"CODE",{});var Ze=i(O);Me=n(Ze,"model.fit()"),Ze.forEach(o),ie=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(E,"CODE",{});var We=i(G);$e=n(We,"fit()"),We.forEach(o),pe=n(E," and "),Y=r(E,"CODE",{});var eo=i(Y);qe=n(eo,"predict()"),eo.forEach(o),ue=n(E,`, such as when creating your own layers or models with
the Keras `),X=r(E,"CODE",{});var oo=i(X);Fe=n(oo,"Functional"),oo.forEach(o),ye=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(o),oe=u(v),C=r(v,"UL",{});var D=i(C);A=r(D,"LI",{});var ee=i(A);he=n(ee,"a single Tensor with "),H=r(ee,"CODE",{});var to=i(H);Ee=n(to,"input_ids"),to.forEach(o),be=n(ee," only and nothing else: "),Q=r(ee,"CODE",{});var no=i(Q);ze=n(no,"model(input_ids)"),no.forEach(o),ee.forEach(o),Le=u(D),z=r(D,"LI",{});var U=i(z);re=n(U,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r(U,"CODE",{});var so=i(J);me=n(so,"model([input_ids, attention_mask])"),so.forEach(o),Ce=n(U," or "),Z=r(U,"CODE",{});var Oe=i(Z);le=n(Oe,"model([input_ids, attention_mask, token_type_ids])"),Oe.forEach(o),U.forEach(o),fe=u(D),B=r(D,"LI",{});var Se=i(B);Pe=n(Se,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=r(Se,"CODE",{});var ao=i(j);Ae=n(ao,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ao.forEach(o),Se.forEach(o),D.forEach(o),te=u(v),I=r(v,"P",{});var de=i(I);Ie=n(de,`Note that when creating models and layers with
`),N=r(de,"A",{href:!0,rel:!0});var De=i(N);Ne=n(De,"subclassing"),De.forEach(o),je=n(de,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),de.forEach(o),this.h()},h(){l(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),l(N,"rel","nofollow")},m(v,q){m(v,c,q),e(c,b),e(c,g),e(g,_),e(c,y),m(v,d,q),m(v,h,q),e(h,F),e(F,we),e(h,_e),e(h,R),e(R,ae),m(v,se,q),m(v,$,q),e($,Te),e($,V),e(V,xe),e($,ve),e($,O),e(O,Me),e($,ie),e($,G),e(G,$e),e($,pe),e($,Y),e(Y,qe),e($,ue),e($,X),e(X,Fe),e($,ye),m(v,oe,q),m(v,C,q),e(C,A),e(A,he),e(A,H),e(H,Ee),e(A,be),e(A,Q),e(Q,ze),e(C,Le),e(C,z),e(z,re),e(z,J),e(J,me),e(z,Ce),e(z,Z),e(Z,le),e(C,fe),e(C,B),e(B,Pe),e(B,j),e(j,Ae),m(v,te,q),m(v,I,q),e(I,Ie),e(I,N),e(N,Ne),e(I,je)},d(v){v&&o(c),v&&o(d),v&&o(h),v&&o(se),v&&o($),v&&o(oe),v&&o(C),v&&o(te),v&&o(I)}}}function ib(P){let c,b,g,_,y;return{c(){c=a("p"),b=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),_=t("Module"),y=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(h,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(o)},m(d,h){m(d,c,h),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function lb(P){let c,b,g,_,y;return _=new Lt({props:{code:`from transformers import AutoProcessor, TFAutoModel
from datasets import load_dataset

processor = AutoProcessor.from_pretrained("microsoft/layoutlmv3-base", apply_ocr=False)
model = TFAutoModel.from_pretrained("microsoft/layoutlmv3-base")

dataset = load_dataset("nielsr/funsd-layoutlmv3", split="train")
example = dataset[0]
image = example["image"]
words = example["tokens"]
boxes = example["bboxes"]

encoding = processor(image, words, boxes=boxes, return_tensors="tf")

outputs = model(**encoding)
last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFAutoModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>, apply_ocr=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModel.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/funsd-layoutlmv3&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>words = example[<span class="hljs-string">&quot;tokens&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes = example[<span class="hljs-string">&quot;bboxes&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, words, boxes=boxes, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){c=a("p"),b=t("Examples:"),g=p(),L(_.$$.fragment)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Examples:"),h.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,h){m(d,c,h),e(c,b),m(d,g,h),w(_,d,h),y=!0},p:bt,i(d){y||(T(_.$$.fragment,d),y=!0)},o(d){x(_.$$.fragment,d),y=!1},d(d){d&&o(c),d&&o(g),M(_,d)}}}function db(P){let c,b,g,_,y,d,h,F,we,_e,R,ae,se,$,Te,V,xe,ve,O,Me,ie,G,$e,pe,Y,qe,ue,X,Fe,ye,oe,C,A,he,H,Ee,be,Q,ze,Le,z,re,J,me,Ce,Z,le,fe,B,Pe,j,Ae,te,I,Ie,N,Ne,je;return{c(){c=a("p"),b=t("TensorFlow models and layers in "),g=a("code"),_=t("transformers"),y=t(" accept two formats as input:"),d=p(),h=a("ul"),F=a("li"),we=t("having all inputs as keyword arguments (like PyTorch models), or"),_e=p(),R=a("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),se=p(),$=a("p"),Te=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=a("code"),xe=t("model.fit()"),ve=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a("code"),Me=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),$e=t("fit()"),pe=t(" and "),Y=a("code"),qe=t("predict()"),ue=t(`, such as when creating your own layers or models with
the Keras `),X=a("code"),Fe=t("Functional"),ye=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),C=a("ul"),A=a("li"),he=t("a single Tensor with "),H=a("code"),Ee=t("input_ids"),be=t(" only and nothing else: "),Q=a("code"),ze=t("model(input_ids)"),Le=p(),z=a("li"),re=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=a("code"),me=t("model([input_ids, attention_mask])"),Ce=t(" or "),Z=a("code"),le=t("model([input_ids, attention_mask, token_type_ids])"),fe=p(),B=a("li"),Pe=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=a("code"),Ae=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=p(),I=a("p"),Ie=t(`Note that when creating models and layers with
`),N=a("a"),Ne=t("subclassing"),je=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){c=r(v,"P",{});var q=i(c);b=n(q,"TensorFlow models and layers in "),g=r(q,"CODE",{});var Ye=i(g);_=n(Ye,"transformers"),Ye.forEach(o),y=n(q," accept two formats as input:"),q.forEach(o),d=u(v),h=r(v,"UL",{});var ne=i(h);F=r(ne,"LI",{});var Xe=i(F);we=n(Xe,"having all inputs as keyword arguments (like PyTorch models), or"),Xe.forEach(o),_e=u(ne),R=r(ne,"LI",{});var Je=i(R);ae=n(Je,"having all inputs as a list, tuple or dict in the first positional argument."),Je.forEach(o),ne.forEach(o),se=u(v),$=r(v,"P",{});var E=i($);Te=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=r(E,"CODE",{});var ge=i(V);xe=n(ge,"model.fit()"),ge.forEach(o),ve=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=r(E,"CODE",{});var Ze=i(O);Me=n(Ze,"model.fit()"),Ze.forEach(o),ie=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(E,"CODE",{});var We=i(G);$e=n(We,"fit()"),We.forEach(o),pe=n(E," and "),Y=r(E,"CODE",{});var eo=i(Y);qe=n(eo,"predict()"),eo.forEach(o),ue=n(E,`, such as when creating your own layers or models with
the Keras `),X=r(E,"CODE",{});var oo=i(X);Fe=n(oo,"Functional"),oo.forEach(o),ye=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(o),oe=u(v),C=r(v,"UL",{});var D=i(C);A=r(D,"LI",{});var ee=i(A);he=n(ee,"a single Tensor with "),H=r(ee,"CODE",{});var to=i(H);Ee=n(to,"input_ids"),to.forEach(o),be=n(ee," only and nothing else: "),Q=r(ee,"CODE",{});var no=i(Q);ze=n(no,"model(input_ids)"),no.forEach(o),ee.forEach(o),Le=u(D),z=r(D,"LI",{});var U=i(z);re=n(U,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r(U,"CODE",{});var so=i(J);me=n(so,"model([input_ids, attention_mask])"),so.forEach(o),Ce=n(U," or "),Z=r(U,"CODE",{});var Oe=i(Z);le=n(Oe,"model([input_ids, attention_mask, token_type_ids])"),Oe.forEach(o),U.forEach(o),fe=u(D),B=r(D,"LI",{});var Se=i(B);Pe=n(Se,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=r(Se,"CODE",{});var ao=i(j);Ae=n(ao,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ao.forEach(o),Se.forEach(o),D.forEach(o),te=u(v),I=r(v,"P",{});var de=i(I);Ie=n(de,`Note that when creating models and layers with
`),N=r(de,"A",{href:!0,rel:!0});var De=i(N);Ne=n(De,"subclassing"),De.forEach(o),je=n(de,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),de.forEach(o),this.h()},h(){l(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),l(N,"rel","nofollow")},m(v,q){m(v,c,q),e(c,b),e(c,g),e(g,_),e(c,y),m(v,d,q),m(v,h,q),e(h,F),e(F,we),e(h,_e),e(h,R),e(R,ae),m(v,se,q),m(v,$,q),e($,Te),e($,V),e(V,xe),e($,ve),e($,O),e(O,Me),e($,ie),e($,G),e(G,$e),e($,pe),e($,Y),e(Y,qe),e($,ue),e($,X),e(X,Fe),e($,ye),m(v,oe,q),m(v,C,q),e(C,A),e(A,he),e(A,H),e(H,Ee),e(A,be),e(A,Q),e(Q,ze),e(C,Le),e(C,z),e(z,re),e(z,J),e(J,me),e(z,Ce),e(z,Z),e(Z,le),e(C,fe),e(C,B),e(B,Pe),e(B,j),e(j,Ae),m(v,te,q),m(v,I,q),e(I,Ie),e(I,N),e(N,Ne),e(I,je)},d(v){v&&o(c),v&&o(d),v&&o(h),v&&o(se),v&&o($),v&&o(oe),v&&o(C),v&&o(te),v&&o(I)}}}function cb(P){let c,b,g,_,y;return{c(){c=a("p"),b=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),_=t("Module"),y=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(h,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(o)},m(d,h){m(d,c,h),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function pb(P){let c,b,g,_,y;return _=new Lt({props:{code:`from transformers import AutoProcessor, TFAutoModelForSequenceClassification
from datasets import load_dataset
import tensorflow as tf

processor = AutoProcessor.from_pretrained("microsoft/layoutlmv3-base", apply_ocr=False)
model = TFAutoModelForSequenceClassification.from_pretrained("microsoft/layoutlmv3-base")

dataset = load_dataset("nielsr/funsd-layoutlmv3", split="train")
example = dataset[0]
image = example["image"]
words = example["tokens"]
boxes = example["bboxes"]

encoding = processor(image, words, boxes=boxes, return_tensors="tf")
sequence_label = tf.convert_to_tensor([1])

outputs = model(**encoding, labels=sequence_label)
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFAutoModelForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>, apply_ocr=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/funsd-layoutlmv3&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>words = example[<span class="hljs-string">&quot;tokens&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes = example[<span class="hljs-string">&quot;bboxes&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, words, boxes=boxes, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sequence_label = tf.convert_to_tensor([<span class="hljs-number">1</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding, labels=sequence_label)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){c=a("p"),b=t("Examples:"),g=p(),L(_.$$.fragment)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Examples:"),h.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,h){m(d,c,h),e(c,b),m(d,g,h),w(_,d,h),y=!0},p:bt,i(d){y||(T(_.$$.fragment,d),y=!0)},o(d){x(_.$$.fragment,d),y=!1},d(d){d&&o(c),d&&o(g),M(_,d)}}}function ub(P){let c,b,g,_,y,d,h,F,we,_e,R,ae,se,$,Te,V,xe,ve,O,Me,ie,G,$e,pe,Y,qe,ue,X,Fe,ye,oe,C,A,he,H,Ee,be,Q,ze,Le,z,re,J,me,Ce,Z,le,fe,B,Pe,j,Ae,te,I,Ie,N,Ne,je;return{c(){c=a("p"),b=t("TensorFlow models and layers in "),g=a("code"),_=t("transformers"),y=t(" accept two formats as input:"),d=p(),h=a("ul"),F=a("li"),we=t("having all inputs as keyword arguments (like PyTorch models), or"),_e=p(),R=a("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),se=p(),$=a("p"),Te=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=a("code"),xe=t("model.fit()"),ve=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a("code"),Me=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),$e=t("fit()"),pe=t(" and "),Y=a("code"),qe=t("predict()"),ue=t(`, such as when creating your own layers or models with
the Keras `),X=a("code"),Fe=t("Functional"),ye=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),C=a("ul"),A=a("li"),he=t("a single Tensor with "),H=a("code"),Ee=t("input_ids"),be=t(" only and nothing else: "),Q=a("code"),ze=t("model(input_ids)"),Le=p(),z=a("li"),re=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=a("code"),me=t("model([input_ids, attention_mask])"),Ce=t(" or "),Z=a("code"),le=t("model([input_ids, attention_mask, token_type_ids])"),fe=p(),B=a("li"),Pe=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=a("code"),Ae=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=p(),I=a("p"),Ie=t(`Note that when creating models and layers with
`),N=a("a"),Ne=t("subclassing"),je=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){c=r(v,"P",{});var q=i(c);b=n(q,"TensorFlow models and layers in "),g=r(q,"CODE",{});var Ye=i(g);_=n(Ye,"transformers"),Ye.forEach(o),y=n(q," accept two formats as input:"),q.forEach(o),d=u(v),h=r(v,"UL",{});var ne=i(h);F=r(ne,"LI",{});var Xe=i(F);we=n(Xe,"having all inputs as keyword arguments (like PyTorch models), or"),Xe.forEach(o),_e=u(ne),R=r(ne,"LI",{});var Je=i(R);ae=n(Je,"having all inputs as a list, tuple or dict in the first positional argument."),Je.forEach(o),ne.forEach(o),se=u(v),$=r(v,"P",{});var E=i($);Te=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=r(E,"CODE",{});var ge=i(V);xe=n(ge,"model.fit()"),ge.forEach(o),ve=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=r(E,"CODE",{});var Ze=i(O);Me=n(Ze,"model.fit()"),Ze.forEach(o),ie=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(E,"CODE",{});var We=i(G);$e=n(We,"fit()"),We.forEach(o),pe=n(E," and "),Y=r(E,"CODE",{});var eo=i(Y);qe=n(eo,"predict()"),eo.forEach(o),ue=n(E,`, such as when creating your own layers or models with
the Keras `),X=r(E,"CODE",{});var oo=i(X);Fe=n(oo,"Functional"),oo.forEach(o),ye=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(o),oe=u(v),C=r(v,"UL",{});var D=i(C);A=r(D,"LI",{});var ee=i(A);he=n(ee,"a single Tensor with "),H=r(ee,"CODE",{});var to=i(H);Ee=n(to,"input_ids"),to.forEach(o),be=n(ee," only and nothing else: "),Q=r(ee,"CODE",{});var no=i(Q);ze=n(no,"model(input_ids)"),no.forEach(o),ee.forEach(o),Le=u(D),z=r(D,"LI",{});var U=i(z);re=n(U,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r(U,"CODE",{});var so=i(J);me=n(so,"model([input_ids, attention_mask])"),so.forEach(o),Ce=n(U," or "),Z=r(U,"CODE",{});var Oe=i(Z);le=n(Oe,"model([input_ids, attention_mask, token_type_ids])"),Oe.forEach(o),U.forEach(o),fe=u(D),B=r(D,"LI",{});var Se=i(B);Pe=n(Se,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=r(Se,"CODE",{});var ao=i(j);Ae=n(ao,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ao.forEach(o),Se.forEach(o),D.forEach(o),te=u(v),I=r(v,"P",{});var de=i(I);Ie=n(de,`Note that when creating models and layers with
`),N=r(de,"A",{href:!0,rel:!0});var De=i(N);Ne=n(De,"subclassing"),De.forEach(o),je=n(de,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),de.forEach(o),this.h()},h(){l(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),l(N,"rel","nofollow")},m(v,q){m(v,c,q),e(c,b),e(c,g),e(g,_),e(c,y),m(v,d,q),m(v,h,q),e(h,F),e(F,we),e(h,_e),e(h,R),e(R,ae),m(v,se,q),m(v,$,q),e($,Te),e($,V),e(V,xe),e($,ve),e($,O),e(O,Me),e($,ie),e($,G),e(G,$e),e($,pe),e($,Y),e(Y,qe),e($,ue),e($,X),e(X,Fe),e($,ye),m(v,oe,q),m(v,C,q),e(C,A),e(A,he),e(A,H),e(H,Ee),e(A,be),e(A,Q),e(Q,ze),e(C,Le),e(C,z),e(z,re),e(z,J),e(J,me),e(z,Ce),e(z,Z),e(Z,le),e(C,fe),e(C,B),e(B,Pe),e(B,j),e(j,Ae),m(v,te,q),m(v,I,q),e(I,Ie),e(I,N),e(N,Ne),e(I,je)},d(v){v&&o(c),v&&o(d),v&&o(h),v&&o(se),v&&o($),v&&o(oe),v&&o(C),v&&o(te),v&&o(I)}}}function hb(P){let c,b,g,_,y;return{c(){c=a("p"),b=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),_=t("Module"),y=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(h,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(o)},m(d,h){m(d,c,h),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function mb(P){let c,b,g,_,y;return _=new Lt({props:{code:`from transformers import AutoProcessor, TFAutoModelForTokenClassification
from datasets import load_dataset

processor = AutoProcessor.from_pretrained("microsoft/layoutlmv3-base", apply_ocr=False)
model = TFAutoModelForTokenClassification.from_pretrained("microsoft/layoutlmv3-base", num_labels=7)

dataset = load_dataset("nielsr/funsd-layoutlmv3", split="train")
example = dataset[0]
image = example["image"]
words = example["tokens"]
boxes = example["bboxes"]
word_labels = example["ner_tags"]

encoding = processor(image, words, boxes=boxes, word_labels=word_labels, return_tensors="tf")

outputs = model(**encoding)
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFAutoModelForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>, apply_ocr=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>, num_labels=<span class="hljs-number">7</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/funsd-layoutlmv3&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>words = example[<span class="hljs-string">&quot;tokens&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes = example[<span class="hljs-string">&quot;bboxes&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>word_labels = example[<span class="hljs-string">&quot;ner_tags&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, words, boxes=boxes, word_labels=word_labels, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){c=a("p"),b=t("Examples:"),g=p(),L(_.$$.fragment)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Examples:"),h.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,h){m(d,c,h),e(c,b),m(d,g,h),w(_,d,h),y=!0},p:bt,i(d){y||(T(_.$$.fragment,d),y=!0)},o(d){x(_.$$.fragment,d),y=!1},d(d){d&&o(c),d&&o(g),M(_,d)}}}function fb(P){let c,b,g,_,y,d,h,F,we,_e,R,ae,se,$,Te,V,xe,ve,O,Me,ie,G,$e,pe,Y,qe,ue,X,Fe,ye,oe,C,A,he,H,Ee,be,Q,ze,Le,z,re,J,me,Ce,Z,le,fe,B,Pe,j,Ae,te,I,Ie,N,Ne,je;return{c(){c=a("p"),b=t("TensorFlow models and layers in "),g=a("code"),_=t("transformers"),y=t(" accept two formats as input:"),d=p(),h=a("ul"),F=a("li"),we=t("having all inputs as keyword arguments (like PyTorch models), or"),_e=p(),R=a("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),se=p(),$=a("p"),Te=t(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=a("code"),xe=t("model.fit()"),ve=t(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a("code"),Me=t("model.fit()"),ie=t(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),$e=t("fit()"),pe=t(" and "),Y=a("code"),qe=t("predict()"),ue=t(`, such as when creating your own layers or models with
the Keras `),X=a("code"),Fe=t("Functional"),ye=t(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),C=a("ul"),A=a("li"),he=t("a single Tensor with "),H=a("code"),Ee=t("input_ids"),be=t(" only and nothing else: "),Q=a("code"),ze=t("model(input_ids)"),Le=p(),z=a("li"),re=t(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=a("code"),me=t("model([input_ids, attention_mask])"),Ce=t(" or "),Z=a("code"),le=t("model([input_ids, attention_mask, token_type_ids])"),fe=p(),B=a("li"),Pe=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=a("code"),Ae=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=p(),I=a("p"),Ie=t(`Note that when creating models and layers with
`),N=a("a"),Ne=t("subclassing"),je=t(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){c=r(v,"P",{});var q=i(c);b=n(q,"TensorFlow models and layers in "),g=r(q,"CODE",{});var Ye=i(g);_=n(Ye,"transformers"),Ye.forEach(o),y=n(q," accept two formats as input:"),q.forEach(o),d=u(v),h=r(v,"UL",{});var ne=i(h);F=r(ne,"LI",{});var Xe=i(F);we=n(Xe,"having all inputs as keyword arguments (like PyTorch models), or"),Xe.forEach(o),_e=u(ne),R=r(ne,"LI",{});var Je=i(R);ae=n(Je,"having all inputs as a list, tuple or dict in the first positional argument."),Je.forEach(o),ne.forEach(o),se=u(v),$=r(v,"P",{});var E=i($);Te=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=r(E,"CODE",{});var ge=i(V);xe=n(ge,"model.fit()"),ge.forEach(o),ve=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=r(E,"CODE",{});var Ze=i(O);Me=n(Ze,"model.fit()"),Ze.forEach(o),ie=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(E,"CODE",{});var We=i(G);$e=n(We,"fit()"),We.forEach(o),pe=n(E," and "),Y=r(E,"CODE",{});var eo=i(Y);qe=n(eo,"predict()"),eo.forEach(o),ue=n(E,`, such as when creating your own layers or models with
the Keras `),X=r(E,"CODE",{});var oo=i(X);Fe=n(oo,"Functional"),oo.forEach(o),ye=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(o),oe=u(v),C=r(v,"UL",{});var D=i(C);A=r(D,"LI",{});var ee=i(A);he=n(ee,"a single Tensor with "),H=r(ee,"CODE",{});var to=i(H);Ee=n(to,"input_ids"),to.forEach(o),be=n(ee," only and nothing else: "),Q=r(ee,"CODE",{});var no=i(Q);ze=n(no,"model(input_ids)"),no.forEach(o),ee.forEach(o),Le=u(D),z=r(D,"LI",{});var U=i(z);re=n(U,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),J=r(U,"CODE",{});var so=i(J);me=n(so,"model([input_ids, attention_mask])"),so.forEach(o),Ce=n(U," or "),Z=r(U,"CODE",{});var Oe=i(Z);le=n(Oe,"model([input_ids, attention_mask, token_type_ids])"),Oe.forEach(o),U.forEach(o),fe=u(D),B=r(D,"LI",{});var Se=i(B);Pe=n(Se,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),j=r(Se,"CODE",{});var ao=i(j);Ae=n(ao,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ao.forEach(o),Se.forEach(o),D.forEach(o),te=u(v),I=r(v,"P",{});var de=i(I);Ie=n(de,`Note that when creating models and layers with
`),N=r(de,"A",{href:!0,rel:!0});var De=i(N);Ne=n(De,"subclassing"),De.forEach(o),je=n(de,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),de.forEach(o),this.h()},h(){l(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),l(N,"rel","nofollow")},m(v,q){m(v,c,q),e(c,b),e(c,g),e(g,_),e(c,y),m(v,d,q),m(v,h,q),e(h,F),e(F,we),e(h,_e),e(h,R),e(R,ae),m(v,se,q),m(v,$,q),e($,Te),e($,V),e(V,xe),e($,ve),e($,O),e(O,Me),e($,ie),e($,G),e(G,$e),e($,pe),e($,Y),e(Y,qe),e($,ue),e($,X),e(X,Fe),e($,ye),m(v,oe,q),m(v,C,q),e(C,A),e(A,he),e(A,H),e(H,Ee),e(A,be),e(A,Q),e(Q,ze),e(C,Le),e(C,z),e(z,re),e(z,J),e(J,me),e(z,Ce),e(z,Z),e(Z,le),e(C,fe),e(C,B),e(B,Pe),e(B,j),e(j,Ae),m(v,te,q),m(v,I,q),e(I,Ie),e(I,N),e(N,Ne),e(I,je)},d(v){v&&o(c),v&&o(d),v&&o(h),v&&o(se),v&&o($),v&&o(oe),v&&o(C),v&&o(te),v&&o(I)}}}function gb(P){let c,b,g,_,y;return{c(){c=a("p"),b=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),_=t("Module"),y=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(h,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(o)},m(d,h){m(d,c,h),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function _b(P){let c,b,g,_,y;return _=new Lt({props:{code:`from transformers import AutoProcessor, TFAutoModelForQuestionAnswering
from datasets import load_dataset
import tensorflow as tf

processor = AutoProcessor.from_pretrained("microsoft/layoutlmv3-base", apply_ocr=False)
model = TFAutoModelForQuestionAnswering.from_pretrained("microsoft/layoutlmv3-base")

dataset = load_dataset("nielsr/funsd-layoutlmv3", split="train")
example = dataset[0]
image = example["image"]
question = "what's his name?"
words = example["tokens"]
boxes = example["bboxes"]

encoding = processor(image, question, words, boxes=boxes, return_tensors="tf")
start_positions = tf.convert_to_tensor([1])
end_positions = tf.convert_to_tensor([3])

outputs = model(**encoding, start_positions=start_positions, end_positions=end_positions)
loss = outputs.loss
start_scores = outputs.start_logits
end_scores = outputs.end_logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFAutoModelForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>, apply_ocr=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;microsoft/layoutlmv3-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;nielsr/funsd-layoutlmv3&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>example = dataset[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image = example[<span class="hljs-string">&quot;image&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>question = <span class="hljs-string">&quot;what&#x27;s his name?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>words = example[<span class="hljs-string">&quot;tokens&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>boxes = example[<span class="hljs-string">&quot;bboxes&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = processor(image, question, words, boxes=boxes, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_positions = tf.convert_to_tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>end_positions = tf.convert_to_tensor([<span class="hljs-number">3</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding, start_positions=start_positions, end_positions=end_positions)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){c=a("p"),b=t("Examples:"),g=p(),L(_.$$.fragment)},l(d){c=r(d,"P",{});var h=i(c);b=n(h,"Examples:"),h.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,h){m(d,c,h),e(c,b),m(d,g,h),w(_,d,h),y=!0},p:bt,i(d){y||(T(_.$$.fragment,d),y=!0)},o(d){x(_.$$.fragment,d),y=!1},d(d){d&&o(c),d&&o(g),M(_,d)}}}function vb(P){let c,b,g,_,y,d,h,F,we,_e,R,ae,se,$,Te,V,xe,ve,O,Me,ie,G,$e,pe,Y,qe,ue,X,Fe,ye,oe,C,A,he,H,Ee,be,Q,ze,Le,z,re,J,me,Ce,Z,le,fe,B,Pe,j,Ae,te,I,Ie,N,Ne,je,v,q,Ye,ne,Xe,Je,E,ge,Ze,We,eo,oo,D,ee,to,no,U,so,Oe,Se,ao,de,De,Od,En,Sd,Dd,ul,kt,jg,hl,wt,Rd,Ma,Wd,Bd,ml,Ke,Ud,zn,Qd,Vd,Cn,Hd,Kd,Pn,Gd,Yd,An,Xd,Jd,In,Zd,ec,fl,Ho,Tt,$r,Nn,oc,qr,tc,gl,$a,nc,_l,xt,vl,jn,yl,qa,Mt,Fa,sc,ac,On,rc,ic,bl,Sn,Ll,So,Do,Ea,lc,dc,Dn,cc,pc,Rn,uc,hc,mc,lo,fc,Wn,gc,_c,za,vc,yc,Bn,bc,Lc,Ca,kc,wc,Tc,Ko,xc,Un,Mc,$c,Pa,qc,Fc,kl,Qn,wl,Aa,$t,Ia,Ec,zc,Vn,Cc,Pc,Tl,Go,qt,Fr,Hn,Ac,Er,Ic,xl,co,Kn,Nc,Yo,jc,Na,Oc,Sc,Gn,Dc,Rc,Wc,Xo,Bc,ja,Uc,Qc,Oa,Vc,Hc,Kc,Ft,Ml,Jo,Et,zr,Yn,Gc,Cr,Yc,$l,Co,Xn,Xc,Pr,Jc,Zc,zt,Jn,ep,Ar,op,ql,Zo,Ct,Ir,Zn,tp,Nr,np,Fl,Po,es,sp,jr,ap,rp,Pt,os,ip,Or,lp,El,et,At,Sr,ts,dp,Dr,cp,zl,Be,ns,pp,Re,up,Rr,hp,mp,Sa,fp,gp,Wr,_p,vp,Br,yp,bp,Ur,Lp,kp,Qr,wp,Tp,Vr,xp,Mp,$p,ss,qp,Da,Fp,Ep,zp,Ra,Wa,Cp,Pp,Ap,It,as,Ip,Hr,Np,jp,Ba,rs,Cl,ot,Nt,Kr,is,Op,Gr,Sp,Pl,po,ls,Dp,ds,Rp,Yr,Wp,Bp,Up,cs,Qp,Ua,Vp,Hp,Kp,jt,ps,Gp,Xr,Yp,Al,tt,Ot,Jr,us,Xp,Zr,Jp,Il,ro,hs,Zp,ei,eu,ou,Qa,Va,tu,nu,su,ce,au,Ha,ru,iu,Ka,lu,du,Ga,cu,pu,oi,uu,hu,ti,mu,fu,ni,gu,_u,si,vu,yu,ai,bu,Lu,ri,ku,wu,Tu,Ro,ms,xu,S,Mu,ii,$u,qu,fs,li,Fu,Eu,zu,Ya,Cu,Pu,di,Au,Iu,ci,Nu,ju,gs,pi,Ou,Su,Du,ui,Ru,Wu,Xa,Bu,Uu,hi,Qu,Vu,mi,Hu,Ku,fi,Gu,Yu,gi,Xu,Ju,_i,Zu,eh,_s,vi,oh,th,nh,yi,sh,ah,rh,bi,ih,Nl,nt,St,Li,vs,lh,ki,dh,jl,Ao,ys,ch,bs,ph,Ls,uh,hh,mh,yo,ks,fh,st,gh,Ja,_h,vh,wi,yh,bh,Lh,Dt,kh,Rt,Ol,at,Wt,Ti,ws,wh,xi,Th,Sl,uo,Ts,xh,xs,Mh,Ms,$h,qh,Fh,$s,Eh,qs,zh,Ch,Ph,bo,Fs,Ah,rt,Ih,Za,Nh,jh,Mi,Oh,Sh,Dh,Bt,Rh,Ut,Dl,it,Qt,$i,Es,Wh,qi,Bh,Rl,ho,zs,Uh,mo,Qh,Cs,Vh,Hh,Ps,Kh,Gh,As,Yh,Xh,Is,Jh,Zh,em,Ns,om,js,tm,nm,sm,Lo,Os,am,lt,rm,er,im,lm,Fi,dm,cm,pm,Vt,um,Ht,Wl,dt,Kt,Ei,Ss,hm,zi,mm,Bl,fo,Ds,fm,Io,gm,Rs,_m,vm,Ci,ym,bm,Pi,Lm,km,wm,Ws,Tm,Bs,xm,Mm,$m,ko,Us,qm,ct,Fm,or,Em,zm,Ai,Cm,Pm,Am,Gt,Im,Yt,Ul,pt,Xt,Ii,Qs,Nm,Ni,jm,Ql,io,Vs,Om,Hs,Sm,tr,Dm,Rm,Wm,Ks,Bm,Gs,Um,Qm,Vm,Jt,Hm,wo,Ys,Km,ut,Gm,nr,Ym,Xm,ji,Jm,Zm,ef,Zt,of,en,Vl,ht,on,Oi,Xs,tf,Si,nf,Hl,Ue,Js,sf,Zs,af,ea,rf,lf,df,oa,cf,sr,pf,uf,hf,ta,mf,na,ff,gf,_f,tn,vf,To,sa,yf,mt,bf,ar,Lf,kf,Di,wf,Tf,xf,nn,Mf,sn,Kl,ft,an,Ri,aa,$f,Wi,qf,Gl,Qe,ra,Ff,go,Ef,ia,zf,Cf,la,Pf,Af,da,If,Nf,ca,jf,Of,Sf,pa,Df,rr,Rf,Wf,Bf,ua,Uf,ha,Qf,Vf,Hf,rn,Kf,xo,ma,Gf,gt,Yf,ir,Xf,Jf,Bi,Zf,eg,og,ln,tg,dn,Yl,_t,cn,Ui,fa,ng,Qi,sg,Xl,Ve,ga,ag,No,rg,_a,ig,lg,Vi,dg,cg,Hi,pg,ug,hg,va,mg,lr,fg,gg,_g,ya,vg,ba,yg,bg,Lg,pn,kg,Mo,La,wg,vt,Tg,dr,xg,Mg,Ki,$g,qg,Fg,un,Eg,hn,Jl;return d=new He({}),$=new He({}),Nn=new He({}),xt=new vo({props:{$$slots:{default:[Yy]},$$scope:{ctx:P}}}),jn=new Ng({props:{pipeline:"text-classification"}}),Sn=new Ng({props:{pipeline:"token-classification"}}),Qn=new Ng({props:{pipeline:"question-answering"}}),Hn=new He({}),Kn=new K({props:{name:"class transformers.LayoutLMv3Config",anchor:"transformers.LayoutLMv3Config",parameters:[{name:"vocab_size",val:" = 50265"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"max_2d_position_embeddings",val:" = 1024"},{name:"coordinate_size",val:" = 128"},{name:"shape_size",val:" = 128"},{name:"has_relative_attention_bias",val:" = True"},{name:"rel_pos_bins",val:" = 32"},{name:"max_rel_pos",val:" = 128"},{name:"rel_2d_pos_bins",val:" = 64"},{name:"max_rel_2d_pos",val:" = 256"},{name:"has_spatial_attention_bias",val:" = True"},{name:"text_embed",val:" = True"},{name:"visual_embed",val:" = True"},{name:"input_size",val:" = 224"},{name:"num_channels",val:" = 3"},{name:"patch_size",val:" = 16"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3Config.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the LayoutLMv3 model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Model">LayoutLMv3Model</a>.`,name:"vocab_size"},{anchor:"transformers.LayoutLMv3Config.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimension of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.LayoutLMv3Config.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.LayoutLMv3Config.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.LayoutLMv3Config.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.LayoutLMv3Config.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.LayoutLMv3Config.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.LayoutLMv3Config.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.LayoutLMv3Config.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.LayoutLMv3Config.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Model">LayoutLMv3Model</a>.`,name:"type_vocab_size"},{anchor:"transformers.LayoutLMv3Config.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.LayoutLMv3Config.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.LayoutLMv3Config.max_2d_position_embeddings",description:`<strong>max_2d_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum value that the 2D position embedding might ever be used with. Typically set this to something
large just in case (e.g., 1024).`,name:"max_2d_position_embeddings"},{anchor:"transformers.LayoutLMv3Config.coordinate_size",description:`<strong>coordinate_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>128</code>) &#x2014;
Dimension of the coordinate embeddings.`,name:"coordinate_size"},{anchor:"transformers.LayoutLMv3Config.shape_size",description:`<strong>shape_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>128</code>) &#x2014;
Dimension of the width and height embeddings.`,name:"shape_size"},{anchor:"transformers.LayoutLMv3Config.has_relative_attention_bias",description:`<strong>has_relative_attention_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use a relative attention bias in the self-attention mechanism.`,name:"has_relative_attention_bias"},{anchor:"transformers.LayoutLMv3Config.rel_pos_bins",description:`<strong>rel_pos_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The number of relative position bins to be used in the self-attention mechanism.`,name:"rel_pos_bins"},{anchor:"transformers.LayoutLMv3Config.max_rel_pos",description:`<strong>max_rel_pos</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
The maximum number of relative positions to be used in the self-attention mechanism.`,name:"max_rel_pos"},{anchor:"transformers.LayoutLMv3Config.max_rel_2d_pos",description:`<strong>max_rel_2d_pos</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
The maximum number of relative 2D positions in the self-attention mechanism.`,name:"max_rel_2d_pos"},{anchor:"transformers.LayoutLMv3Config.rel_2d_pos_bins",description:`<strong>rel_2d_pos_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
The number of 2D relative position bins in the self-attention mechanism.`,name:"rel_2d_pos_bins"},{anchor:"transformers.LayoutLMv3Config.has_spatial_attention_bias",description:`<strong>has_spatial_attention_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use a spatial attention bias in the self-attention mechanism.`,name:"has_spatial_attention_bias"},{anchor:"transformers.LayoutLMv3Config.visual_embed",description:`<strong>visual_embed</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add patch embeddings.`,name:"visual_embed"},{anchor:"transformers.LayoutLMv3Config.input_size",description:`<strong>input_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>224</code>) &#x2014;
The size (resolution) of the images.`,name:"input_size"},{anchor:"transformers.LayoutLMv3Config.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>3</code>) &#x2014;
The number of channels of the images.`,name:"num_channels"},{anchor:"transformers.LayoutLMv3Config.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>16</code>) &#x2014;
The size (resolution) of the patches.`,name:"patch_size"},{anchor:"transformers.LayoutLMv3Config.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/configuration_layoutlmv3.py#L40"}}),Ft=new yt({props:{anchor:"transformers.LayoutLMv3Config.example",$$slots:{default:[Xy]},$$scope:{ctx:P}}}),Yn=new He({}),Xn=new K({props:{name:"class transformers.LayoutLMv3ImageProcessor",anchor:"transformers.LayoutLMv3ImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_value",val:": float = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.Iterable[float]] = None"},{name:"image_std",val:": typing.Union[float, typing.Iterable[float]] = None"},{name:"apply_ocr",val:": bool = True"},{name:"ocr_lang",val:": typing.Optional[str] = None"},{name:"tesseract_config",val:": typing.Optional[str] = ''"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3ImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to <code>(size[&quot;height&quot;], size[&quot;width&quot;])</code>. Can be
overridden by <code>do_resize</code> in <code>preprocess</code>.`,name:"do_resize"},{anchor:"transformers.LayoutLMv3ImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Size of the image after resizing. Can be overridden by <code>size</code> in <code>preprocess</code>.`,name:"size"},{anchor:"transformers.LayoutLMv3ImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by <code>resample</code> in <code>preprocess</code>.`,name:"resample"},{anchor:"transformers.LayoutLMv3ImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image&#x2019;s pixel values by the specified <code>rescale_value</code>. Can be overridden by
<code>do_rescale</code> in <code>preprocess</code>.`,name:"do_rescale"},{anchor:"transformers.LayoutLMv3ImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1 / 255) &#x2014;
Value by which the image&#x2019;s pixel values are rescaled. Can be overridden by <code>rescale_factor</code> in
<code>preprocess</code>.`,name:"rescale_factor"},{anchor:"transformers.LayoutLMv3ImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.LayoutLMv3ImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>Iterable[float]</code> or <code>float</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.LayoutLMv3ImageProcessor.image_std",description:`<strong>image_std</strong> (<code>Iterable[float]</code> or <code>float</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.LayoutLMv3ImageProcessor.apply_ocr",description:`<strong>apply_ocr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to apply the Tesseract OCR engine to get words + normalized bounding boxes. Can be overridden by
the <code>apply_ocr</code> parameter in the <code>preprocess</code> method.`,name:"apply_ocr"},{anchor:"transformers.LayoutLMv3ImageProcessor.ocr_lang",description:`<strong>ocr_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language, specified by its ISO code, to be used by the Tesseract OCR engine. By default, English is
used. Can be overridden by the <code>ocr_lang</code> parameter in the <code>preprocess</code> method.`,name:"ocr_lang"},{anchor:"transformers.LayoutLMv3ImageProcessor.tesseract_config",description:`<strong>tesseract_config</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Any additional custom configuration flags that are forwarded to the <code>config</code> parameter when calling
Tesseract. For example: &#x2018;&#x2014;psm 6&#x2019;. Can be overridden by the <code>tesseract_config</code> parameter in the
<code>preprocess</code> method.`,name:"tesseract_config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/image_processing_layoutlmv3.py#L106"}}),Jn=new K({props:{name:"__call__",anchor:"transformers.LayoutLMv3ImageProcessor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/image_processing_utils.py#L435"}}),Zn=new He({}),es=new K({props:{name:"class transformers.LayoutLMv3ImageProcessor",anchor:"transformers.LayoutLMv3ImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_value",val:": float = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.Iterable[float]] = None"},{name:"image_std",val:": typing.Union[float, typing.Iterable[float]] = None"},{name:"apply_ocr",val:": bool = True"},{name:"ocr_lang",val:": typing.Optional[str] = None"},{name:"tesseract_config",val:": typing.Optional[str] = ''"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3ImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to <code>(size[&quot;height&quot;], size[&quot;width&quot;])</code>. Can be
overridden by <code>do_resize</code> in <code>preprocess</code>.`,name:"do_resize"},{anchor:"transformers.LayoutLMv3ImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Size of the image after resizing. Can be overridden by <code>size</code> in <code>preprocess</code>.`,name:"size"},{anchor:"transformers.LayoutLMv3ImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by <code>resample</code> in <code>preprocess</code>.`,name:"resample"},{anchor:"transformers.LayoutLMv3ImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image&#x2019;s pixel values by the specified <code>rescale_value</code>. Can be overridden by
<code>do_rescale</code> in <code>preprocess</code>.`,name:"do_rescale"},{anchor:"transformers.LayoutLMv3ImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1 / 255) &#x2014;
Value by which the image&#x2019;s pixel values are rescaled. Can be overridden by <code>rescale_factor</code> in
<code>preprocess</code>.`,name:"rescale_factor"},{anchor:"transformers.LayoutLMv3ImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.LayoutLMv3ImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>Iterable[float]</code> or <code>float</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.LayoutLMv3ImageProcessor.image_std",description:`<strong>image_std</strong> (<code>Iterable[float]</code> or <code>float</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.LayoutLMv3ImageProcessor.apply_ocr",description:`<strong>apply_ocr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to apply the Tesseract OCR engine to get words + normalized bounding boxes. Can be overridden by
the <code>apply_ocr</code> parameter in the <code>preprocess</code> method.`,name:"apply_ocr"},{anchor:"transformers.LayoutLMv3ImageProcessor.ocr_lang",description:`<strong>ocr_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language, specified by its ISO code, to be used by the Tesseract OCR engine. By default, English is
used. Can be overridden by the <code>ocr_lang</code> parameter in the <code>preprocess</code> method.`,name:"ocr_lang"},{anchor:"transformers.LayoutLMv3ImageProcessor.tesseract_config",description:`<strong>tesseract_config</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Any additional custom configuration flags that are forwarded to the <code>config</code> parameter when calling
Tesseract. For example: &#x2018;&#x2014;psm 6&#x2019;. Can be overridden by the <code>tesseract_config</code> parameter in the
<code>preprocess</code> method.`,name:"tesseract_config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/image_processing_layoutlmv3.py#L106"}}),os=new K({props:{name:"preprocess",anchor:"transformers.LayoutLMv3ImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:" = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": typing.Union[float, typing.Iterable[float]] = None"},{name:"image_std",val:": typing.Union[float, typing.Iterable[float]] = None"},{name:"apply_ocr",val:": bool = None"},{name:"ocr_lang",val:": typing.Optional[str] = None"},{name:"tesseract_config",val:": typing.Optional[str] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Desired size of the output image after applying <code>resize</code>.`,name:"size"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the <code>PILImageResampling</code> filters.
Only has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image pixel values between [0, 1].`,name:"do_rescale"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to apply to the image pixel values. Only has an effect if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>Iterable[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Mean values to be used for normalization. Only has an effect if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>Iterable[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Standard deviation values to be used for normalization. Only has an effect if <code>do_normalize</code> is set to
<code>True</code>.`,name:"image_std"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.apply_ocr",description:`<strong>apply_ocr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.apply_ocr</code>) &#x2014;
Whether to apply the Tesseract OCR engine to get words + normalized bounding boxes.`,name:"apply_ocr"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.ocr_lang",description:`<strong>ocr_lang</strong> (<code>str</code>, <em>optional</em>, defaults to <code>self.ocr_lang</code>) &#x2014;
The language, specified by its ISO code, to be used by the Tesseract OCR engine. By default, English is
used.`,name:"ocr_lang"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.tesseract_config",description:`<strong>tesseract_config</strong> (<code>str</code>, <em>optional</em>, defaults to <code>self.tesseract_config</code>) &#x2014;
Any additional custom configuration flags that are forwarded to the <code>config</code> parameter when calling
Tesseract.`,name:"tesseract_config"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
</ul>`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/image_processing_layoutlmv3.py#L248"}}),ts=new He({}),ns=new K({props:{name:"class transformers.LayoutLMv3Tokenizer",anchor:"transformers.LayoutLMv3Tokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"add_prefix_space",val:" = True"},{name:"cls_token_box",val:" = [0, 0, 0, 0]"},{name:"sep_token_box",val:" = [0, 0, 0, 0]"},{name:"pad_token_box",val:" = [0, 0, 0, 0]"},{name:"pad_token_label",val:" = -100"},{name:"only_label_first_subword",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3Tokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.LayoutLMv3Tokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.LayoutLMv3Tokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.LayoutLMv3Tokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.LayoutLMv3Tokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.LayoutLMv3Tokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.LayoutLMv3Tokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.LayoutLMv3Tokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.LayoutLMv3Tokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.LayoutLMv3Tokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.LayoutLMv3Tokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (RoBERTa tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.LayoutLMv3Tokenizer.cls_token_box",description:`<strong>cls_token_box</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0, 0, 0, 0]</code>) &#x2014;
The bounding box to use for the special [CLS] token.`,name:"cls_token_box"},{anchor:"transformers.LayoutLMv3Tokenizer.sep_token_box",description:`<strong>sep_token_box</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0, 0, 0, 0]</code>) &#x2014;
The bounding box to use for the special [SEP] token.`,name:"sep_token_box"},{anchor:"transformers.LayoutLMv3Tokenizer.pad_token_box",description:`<strong>pad_token_box</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0, 0, 0, 0]</code>) &#x2014;
The bounding box to use for the special [PAD] token.`,name:"pad_token_box"},{anchor:"transformers.LayoutLMv3Tokenizer.pad_token_label",description:`<strong>pad_token_label</strong> (<code>int</code>, <em>optional</em>, defaults to -100) &#x2014;
The label to use for padding tokens. Defaults to -100, which is the <code>ignore_index</code> of PyTorch&#x2019;s
CrossEntropyLoss.`,name:"pad_token_label"},{anchor:"transformers.LayoutLMv3Tokenizer.only_label_first_subword",description:`<strong>only_label_first_subword</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to only label the first subword, in case word labels are provided.`,name:"only_label_first_subword"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/tokenization_layoutlmv3.py#L200"}}),as=new K({props:{name:"__call__",anchor:"transformers.LayoutLMv3Tokenizer.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]]"},{name:"text_pair",val:": typing.Union[typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"boxes",val:": typing.Union[typing.List[typing.List[int]], typing.List[typing.List[typing.List[int]]]] = None"},{name:"word_labels",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3Tokenizer.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string, a list of strings
(words of a single example or questions of a batch of examples) or a list of list of strings (batch of
words).`,name:"text"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.text_pair",description:`<strong>text_pair</strong> (<code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence should be a list of strings
(pretokenized string).`,name:"text_pair"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.boxes",description:`<strong>boxes</strong> (<code>List[List[int]]</code>, <code>List[List[List[int]]]</code>) &#x2014;
Word-level bounding boxes. Each bounding box should be normalized to be on a 0-1000 scale.`,name:"boxes"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.word_labels",description:`<strong>word_labels</strong> (<code>List[int]</code>, <code>List[List[int]]</code>, <em>optional</em>) &#x2014;
Word-level integer labels (for token classification tasks such as FUNSD, CORD).`,name:"word_labels"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability &gt;= 7.5 (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters. If left unset or set to
<code>None</code>, this will use the predefined model maximum length if a maximum length is required by one of the
truncation/padding parameters. If the model has no specific maximum input length (like XLNet)
truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability &gt;= 7.5 (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.LayoutLMv3Tokenizer.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/tokenization_layoutlmv3.py#L547"}}),rs=new K({props:{name:"save_vocabulary",anchor:"transformers.LayoutLMv3Tokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/tokenization_layoutlmv3.py#L428"}}),is=new He({}),ls=new K({props:{name:"class transformers.LayoutLMv3TokenizerFast",anchor:"transformers.LayoutLMv3TokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"errors",val:" = 'replace'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"add_prefix_space",val:" = True"},{name:"trim_offsets",val:" = True"},{name:"cls_token_box",val:" = [0, 0, 0, 0]"},{name:"sep_token_box",val:" = [0, 0, 0, 0]"},{name:"pad_token_box",val:" = [0, 0, 0, 0]"},{name:"pad_token_label",val:" = -100"},{name:"only_label_first_subword",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3TokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.LayoutLMv3TokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.LayoutLMv3TokenizerFast.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.LayoutLMv3TokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.LayoutLMv3TokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.LayoutLMv3TokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.LayoutLMv3TokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.LayoutLMv3TokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.LayoutLMv3TokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.LayoutLMv3TokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.LayoutLMv3TokenizerFast.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (RoBERTa tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.LayoutLMv3TokenizerFast.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the post processing step should trim offsets to avoid including whitespaces.`,name:"trim_offsets"},{anchor:"transformers.LayoutLMv3TokenizerFast.cls_token_box",description:`<strong>cls_token_box</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0, 0, 0, 0]</code>) &#x2014;
The bounding box to use for the special [CLS] token.`,name:"cls_token_box"},{anchor:"transformers.LayoutLMv3TokenizerFast.sep_token_box",description:`<strong>sep_token_box</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0, 0, 0, 0]</code>) &#x2014;
The bounding box to use for the special [SEP] token.`,name:"sep_token_box"},{anchor:"transformers.LayoutLMv3TokenizerFast.pad_token_box",description:`<strong>pad_token_box</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0, 0, 0, 0]</code>) &#x2014;
The bounding box to use for the special [PAD] token.`,name:"pad_token_box"},{anchor:"transformers.LayoutLMv3TokenizerFast.pad_token_label",description:`<strong>pad_token_label</strong> (<code>int</code>, <em>optional</em>, defaults to -100) &#x2014;
The label to use for padding tokens. Defaults to -100, which is the <code>ignore_index</code> of PyTorch&#x2019;s
CrossEntropyLoss.`,name:"pad_token_label"},{anchor:"transformers.LayoutLMv3TokenizerFast.only_label_first_subword",description:`<strong>only_label_first_subword</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to only label the first subword, in case word labels are provided.`,name:"only_label_first_subword"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/tokenization_layoutlmv3_fast.py#L65"}}),ps=new K({props:{name:"__call__",anchor:"transformers.LayoutLMv3TokenizerFast.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]]"},{name:"text_pair",val:": typing.Union[typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"boxes",val:": typing.Union[typing.List[typing.List[int]], typing.List[typing.List[typing.List[int]]]] = None"},{name:"word_labels",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string, a list of strings
(words of a single example or questions of a batch of examples) or a list of list of strings (batch of
words).`,name:"text"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.text_pair",description:`<strong>text_pair</strong> (<code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence should be a list of strings
(pretokenized string).`,name:"text_pair"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.boxes",description:`<strong>boxes</strong> (<code>List[List[int]]</code>, <code>List[List[List[int]]]</code>) &#x2014;
Word-level bounding boxes. Each bounding box should be normalized to be on a 0-1000 scale.`,name:"boxes"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.word_labels",description:`<strong>word_labels</strong> (<code>List[int]</code>, <code>List[List[int]]</code>, <em>optional</em>) &#x2014;
Word-level integer labels (for token classification tasks such as FUNSD, CORD).`,name:"word_labels"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability &gt;= 7.5 (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters. If left unset or set to
<code>None</code>, this will use the predefined model maximum length if a maximum length is required by one of the
truncation/padding parameters. If the model has no specific maximum input length (like XLNet)
truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. This is especially useful to enable
the use of Tensor Cores on NVIDIA hardware with compute capability &gt;= 7.5 (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.LayoutLMv3TokenizerFast.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.25.1/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/tokenization_layoutlmv3_fast.py#L224"}}),us=new He({}),hs=new K({props:{name:"class transformers.LayoutLMv3Processor",anchor:"transformers.LayoutLMv3Processor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3Processor.feature_extractor",description:`<strong>feature_extractor</strong> (<code>LayoutLMv3FeatureExtractor</code>) &#x2014;
An instance of <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor">LayoutLMv3FeatureExtractor</a>. The feature extractor is a required input.`,name:"feature_extractor"},{anchor:"transformers.LayoutLMv3Processor.tokenizer",description:`<strong>tokenizer</strong> (<code>LayoutLMv3Tokenizer</code> or <code>LayoutLMv3TokenizerFast</code>) &#x2014;
An instance of <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer">LayoutLMv3Tokenizer</a> or <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3TokenizerFast">LayoutLMv3TokenizerFast</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/processing_layoutlmv3.py#L25"}}),ms=new K({props:{name:"__call__",anchor:"transformers.LayoutLMv3Processor.__call__",parameters:[{name:"images",val:""},{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair",val:": typing.Union[typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"boxes",val:": typing.Union[typing.List[typing.List[int]], typing.List[typing.List[typing.List[int]]]] = None"},{name:"word_labels",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/processing_layoutlmv3.py#L47"}}),vs=new He({}),ys=new K({props:{name:"class transformers.LayoutLMv3Model",anchor:"transformers.LayoutLMv3Model",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config">LayoutLMv3Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L754"}}),ks=new K({props:{name:"forward",anchor:"transformers.LayoutLMv3Model.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"bbox",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.LayoutLMv3Model.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, token_sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer">LayoutLMv3Tokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.LayoutLMv3Model.forward.bbox",description:`<strong>bbox</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, token_sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.LayoutLMv3Model.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.LayoutLMv3Model.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, token_sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.LayoutLMv3Model.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, token_sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.LayoutLMv3Model.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, token_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.LayoutLMv3Model.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.LayoutLMv3Model.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, token_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.LayoutLMv3Model.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.LayoutLMv3Model.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.LayoutLMv3Model.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L845",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config"
>LayoutLMv3Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Dt=new vo({props:{$$slots:{default:[Jy]},$$scope:{ctx:P}}}),Rt=new yt({props:{anchor:"transformers.LayoutLMv3Model.forward.example",$$slots:{default:[Zy]},$$scope:{ctx:P}}}),ws=new He({}),Ts=new K({props:{name:"class transformers.LayoutLMv3ForSequenceClassification",anchor:"transformers.LayoutLMv3ForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3ForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config">LayoutLMv3Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1290"}}),Fs=new K({props:{name:"forward",anchor:"transformers.LayoutLMv3ForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"bbox",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.LongTensor] = None"}],parametersDescription:[{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer">LayoutLMv3Tokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.bbox",description:`<strong>bbox</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.`,name:"bbox"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1302",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config"
>LayoutLMv3Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Bt=new vo({props:{$$slots:{default:[eb]},$$scope:{ctx:P}}}),Ut=new yt({props:{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.example",$$slots:{default:[ob]},$$scope:{ctx:P}}}),Es=new He({}),zs=new K({props:{name:"class transformers.LayoutLMv3ForTokenClassification",anchor:"transformers.LayoutLMv3ForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3ForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config">LayoutLMv3Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1042"}}),Os=new K({props:{name:"forward",anchor:"transformers.LayoutLMv3ForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"bbox",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"pixel_values",val:": typing.Optional[torch.LongTensor] = None"}],parametersDescription:[{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer">LayoutLMv3Tokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.bbox",description:`<strong>bbox</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.`,name:"bbox"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1059",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config"
>LayoutLMv3Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vt=new vo({props:{$$slots:{default:[tb]},$$scope:{ctx:P}}}),Ht=new yt({props:{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.example",$$slots:{default:[nb]},$$scope:{ctx:P}}}),Ss=new He({}),Ds=new K({props:{name:"class transformers.LayoutLMv3ForQuestionAnswering",anchor:"transformers.LayoutLMv3ForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3ForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config">LayoutLMv3Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1157"}}),Us=new K({props:{name:"forward",anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"bbox",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.LongTensor] = None"}],parametersDescription:[{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer">LayoutLMv3Tokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.bbox",description:`<strong>bbox</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.`,name:"bbox"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1170",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config"
>LayoutLMv3Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Gt=new vo({props:{$$slots:{default:[sb]},$$scope:{ctx:P}}}),Yt=new yt({props:{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.example",$$slots:{default:[ab]},$$scope:{ctx:P}}}),Qs=new He({}),Vs=new K({props:{name:"class transformers.TFLayoutLMv3Model",anchor:"transformers.TFLayoutLMv3Model",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFLayoutLMv3Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config">LayoutLMv3Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1143"}}),Jt=new vo({props:{$$slots:{default:[rb]},$$scope:{ctx:P}}}),Ys=new K({props:{name:"call",anchor:"transformers.TFLayoutLMv3Model.call",parameters:[{name:"input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"bbox",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"pixel_values",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFLayoutLMv3Model.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer">LayoutLMv3Tokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFLayoutLMv3Model.call.bbox",description:`<strong>bbox</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.TFLayoutLMv3Model.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.TFLayoutLMv3Model.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFLayoutLMv3Model.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFLayoutLMv3Model.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFLayoutLMv3Model.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFLayoutLMv3Model.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFLayoutLMv3Model.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFLayoutLMv3Model.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFLayoutLMv3Model.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1151",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config"
>LayoutLMv3Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Zt=new vo({props:{$$slots:{default:[ib]},$$scope:{ctx:P}}}),en=new yt({props:{anchor:"transformers.TFLayoutLMv3Model.call.example",$$slots:{default:[lb]},$$scope:{ctx:P}}}),Xs=new He({}),Js=new K({props:{name:"class transformers.TFLayoutLMv3ForSequenceClassification",anchor:"transformers.TFLayoutLMv3ForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config">LayoutLMv3Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1268"}}),tn=new vo({props:{$$slots:{default:[db]},$$scope:{ctx:P}}}),sa=new K({props:{name:"call",anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call",parameters:[{name:"input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"bbox",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"pixel_values",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer">LayoutLMv3Tokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.bbox",description:`<strong>bbox</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1278",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config"
>LayoutLMv3Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),nn=new vo({props:{$$slots:{default:[cb]},$$scope:{ctx:P}}}),sn=new yt({props:{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.example",$$slots:{default:[pb]},$$scope:{ctx:P}}}),aa=new He({}),ra=new K({props:{name:"class transformers.TFLayoutLMv3ForTokenClassification",anchor:"transformers.TFLayoutLMv3ForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFLayoutLMv3ForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config">LayoutLMv3Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1379"}}),rn=new vo({props:{$$slots:{default:[ub]},$$scope:{ctx:P}}}),ma=new K({props:{name:"call",anchor:"transformers.TFLayoutLMv3ForTokenClassification.call",parameters:[{name:"input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"bbox",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"pixel_values",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer">LayoutLMv3Tokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.bbox",description:`<strong>bbox</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1398",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config"
>LayoutLMv3Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ln=new vo({props:{$$slots:{default:[hb]},$$scope:{ctx:P}}}),dn=new yt({props:{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.example",$$slots:{default:[mb]},$$scope:{ctx:P}}}),fa=new He({}),ga=new K({props:{name:"class transformers.TFLayoutLMv3ForQuestionAnswering",anchor:"transformers.TFLayoutLMv3ForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config">LayoutLMv3Config</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1508"}}),pn=new vo({props:{$$slots:{default:[fb]},$$scope:{ctx:P}}}),La=new K({props:{name:"call",anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call",parameters:[{name:"input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"start_positions",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"end_positions",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"bbox",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"pixel_values",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer">LayoutLMv3Tokenizer</a>. See <a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.25.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.bbox",description:`<strong>bbox</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1520",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Config"
>LayoutLMv3Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),un=new vo({props:{$$slots:{default:[gb]},$$scope:{ctx:P}}}),hn=new yt({props:{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.example",$$slots:{default:[_b]},$$scope:{ctx:P}}}),{c(){c=a("meta"),b=p(),g=a("h1"),_=a("a"),y=a("span"),L(d.$$.fragment),h=p(),F=a("span"),we=t("LayoutLMv3"),_e=p(),R=a("h2"),ae=a("a"),se=a("span"),L($.$$.fragment),Te=p(),V=a("span"),xe=t("Overview"),ve=p(),O=a("p"),Me=t("The LayoutLMv3 model was proposed in "),ie=a("a"),G=t("LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking"),$e=t(` by Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei.
LayoutLMv3 simplifies `),pe=a("a"),Y=t("LayoutLMv2"),qe=t(" by using patch embeddings (as in "),ue=a("a"),X=t("ViT"),Fe=t(`) instead of leveraging a CNN backbone, and pre-trains the model on 3 objectives: masked language modeling (MLM), masked image modeling (MIM)
and word-patch alignment (WPA).`),ye=p(),oe=a("p"),C=t("The abstract from the paper is the following:"),A=p(),he=a("p"),H=a("em"),Ee=t("Self-supervised pre-training techniques have achieved remarkable progress in Document AI. Most multimodal pre-trained models use a masked language modeling objective to learn bidirectional representations on the text modality, but they differ in pre-training objectives for the image modality. This discrepancy adds difficulty to multimodal representation learning. In this paper, we propose LayoutLMv3 to pre-train multimodal Transformers for Document AI with unified text and image masking. Additionally, LayoutLMv3 is pre-trained with a word-patch alignment objective to learn cross-modal alignment by predicting whether the corresponding image patch of a text word is masked. The simple unified architecture and training objectives make LayoutLMv3 a general-purpose pre-trained model for both text-centric and image-centric Document AI tasks. Experimental results show that LayoutLMv3 achieves state-of-the-art performance not only in text-centric tasks, including form understanding, receipt understanding, and document visual question answering, but also in image-centric tasks such as document image classification and document layout analysis."),be=p(),Q=a("p"),ze=t("Tips:"),Le=p(),z=a("ul"),re=a("li"),J=t("In terms of data processing, LayoutLMv3 is identical to its predecessor "),me=a("a"),Ce=t("LayoutLMv2"),Z=t(", except that:"),le=a("ul"),fe=a("li"),B=t("images need to be resized and normalized with channels in regular RGB format. LayoutLMv2 on the other hand normalizes the images internally and expects the channels in BGR format."),Pe=p(),j=a("li"),Ae=t(`text is tokenized using byte-pair encoding (BPE), as opposed to WordPiece.
Due to these differences in data preprocessing, one can use `),te=a("a"),I=t("LayoutLMv3Processor"),Ie=t(" which internally combines a "),N=a("a"),Ne=t("LayoutLMv3FeatureExtractor"),je=t(" (for the image modality) and a "),v=a("a"),q=t("LayoutLMv3Tokenizer"),Ye=t("/"),ne=a("a"),Xe=t("LayoutLMv3TokenizerFast"),Je=t(" (for the text modality) to prepare all data for the model."),E=p(),ge=a("li"),Ze=t("Regarding usage of "),We=a("a"),eo=t("LayoutLMv3Processor"),oo=t(", we refer to the "),D=a("a"),ee=t("usage guide"),to=t(" of its predecessor."),no=p(),U=a("li"),so=t("Demo notebooks for LayoutLMv3 can be found "),Oe=a("a"),Se=t("here"),ao=t("."),de=p(),De=a("li"),Od=t("Demo scripts can be found "),En=a("a"),Sd=t("here"),Dd=t("."),ul=p(),kt=a("img"),hl=p(),wt=a("small"),Rd=t("LayoutLMv3 architecture. Taken from the "),Ma=a("a"),Wd=t("original paper"),Bd=t("."),ml=p(),Ke=a("p"),Ud=t("This model was contributed by "),zn=a("a"),Qd=t("nielsr"),Vd=t(". The TensorFlow version of this model was added by "),Cn=a("a"),Hd=t("chriskoo"),Kd=t(", "),Pn=a("a"),Gd=t("tokec"),Yd=t(", and "),An=a("a"),Xd=t("lre"),Jd=t(". The original code can be found "),In=a("a"),Zd=t("here"),ec=t("."),fl=p(),Ho=a("h2"),Tt=a("a"),$r=a("span"),L(Nn.$$.fragment),oc=p(),qr=a("span"),tc=t("Resources"),gl=p(),$a=a("p"),nc=t("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with LayoutLMv3. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),_l=p(),L(xt.$$.fragment),vl=p(),L(jn.$$.fragment),yl=p(),qa=a("ul"),Mt=a("li"),Fa=a("a"),sc=t("LayoutLMv2ForSequenceClassification"),ac=t(" is supported by this "),On=a("a"),rc=t("notebook"),ic=t("."),bl=p(),L(Sn.$$.fragment),Ll=p(),So=a("ul"),Do=a("li"),Ea=a("a"),lc=t("LayoutLMv3ForTokenClassification"),dc=t(" is supported by this "),Dn=a("a"),cc=t("example script"),pc=t(" and "),Rn=a("a"),uc=t("notebook"),hc=t("."),mc=p(),lo=a("li"),fc=t("A "),Wn=a("a"),gc=t("notebook"),_c=t(" for how to perform inference with "),za=a("a"),vc=t("LayoutLMv2ForTokenClassification"),yc=t(" and a "),Bn=a("a"),bc=t("notebook"),Lc=t(" for how to perform inference when no labels are available with "),Ca=a("a"),kc=t("LayoutLMv2ForTokenClassification"),wc=t("."),Tc=p(),Ko=a("li"),xc=t("A "),Un=a("a"),Mc=t("notebook"),$c=t(" for how to finetune "),Pa=a("a"),qc=t("LayoutLMv2ForTokenClassification"),Fc=t(" with the \u{1F917} Trainer."),kl=p(),L(Qn.$$.fragment),wl=p(),Aa=a("ul"),$t=a("li"),Ia=a("a"),Ec=t("LayoutLMv2ForQuestionAnswering"),zc=t(" is supported by this "),Vn=a("a"),Cc=t("notebook"),Pc=t("."),Tl=p(),Go=a("h2"),qt=a("a"),Fr=a("span"),L(Hn.$$.fragment),Ac=p(),Er=a("span"),Ic=t("LayoutLMv3Config"),xl=p(),co=a("div"),L(Kn.$$.fragment),Nc=p(),Yo=a("p"),jc=t("This is the configuration class to store the configuration of a "),Na=a("a"),Oc=t("LayoutLMv3Model"),Sc=t(`. It is used to instantiate an
LayoutLMv3 model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the LayoutLMv3
`),Gn=a("a"),Dc=t("microsoft/layoutlmv3-base"),Rc=t(" architecture."),Wc=p(),Xo=a("p"),Bc=t("Configuration objects inherit from "),ja=a("a"),Uc=t("PretrainedConfig"),Qc=t(` and can be used to control the model outputs. Read the
documentation from `),Oa=a("a"),Vc=t("PretrainedConfig"),Hc=t(" for more information."),Kc=p(),L(Ft.$$.fragment),Ml=p(),Jo=a("h2"),Et=a("a"),zr=a("span"),L(Yn.$$.fragment),Gc=p(),Cr=a("span"),Yc=t("LayoutLMv3FeatureExtractor"),$l=p(),Co=a("div"),L(Xn.$$.fragment),Xc=p(),Pr=a("p"),Jc=t("Constructs a LayoutLMv3 image processor."),Zc=p(),zt=a("div"),L(Jn.$$.fragment),ep=p(),Ar=a("p"),op=t("Preprocess an image or a batch of images."),ql=p(),Zo=a("h2"),Ct=a("a"),Ir=a("span"),L(Zn.$$.fragment),tp=p(),Nr=a("span"),np=t("LayoutLMv3ImageProcessor"),Fl=p(),Po=a("div"),L(es.$$.fragment),sp=p(),jr=a("p"),ap=t("Constructs a LayoutLMv3 image processor."),rp=p(),Pt=a("div"),L(os.$$.fragment),ip=p(),Or=a("p"),lp=t("Preprocess an image or batch of images."),El=p(),et=a("h2"),At=a("a"),Sr=a("span"),L(ts.$$.fragment),dp=p(),Dr=a("span"),cp=t("LayoutLMv3Tokenizer"),zl=p(),Be=a("div"),L(ns.$$.fragment),pp=p(),Re=a("p"),up=t("Construct a LayoutLMv3 tokenizer. Based on "),Rr=a("code"),hp=t("RoBERTatokenizer"),mp=t(` (Byte Pair Encoding or BPE).
`),Sa=a("a"),fp=t("LayoutLMv3Tokenizer"),gp=t(` can be used to turn words, word-level bounding boxes and optional word labels to
token-level `),Wr=a("code"),_p=t("input_ids"),vp=t(", "),Br=a("code"),yp=t("attention_mask"),bp=t(", "),Ur=a("code"),Lp=t("token_type_ids"),kp=t(", "),Qr=a("code"),wp=t("bbox"),Tp=t(", and optional "),Vr=a("code"),xp=t("labels"),Mp=t(` (for token
classification).`),$p=p(),ss=a("p"),qp=t("This tokenizer inherits from "),Da=a("a"),Fp=t("PreTrainedTokenizer"),Ep=t(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),zp=p(),Ra=a("p"),Wa=a("a"),Cp=t("LayoutLMv3Tokenizer"),Pp=t(` runs end-to-end tokenization: punctuation splitting and wordpiece. It also turns the
word-level bounding boxes into token-level bounding boxes.`),Ap=p(),It=a("div"),L(as.$$.fragment),Ip=p(),Hr=a("p"),Np=t(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences with word-level normalized bounding boxes and optional labels.`),jp=p(),Ba=a("div"),L(rs.$$.fragment),Cl=p(),ot=a("h2"),Nt=a("a"),Kr=a("span"),L(is.$$.fragment),Op=p(),Gr=a("span"),Sp=t("LayoutLMv3TokenizerFast"),Pl=p(),po=a("div"),L(ls.$$.fragment),Dp=p(),ds=a("p"),Rp=t("Construct a \u201Cfast\u201D LayoutLMv3 tokenizer (backed by HuggingFace\u2019s "),Yr=a("em"),Wp=t("tokenizers"),Bp=t(" library). Based on BPE."),Up=p(),cs=a("p"),Qp=t("This tokenizer inherits from "),Ua=a("a"),Vp=t("PreTrainedTokenizerFast"),Hp=t(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Kp=p(),jt=a("div"),L(ps.$$.fragment),Gp=p(),Xr=a("p"),Yp=t(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences with word-level normalized bounding boxes and optional labels.`),Al=p(),tt=a("h2"),Ot=a("a"),Jr=a("span"),L(us.$$.fragment),Xp=p(),Zr=a("span"),Jp=t("LayoutLMv3Processor"),Il=p(),ro=a("div"),L(hs.$$.fragment),Zp=p(),ei=a("p"),eu=t(`Constructs a LayoutLMv3 processor which combines a LayoutLMv3 feature extractor and a LayoutLMv3 tokenizer into a
single processor.`),ou=p(),Qa=a("p"),Va=a("a"),tu=t("LayoutLMv3Processor"),nu=t(" offers all the functionalities you need to prepare data for the model."),su=p(),ce=a("p"),au=t("It first uses "),Ha=a("a"),ru=t("LayoutLMv3FeatureExtractor"),iu=t(` to resize and normalize document images, and optionally applies OCR to
get words and normalized bounding boxes. These are then provided to `),Ka=a("a"),lu=t("LayoutLMv3Tokenizer"),du=t(` or
`),Ga=a("a"),cu=t("LayoutLMv3TokenizerFast"),pu=t(", which turns the words and bounding boxes into token-level "),oi=a("code"),uu=t("input_ids"),hu=t(`,
`),ti=a("code"),mu=t("attention_mask"),fu=t(", "),ni=a("code"),gu=t("token_type_ids"),_u=t(", "),si=a("code"),vu=t("bbox"),yu=t(". Optionally, one can provide integer "),ai=a("code"),bu=t("word_labels"),Lu=t(`, which are turned
into token-level `),ri=a("code"),ku=t("labels"),wu=t(" for token classification tasks (such as FUNSD, CORD)."),Tu=p(),Ro=a("div"),L(ms.$$.fragment),xu=p(),S=a("p"),Mu=t("This method first forwards the "),ii=a("code"),$u=t("images"),qu=t(" argument to "),fs=a("a"),li=a("strong"),Fu=t("call"),Eu=t("()"),zu=t(`. In case
`),Ya=a("a"),Cu=t("LayoutLMv3FeatureExtractor"),Pu=t(" was initialized with "),di=a("code"),Au=t("apply_ocr"),Iu=t(" set to "),ci=a("code"),Nu=t("True"),ju=t(`, it passes the obtained words and
bounding boxes along with the additional arguments to `),gs=a("a"),pi=a("strong"),Ou=t("call"),Su=t("()"),Du=t(` and returns the output,
together with resized and normalized `),ui=a("code"),Ru=t("pixel_values"),Wu=t(". In case "),Xa=a("a"),Bu=t("LayoutLMv3FeatureExtractor"),Uu=t(` was initialized
with `),hi=a("code"),Qu=t("apply_ocr"),Vu=t(" set to "),mi=a("code"),Hu=t("False"),Ku=t(", it passes the words ("),fi=a("code"),Gu=t("text"),Yu=t("/`"),gi=a("code"),Xu=t("text_pair"),Ju=t(") and "),_i=a("code"),Zu=t("boxes"),eh=t(` specified by the user
along with the additional arguments to `),_s=a("a"),vi=a("strong"),oh=t("call"),th=t("()"),nh=t(` and returns the output, together with
resized and normalized `),yi=a("code"),sh=t("pixel_values"),ah=t("."),rh=p(),bi=a("p"),ih=t("Please refer to the docstring of the above two methods for more information."),Nl=p(),nt=a("h2"),St=a("a"),Li=a("span"),L(vs.$$.fragment),lh=p(),ki=a("span"),dh=t("LayoutLMv3Model"),jl=p(),Ao=a("div"),L(ys.$$.fragment),ch=p(),bs=a("p"),ph=t(`The bare LayoutLMv3 Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ls=a("a"),uh=t("torch.nn.Module"),hh=t(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),mh=p(),yo=a("div"),L(ks.$$.fragment),fh=p(),st=a("p"),gh=t("The "),Ja=a("a"),_h=t("LayoutLMv3Model"),vh=t(" forward method, overrides the "),wi=a("code"),yh=t("__call__"),bh=t(" special method."),Lh=p(),L(Dt.$$.fragment),kh=p(),L(Rt.$$.fragment),Ol=p(),at=a("h2"),Wt=a("a"),Ti=a("span"),L(ws.$$.fragment),wh=p(),xi=a("span"),Th=t("LayoutLMv3ForSequenceClassification"),Sl=p(),uo=a("div"),L(Ts.$$.fragment),xh=p(),xs=a("p"),Mh=t(`LayoutLMv3 Model with a sequence classification head on top (a linear layer on top of the final hidden state of the
[CLS] token) e.g. for document image classification tasks such as the
`),Ms=a("a"),$h=t("RVL-CDIP"),qh=t(" dataset."),Fh=p(),$s=a("p"),Eh=t("This model is a PyTorch "),qs=a("a"),zh=t("torch.nn.Module"),Ch=t(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ph=p(),bo=a("div"),L(Fs.$$.fragment),Ah=p(),rt=a("p"),Ih=t("The "),Za=a("a"),Nh=t("LayoutLMv3ForSequenceClassification"),jh=t(" forward method, overrides the "),Mi=a("code"),Oh=t("__call__"),Sh=t(" special method."),Dh=p(),L(Bt.$$.fragment),Rh=p(),L(Ut.$$.fragment),Dl=p(),it=a("h2"),Qt=a("a"),$i=a("span"),L(Es.$$.fragment),Wh=p(),qi=a("span"),Bh=t("LayoutLMv3ForTokenClassification"),Rl=p(),ho=a("div"),L(zs.$$.fragment),Uh=p(),mo=a("p"),Qh=t(`LayoutLMv3 Model with a token classification head on top (a linear layer on top of the final hidden states) e.g.
for sequence labeling (information extraction) tasks such as `),Cs=a("a"),Vh=t("FUNSD"),Hh=t(`,
`),Ps=a("a"),Kh=t("SROIE"),Gh=t(", "),As=a("a"),Yh=t("CORD"),Xh=t(` and
`),Is=a("a"),Jh=t("Kleister-NDA"),Zh=t("."),em=p(),Ns=a("p"),om=t("This model is a PyTorch "),js=a("a"),tm=t("torch.nn.Module"),nm=t(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),sm=p(),Lo=a("div"),L(Os.$$.fragment),am=p(),lt=a("p"),rm=t("The "),er=a("a"),im=t("LayoutLMv3ForTokenClassification"),lm=t(" forward method, overrides the "),Fi=a("code"),dm=t("__call__"),cm=t(" special method."),pm=p(),L(Vt.$$.fragment),um=p(),L(Ht.$$.fragment),Wl=p(),dt=a("h2"),Kt=a("a"),Ei=a("span"),L(Ss.$$.fragment),hm=p(),zi=a("span"),mm=t("LayoutLMv3ForQuestionAnswering"),Bl=p(),fo=a("div"),L(Ds.$$.fragment),fm=p(),Io=a("p"),gm=t(`LayoutLMv3 Model with a span classification head on top for extractive question-answering tasks such as
`),Rs=a("a"),_m=t("DocVQA"),vm=t(` (a linear layer on top of the text part of the hidden-states output to
compute `),Ci=a("code"),ym=t("span start logits"),bm=t(" and "),Pi=a("code"),Lm=t("span end logits"),km=t(")."),wm=p(),Ws=a("p"),Tm=t("This model is a PyTorch "),Bs=a("a"),xm=t("torch.nn.Module"),Mm=t(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),$m=p(),ko=a("div"),L(Us.$$.fragment),qm=p(),ct=a("p"),Fm=t("The "),or=a("a"),Em=t("LayoutLMv3ForQuestionAnswering"),zm=t(" forward method, overrides the "),Ai=a("code"),Cm=t("__call__"),Pm=t(" special method."),Am=p(),L(Gt.$$.fragment),Im=p(),L(Yt.$$.fragment),Ul=p(),pt=a("h2"),Xt=a("a"),Ii=a("span"),L(Qs.$$.fragment),Nm=p(),Ni=a("span"),jm=t("TFLayoutLMv3Model"),Ql=p(),io=a("div"),L(Vs.$$.fragment),Om=p(),Hs=a("p"),Sm=t(`The bare LayoutLMv3 Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),tr=a("a"),Dm=t("TFPreTrainedModel"),Rm=t(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Wm=p(),Ks=a("p"),Bm=t("This model is also a "),Gs=a("a"),Um=t("tf.keras.Model"),Qm=t(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Vm=p(),L(Jt.$$.fragment),Hm=p(),wo=a("div"),L(Ys.$$.fragment),Km=p(),ut=a("p"),Gm=t("The "),nr=a("a"),Ym=t("TFLayoutLMv3Model"),Xm=t(" forward method, overrides the "),ji=a("code"),Jm=t("__call__"),Zm=t(" special method."),ef=p(),L(Zt.$$.fragment),of=p(),L(en.$$.fragment),Vl=p(),ht=a("h2"),on=a("a"),Oi=a("span"),L(Xs.$$.fragment),tf=p(),Si=a("span"),nf=t("TFLayoutLMv3ForSequenceClassification"),Hl=p(),Ue=a("div"),L(Js.$$.fragment),sf=p(),Zs=a("p"),af=t(`LayoutLMv3 Model with a sequence classification head on top (a linear layer on top of the final hidden state of the
[CLS] token) e.g. for document image classification tasks such as the
`),ea=a("a"),rf=t("RVL-CDIP"),lf=t(" dataset."),df=p(),oa=a("p"),cf=t("This model inherits from "),sr=a("a"),pf=t("TFPreTrainedModel"),uf=t(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),hf=p(),ta=a("p"),mf=t("This model is also a "),na=a("a"),ff=t("tf.keras.Model"),gf=t(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),_f=p(),L(tn.$$.fragment),vf=p(),To=a("div"),L(sa.$$.fragment),yf=p(),mt=a("p"),bf=t("The "),ar=a("a"),Lf=t("TFLayoutLMv3ForSequenceClassification"),kf=t(" forward method, overrides the "),Di=a("code"),wf=t("__call__"),Tf=t(" special method."),xf=p(),L(nn.$$.fragment),Mf=p(),L(sn.$$.fragment),Kl=p(),ft=a("h2"),an=a("a"),Ri=a("span"),L(aa.$$.fragment),$f=p(),Wi=a("span"),qf=t("TFLayoutLMv3ForTokenClassification"),Gl=p(),Qe=a("div"),L(ra.$$.fragment),Ff=p(),go=a("p"),Ef=t(`LayoutLMv3 Model with a token classification head on top (a linear layer on top of the final hidden states) e.g.
for sequence labeling (information extraction) tasks such as `),ia=a("a"),zf=t("FUNSD"),Cf=t(`,
`),la=a("a"),Pf=t("SROIE"),Af=t(", "),da=a("a"),If=t("CORD"),Nf=t(` and
`),ca=a("a"),jf=t("Kleister-NDA"),Of=t("."),Sf=p(),pa=a("p"),Df=t("This model inherits from "),rr=a("a"),Rf=t("TFPreTrainedModel"),Wf=t(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Bf=p(),ua=a("p"),Uf=t("This model is also a "),ha=a("a"),Qf=t("tf.keras.Model"),Vf=t(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Hf=p(),L(rn.$$.fragment),Kf=p(),xo=a("div"),L(ma.$$.fragment),Gf=p(),gt=a("p"),Yf=t("The "),ir=a("a"),Xf=t("TFLayoutLMv3ForTokenClassification"),Jf=t(" forward method, overrides the "),Bi=a("code"),Zf=t("__call__"),eg=t(" special method."),og=p(),L(ln.$$.fragment),tg=p(),L(dn.$$.fragment),Yl=p(),_t=a("h2"),cn=a("a"),Ui=a("span"),L(fa.$$.fragment),ng=p(),Qi=a("span"),sg=t("TFLayoutLMv3ForQuestionAnswering"),Xl=p(),Ve=a("div"),L(ga.$$.fragment),ag=p(),No=a("p"),rg=t(`LayoutLMv3 Model with a span classification head on top for extractive question-answering tasks such as
`),_a=a("a"),ig=t("DocVQA"),lg=t(` (a linear layer on top of the text part of the hidden-states output to
compute `),Vi=a("code"),dg=t("span start logits"),cg=t(" and "),Hi=a("code"),pg=t("span end logits"),ug=t(")."),hg=p(),va=a("p"),mg=t("This model inherits from "),lr=a("a"),fg=t("TFPreTrainedModel"),gg=t(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),_g=p(),ya=a("p"),vg=t("This model is also a "),ba=a("a"),yg=t("tf.keras.Model"),bg=t(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Lg=p(),L(pn.$$.fragment),kg=p(),Mo=a("div"),L(La.$$.fragment),wg=p(),vt=a("p"),Tg=t("The "),dr=a("a"),xg=t("TFLayoutLMv3ForQuestionAnswering"),Mg=t(" forward method, overrides the "),Ki=a("code"),$g=t("__call__"),qg=t(" special method."),Fg=p(),L(un.$$.fragment),Eg=p(),L(hn.$$.fragment),this.h()},l(s){const f=Hy('[data-svelte="svelte-1phssyn"]',document.head);c=r(f,"META",{name:!0,content:!0}),f.forEach(o),b=u(s),g=r(s,"H1",{class:!0});var ka=i(g);_=r(ka,"A",{id:!0,class:!0,href:!0});var Gi=i(_);y=r(Gi,"SPAN",{});var Yi=i(y);k(d.$$.fragment,Yi),Yi.forEach(o),Gi.forEach(o),h=u(ka),F=r(ka,"SPAN",{});var Xi=i(F);we=n(Xi,"LayoutLMv3"),Xi.forEach(o),ka.forEach(o),_e=u(s),R=r(s,"H2",{class:!0});var wa=i(R);ae=r(wa,"A",{id:!0,class:!0,href:!0});var Ji=i(ae);se=r(Ji,"SPAN",{});var Zi=i(se);k($.$$.fragment,Zi),Zi.forEach(o),Ji.forEach(o),Te=u(wa),V=r(wa,"SPAN",{});var el=i(V);xe=n(el,"Overview"),el.forEach(o),wa.forEach(o),ve=u(s),O=r(s,"P",{});var jo=i(O);Me=n(jo,"The LayoutLMv3 model was proposed in "),ie=r(jo,"A",{href:!0,rel:!0});var ol=i(ie);G=n(ol,"LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking"),ol.forEach(o),$e=n(jo,` by Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei.
LayoutLMv3 simplifies `),pe=r(jo,"A",{href:!0});var tl=i(pe);Y=n(tl,"LayoutLMv2"),tl.forEach(o),qe=n(jo," by using patch embeddings (as in "),ue=r(jo,"A",{href:!0});var nl=i(ue);X=n(nl,"ViT"),nl.forEach(o),Fe=n(jo,`) instead of leveraging a CNN backbone, and pre-trains the model on 3 objectives: masked language modeling (MLM), masked image modeling (MIM)
and word-patch alignment (WPA).`),jo.forEach(o),ye=u(s),oe=r(s,"P",{});var sl=i(oe);C=n(sl,"The abstract from the paper is the following:"),sl.forEach(o),A=u(s),he=r(s,"P",{});var al=i(he);H=r(al,"EM",{});var rl=i(H);Ee=n(rl,"Self-supervised pre-training techniques have achieved remarkable progress in Document AI. Most multimodal pre-trained models use a masked language modeling objective to learn bidirectional representations on the text modality, but they differ in pre-training objectives for the image modality. This discrepancy adds difficulty to multimodal representation learning. In this paper, we propose LayoutLMv3 to pre-train multimodal Transformers for Document AI with unified text and image masking. Additionally, LayoutLMv3 is pre-trained with a word-patch alignment objective to learn cross-modal alignment by predicting whether the corresponding image patch of a text word is masked. The simple unified architecture and training objectives make LayoutLMv3 a general-purpose pre-trained model for both text-centric and image-centric Document AI tasks. Experimental results show that LayoutLMv3 achieves state-of-the-art performance not only in text-centric tasks, including form understanding, receipt understanding, and document visual question answering, but also in image-centric tasks such as document image classification and document layout analysis."),rl.forEach(o),al.forEach(o),be=u(s),Q=r(s,"P",{});var il=i(Q);ze=n(il,"Tips:"),il.forEach(o),Le=u(s),z=r(s,"UL",{});var Oo=i(z);re=r(Oo,"LI",{});var mn=i(re);J=n(mn,"In terms of data processing, LayoutLMv3 is identical to its predecessor "),me=r(mn,"A",{href:!0});var ll=i(me);Ce=n(ll,"LayoutLMv2"),ll.forEach(o),Z=n(mn,", except that:"),le=r(mn,"UL",{});var Ta=i(le);fe=r(Ta,"LI",{});var dl=i(fe);B=n(dl,"images need to be resized and normalized with channels in regular RGB format. LayoutLMv2 on the other hand normalizes the images internally and expects the channels in BGR format."),dl.forEach(o),Pe=u(Ta),j=r(Ta,"LI",{});var _o=i(j);Ae=n(_o,`text is tokenized using byte-pair encoding (BPE), as opposed to WordPiece.
Due to these differences in data preprocessing, one can use `),te=r(_o,"A",{href:!0});var Og=i(te);I=n(Og,"LayoutLMv3Processor"),Og.forEach(o),Ie=n(_o," which internally combines a "),N=r(_o,"A",{href:!0});var Sg=i(N);Ne=n(Sg,"LayoutLMv3FeatureExtractor"),Sg.forEach(o),je=n(_o," (for the image modality) and a "),v=r(_o,"A",{href:!0});var Dg=i(v);q=n(Dg,"LayoutLMv3Tokenizer"),Dg.forEach(o),Ye=n(_o,"/"),ne=r(_o,"A",{href:!0});var Rg=i(ne);Xe=n(Rg,"LayoutLMv3TokenizerFast"),Rg.forEach(o),Je=n(_o," (for the text modality) to prepare all data for the model."),_o.forEach(o),Ta.forEach(o),mn.forEach(o),E=u(Oo),ge=r(Oo,"LI",{});var cr=i(ge);Ze=n(cr,"Regarding usage of "),We=r(cr,"A",{href:!0});var Wg=i(We);eo=n(Wg,"LayoutLMv3Processor"),Wg.forEach(o),oo=n(cr,", we refer to the "),D=r(cr,"A",{href:!0});var Bg=i(D);ee=n(Bg,"usage guide"),Bg.forEach(o),to=n(cr," of its predecessor."),cr.forEach(o),no=u(Oo),U=r(Oo,"LI",{});var Zl=i(U);so=n(Zl,"Demo notebooks for LayoutLMv3 can be found "),Oe=r(Zl,"A",{href:!0,rel:!0});var Ug=i(Oe);Se=n(Ug,"here"),Ug.forEach(o),ao=n(Zl,"."),Zl.forEach(o),de=u(Oo),De=r(Oo,"LI",{});var ed=i(De);Od=n(ed,"Demo scripts can be found "),En=r(ed,"A",{href:!0,rel:!0});var Qg=i(En);Sd=n(Qg,"here"),Qg.forEach(o),Dd=n(ed,"."),ed.forEach(o),Oo.forEach(o),ul=u(s),kt=r(s,"IMG",{src:!0,alt:!0,width:!0}),hl=u(s),wt=r(s,"SMALL",{});var od=i(wt);Rd=n(od,"LayoutLMv3 architecture. Taken from the "),Ma=r(od,"A",{href:!0});var Vg=i(Ma);Wd=n(Vg,"original paper"),Vg.forEach(o),Bd=n(od,"."),od.forEach(o),ml=u(s),Ke=r(s,"P",{});var $o=i(Ke);Ud=n($o,"This model was contributed by "),zn=r($o,"A",{href:!0,rel:!0});var Hg=i(zn);Qd=n(Hg,"nielsr"),Hg.forEach(o),Vd=n($o,". The TensorFlow version of this model was added by "),Cn=r($o,"A",{href:!0,rel:!0});var Kg=i(Cn);Hd=n(Kg,"chriskoo"),Kg.forEach(o),Kd=n($o,", "),Pn=r($o,"A",{href:!0,rel:!0});var Gg=i(Pn);Gd=n(Gg,"tokec"),Gg.forEach(o),Yd=n($o,", and "),An=r($o,"A",{href:!0,rel:!0});var Yg=i(An);Xd=n(Yg,"lre"),Yg.forEach(o),Jd=n($o,". The original code can be found "),In=r($o,"A",{href:!0,rel:!0});var Xg=i(In);Zd=n(Xg,"here"),Xg.forEach(o),ec=n($o,"."),$o.forEach(o),fl=u(s),Ho=r(s,"H2",{class:!0});var td=i(Ho);Tt=r(td,"A",{id:!0,class:!0,href:!0});var Jg=i(Tt);$r=r(Jg,"SPAN",{});var Zg=i($r);k(Nn.$$.fragment,Zg),Zg.forEach(o),Jg.forEach(o),oc=u(td),qr=r(td,"SPAN",{});var e_=i(qr);tc=n(e_,"Resources"),e_.forEach(o),td.forEach(o),gl=u(s),$a=r(s,"P",{});var o_=i($a);nc=n(o_,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with LayoutLMv3. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),o_.forEach(o),_l=u(s),k(xt.$$.fragment,s),vl=u(s),k(jn.$$.fragment,s),yl=u(s),qa=r(s,"UL",{});var t_=i(qa);Mt=r(t_,"LI",{});var cl=i(Mt);Fa=r(cl,"A",{href:!0});var n_=i(Fa);sc=n(n_,"LayoutLMv2ForSequenceClassification"),n_.forEach(o),ac=n(cl," is supported by this "),On=r(cl,"A",{href:!0,rel:!0});var s_=i(On);rc=n(s_,"notebook"),s_.forEach(o),ic=n(cl,"."),cl.forEach(o),t_.forEach(o),bl=u(s),k(Sn.$$.fragment,s),Ll=u(s),So=r(s,"UL",{});var pr=i(So);Do=r(pr,"LI",{});var xa=i(Do);Ea=r(xa,"A",{href:!0});var a_=i(Ea);lc=n(a_,"LayoutLMv3ForTokenClassification"),a_.forEach(o),dc=n(xa," is supported by this "),Dn=r(xa,"A",{href:!0,rel:!0});var r_=i(Dn);cc=n(r_,"example script"),r_.forEach(o),pc=n(xa," and "),Rn=r(xa,"A",{href:!0,rel:!0});var i_=i(Rn);uc=n(i_,"notebook"),i_.forEach(o),hc=n(xa,"."),xa.forEach(o),mc=u(pr),lo=r(pr,"LI",{});var Wo=i(lo);fc=n(Wo,"A "),Wn=r(Wo,"A",{href:!0,rel:!0});var l_=i(Wn);gc=n(l_,"notebook"),l_.forEach(o),_c=n(Wo," for how to perform inference with "),za=r(Wo,"A",{href:!0});var d_=i(za);vc=n(d_,"LayoutLMv2ForTokenClassification"),d_.forEach(o),yc=n(Wo," and a "),Bn=r(Wo,"A",{href:!0,rel:!0});var c_=i(Bn);bc=n(c_,"notebook"),c_.forEach(o),Lc=n(Wo," for how to perform inference when no labels are available with "),Ca=r(Wo,"A",{href:!0});var p_=i(Ca);kc=n(p_,"LayoutLMv2ForTokenClassification"),p_.forEach(o),wc=n(Wo,"."),Wo.forEach(o),Tc=u(pr),Ko=r(pr,"LI",{});var ur=i(Ko);xc=n(ur,"A "),Un=r(ur,"A",{href:!0,rel:!0});var u_=i(Un);Mc=n(u_,"notebook"),u_.forEach(o),$c=n(ur," for how to finetune "),Pa=r(ur,"A",{href:!0});var h_=i(Pa);qc=n(h_,"LayoutLMv2ForTokenClassification"),h_.forEach(o),Fc=n(ur," with the \u{1F917} Trainer."),ur.forEach(o),pr.forEach(o),kl=u(s),k(Qn.$$.fragment,s),wl=u(s),Aa=r(s,"UL",{});var m_=i(Aa);$t=r(m_,"LI",{});var pl=i($t);Ia=r(pl,"A",{href:!0});var f_=i(Ia);Ec=n(f_,"LayoutLMv2ForQuestionAnswering"),f_.forEach(o),zc=n(pl," is supported by this "),Vn=r(pl,"A",{href:!0,rel:!0});var g_=i(Vn);Cc=n(g_,"notebook"),g_.forEach(o),Pc=n(pl,"."),pl.forEach(o),m_.forEach(o),Tl=u(s),Go=r(s,"H2",{class:!0});var nd=i(Go);qt=r(nd,"A",{id:!0,class:!0,href:!0});var __=i(qt);Fr=r(__,"SPAN",{});var v_=i(Fr);k(Hn.$$.fragment,v_),v_.forEach(o),__.forEach(o),Ac=u(nd),Er=r(nd,"SPAN",{});var y_=i(Er);Ic=n(y_,"LayoutLMv3Config"),y_.forEach(o),nd.forEach(o),xl=u(s),co=r(s,"DIV",{class:!0});var fn=i(co);k(Kn.$$.fragment,fn),Nc=u(fn),Yo=r(fn,"P",{});var hr=i(Yo);jc=n(hr,"This is the configuration class to store the configuration of a "),Na=r(hr,"A",{href:!0});var b_=i(Na);Oc=n(b_,"LayoutLMv3Model"),b_.forEach(o),Sc=n(hr,`. It is used to instantiate an
LayoutLMv3 model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the LayoutLMv3
`),Gn=r(hr,"A",{href:!0,rel:!0});var L_=i(Gn);Dc=n(L_,"microsoft/layoutlmv3-base"),L_.forEach(o),Rc=n(hr," architecture."),hr.forEach(o),Wc=u(fn),Xo=r(fn,"P",{});var mr=i(Xo);Bc=n(mr,"Configuration objects inherit from "),ja=r(mr,"A",{href:!0});var k_=i(ja);Uc=n(k_,"PretrainedConfig"),k_.forEach(o),Qc=n(mr,` and can be used to control the model outputs. Read the
documentation from `),Oa=r(mr,"A",{href:!0});var w_=i(Oa);Vc=n(w_,"PretrainedConfig"),w_.forEach(o),Hc=n(mr," for more information."),mr.forEach(o),Kc=u(fn),k(Ft.$$.fragment,fn),fn.forEach(o),Ml=u(s),Jo=r(s,"H2",{class:!0});var sd=i(Jo);Et=r(sd,"A",{id:!0,class:!0,href:!0});var T_=i(Et);zr=r(T_,"SPAN",{});var x_=i(zr);k(Yn.$$.fragment,x_),x_.forEach(o),T_.forEach(o),Gc=u(sd),Cr=r(sd,"SPAN",{});var M_=i(Cr);Yc=n(M_,"LayoutLMv3FeatureExtractor"),M_.forEach(o),sd.forEach(o),$l=u(s),Co=r(s,"DIV",{class:!0});var fr=i(Co);k(Xn.$$.fragment,fr),Xc=u(fr),Pr=r(fr,"P",{});var $_=i(Pr);Jc=n($_,"Constructs a LayoutLMv3 image processor."),$_.forEach(o),Zc=u(fr),zt=r(fr,"DIV",{class:!0});var ad=i(zt);k(Jn.$$.fragment,ad),ep=u(ad),Ar=r(ad,"P",{});var q_=i(Ar);op=n(q_,"Preprocess an image or a batch of images."),q_.forEach(o),ad.forEach(o),fr.forEach(o),ql=u(s),Zo=r(s,"H2",{class:!0});var rd=i(Zo);Ct=r(rd,"A",{id:!0,class:!0,href:!0});var F_=i(Ct);Ir=r(F_,"SPAN",{});var E_=i(Ir);k(Zn.$$.fragment,E_),E_.forEach(o),F_.forEach(o),tp=u(rd),Nr=r(rd,"SPAN",{});var z_=i(Nr);np=n(z_,"LayoutLMv3ImageProcessor"),z_.forEach(o),rd.forEach(o),Fl=u(s),Po=r(s,"DIV",{class:!0});var gr=i(Po);k(es.$$.fragment,gr),sp=u(gr),jr=r(gr,"P",{});var C_=i(jr);ap=n(C_,"Constructs a LayoutLMv3 image processor."),C_.forEach(o),rp=u(gr),Pt=r(gr,"DIV",{class:!0});var id=i(Pt);k(os.$$.fragment,id),ip=u(id),Or=r(id,"P",{});var P_=i(Or);lp=n(P_,"Preprocess an image or batch of images."),P_.forEach(o),id.forEach(o),gr.forEach(o),El=u(s),et=r(s,"H2",{class:!0});var ld=i(et);At=r(ld,"A",{id:!0,class:!0,href:!0});var A_=i(At);Sr=r(A_,"SPAN",{});var I_=i(Sr);k(ts.$$.fragment,I_),I_.forEach(o),A_.forEach(o),dp=u(ld),Dr=r(ld,"SPAN",{});var N_=i(Dr);cp=n(N_,"LayoutLMv3Tokenizer"),N_.forEach(o),ld.forEach(o),zl=u(s),Be=r(s,"DIV",{class:!0});var qo=i(Be);k(ns.$$.fragment,qo),pp=u(qo),Re=r(qo,"P",{});var Ge=i(Re);up=n(Ge,"Construct a LayoutLMv3 tokenizer. Based on "),Rr=r(Ge,"CODE",{});var j_=i(Rr);hp=n(j_,"RoBERTatokenizer"),j_.forEach(o),mp=n(Ge,` (Byte Pair Encoding or BPE).
`),Sa=r(Ge,"A",{href:!0});var O_=i(Sa);fp=n(O_,"LayoutLMv3Tokenizer"),O_.forEach(o),gp=n(Ge,` can be used to turn words, word-level bounding boxes and optional word labels to
token-level `),Wr=r(Ge,"CODE",{});var S_=i(Wr);_p=n(S_,"input_ids"),S_.forEach(o),vp=n(Ge,", "),Br=r(Ge,"CODE",{});var D_=i(Br);yp=n(D_,"attention_mask"),D_.forEach(o),bp=n(Ge,", "),Ur=r(Ge,"CODE",{});var R_=i(Ur);Lp=n(R_,"token_type_ids"),R_.forEach(o),kp=n(Ge,", "),Qr=r(Ge,"CODE",{});var W_=i(Qr);wp=n(W_,"bbox"),W_.forEach(o),Tp=n(Ge,", and optional "),Vr=r(Ge,"CODE",{});var B_=i(Vr);xp=n(B_,"labels"),B_.forEach(o),Mp=n(Ge,` (for token
classification).`),Ge.forEach(o),$p=u(qo),ss=r(qo,"P",{});var dd=i(ss);qp=n(dd,"This tokenizer inherits from "),Da=r(dd,"A",{href:!0});var U_=i(Da);Fp=n(U_,"PreTrainedTokenizer"),U_.forEach(o),Ep=n(dd,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),dd.forEach(o),zp=u(qo),Ra=r(qo,"P",{});var zg=i(Ra);Wa=r(zg,"A",{href:!0});var Q_=i(Wa);Cp=n(Q_,"LayoutLMv3Tokenizer"),Q_.forEach(o),Pp=n(zg,` runs end-to-end tokenization: punctuation splitting and wordpiece. It also turns the
word-level bounding boxes into token-level bounding boxes.`),zg.forEach(o),Ap=u(qo),It=r(qo,"DIV",{class:!0});var cd=i(It);k(as.$$.fragment,cd),Ip=u(cd),Hr=r(cd,"P",{});var V_=i(Hr);Np=n(V_,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences with word-level normalized bounding boxes and optional labels.`),V_.forEach(o),cd.forEach(o),jp=u(qo),Ba=r(qo,"DIV",{class:!0});var H_=i(Ba);k(rs.$$.fragment,H_),H_.forEach(o),qo.forEach(o),Cl=u(s),ot=r(s,"H2",{class:!0});var pd=i(ot);Nt=r(pd,"A",{id:!0,class:!0,href:!0});var K_=i(Nt);Kr=r(K_,"SPAN",{});var G_=i(Kr);k(is.$$.fragment,G_),G_.forEach(o),K_.forEach(o),Op=u(pd),Gr=r(pd,"SPAN",{});var Y_=i(Gr);Sp=n(Y_,"LayoutLMv3TokenizerFast"),Y_.forEach(o),pd.forEach(o),Pl=u(s),po=r(s,"DIV",{class:!0});var gn=i(po);k(ls.$$.fragment,gn),Dp=u(gn),ds=r(gn,"P",{});var ud=i(ds);Rp=n(ud,"Construct a \u201Cfast\u201D LayoutLMv3 tokenizer (backed by HuggingFace\u2019s "),Yr=r(ud,"EM",{});var X_=i(Yr);Wp=n(X_,"tokenizers"),X_.forEach(o),Bp=n(ud," library). Based on BPE."),ud.forEach(o),Up=u(gn),cs=r(gn,"P",{});var hd=i(cs);Qp=n(hd,"This tokenizer inherits from "),Ua=r(hd,"A",{href:!0});var J_=i(Ua);Vp=n(J_,"PreTrainedTokenizerFast"),J_.forEach(o),Hp=n(hd,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),hd.forEach(o),Kp=u(gn),jt=r(gn,"DIV",{class:!0});var md=i(jt);k(ps.$$.fragment,md),Gp=u(md),Xr=r(md,"P",{});var Z_=i(Xr);Yp=n(Z_,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences with word-level normalized bounding boxes and optional labels.`),Z_.forEach(o),md.forEach(o),gn.forEach(o),Al=u(s),tt=r(s,"H2",{class:!0});var fd=i(tt);Ot=r(fd,"A",{id:!0,class:!0,href:!0});var ev=i(Ot);Jr=r(ev,"SPAN",{});var ov=i(Jr);k(us.$$.fragment,ov),ov.forEach(o),ev.forEach(o),Xp=u(fd),Zr=r(fd,"SPAN",{});var tv=i(Zr);Jp=n(tv,"LayoutLMv3Processor"),tv.forEach(o),fd.forEach(o),Il=u(s),ro=r(s,"DIV",{class:!0});var Bo=i(ro);k(hs.$$.fragment,Bo),Zp=u(Bo),ei=r(Bo,"P",{});var nv=i(ei);eu=n(nv,`Constructs a LayoutLMv3 processor which combines a LayoutLMv3 feature extractor and a LayoutLMv3 tokenizer into a
single processor.`),nv.forEach(o),ou=u(Bo),Qa=r(Bo,"P",{});var Cg=i(Qa);Va=r(Cg,"A",{href:!0});var sv=i(Va);tu=n(sv,"LayoutLMv3Processor"),sv.forEach(o),nu=n(Cg," offers all the functionalities you need to prepare data for the model."),Cg.forEach(o),su=u(Bo),ce=r(Bo,"P",{});var ke=i(ce);au=n(ke,"It first uses "),Ha=r(ke,"A",{href:!0});var av=i(Ha);ru=n(av,"LayoutLMv3FeatureExtractor"),av.forEach(o),iu=n(ke,` to resize and normalize document images, and optionally applies OCR to
get words and normalized bounding boxes. These are then provided to `),Ka=r(ke,"A",{href:!0});var rv=i(Ka);lu=n(rv,"LayoutLMv3Tokenizer"),rv.forEach(o),du=n(ke,` or
`),Ga=r(ke,"A",{href:!0});var iv=i(Ga);cu=n(iv,"LayoutLMv3TokenizerFast"),iv.forEach(o),pu=n(ke,", which turns the words and bounding boxes into token-level "),oi=r(ke,"CODE",{});var lv=i(oi);uu=n(lv,"input_ids"),lv.forEach(o),hu=n(ke,`,
`),ti=r(ke,"CODE",{});var dv=i(ti);mu=n(dv,"attention_mask"),dv.forEach(o),fu=n(ke,", "),ni=r(ke,"CODE",{});var cv=i(ni);gu=n(cv,"token_type_ids"),cv.forEach(o),_u=n(ke,", "),si=r(ke,"CODE",{});var pv=i(si);vu=n(pv,"bbox"),pv.forEach(o),yu=n(ke,". Optionally, one can provide integer "),ai=r(ke,"CODE",{});var uv=i(ai);bu=n(uv,"word_labels"),uv.forEach(o),Lu=n(ke,`, which are turned
into token-level `),ri=r(ke,"CODE",{});var hv=i(ri);ku=n(hv,"labels"),hv.forEach(o),wu=n(ke," for token classification tasks (such as FUNSD, CORD)."),ke.forEach(o),Tu=u(Bo),Ro=r(Bo,"DIV",{class:!0});var _r=i(Ro);k(ms.$$.fragment,_r),xu=u(_r),S=r(_r,"P",{});var W=i(S);Mu=n(W,"This method first forwards the "),ii=r(W,"CODE",{});var mv=i(ii);$u=n(mv,"images"),mv.forEach(o),qu=n(W," argument to "),fs=r(W,"A",{href:!0});var Pg=i(fs);li=r(Pg,"STRONG",{});var fv=i(li);Fu=n(fv,"call"),fv.forEach(o),Eu=n(Pg,"()"),Pg.forEach(o),zu=n(W,`. In case
`),Ya=r(W,"A",{href:!0});var gv=i(Ya);Cu=n(gv,"LayoutLMv3FeatureExtractor"),gv.forEach(o),Pu=n(W," was initialized with "),di=r(W,"CODE",{});var _v=i(di);Au=n(_v,"apply_ocr"),_v.forEach(o),Iu=n(W," set to "),ci=r(W,"CODE",{});var vv=i(ci);Nu=n(vv,"True"),vv.forEach(o),ju=n(W,`, it passes the obtained words and
bounding boxes along with the additional arguments to `),gs=r(W,"A",{href:!0});var Ag=i(gs);pi=r(Ag,"STRONG",{});var yv=i(pi);Ou=n(yv,"call"),yv.forEach(o),Su=n(Ag,"()"),Ag.forEach(o),Du=n(W,` and returns the output,
together with resized and normalized `),ui=r(W,"CODE",{});var bv=i(ui);Ru=n(bv,"pixel_values"),bv.forEach(o),Wu=n(W,". In case "),Xa=r(W,"A",{href:!0});var Lv=i(Xa);Bu=n(Lv,"LayoutLMv3FeatureExtractor"),Lv.forEach(o),Uu=n(W,` was initialized
with `),hi=r(W,"CODE",{});var kv=i(hi);Qu=n(kv,"apply_ocr"),kv.forEach(o),Vu=n(W," set to "),mi=r(W,"CODE",{});var wv=i(mi);Hu=n(wv,"False"),wv.forEach(o),Ku=n(W,", it passes the words ("),fi=r(W,"CODE",{});var Tv=i(fi);Gu=n(Tv,"text"),Tv.forEach(o),Yu=n(W,"/`"),gi=r(W,"CODE",{});var xv=i(gi);Xu=n(xv,"text_pair"),xv.forEach(o),Ju=n(W,") and "),_i=r(W,"CODE",{});var Mv=i(_i);Zu=n(Mv,"boxes"),Mv.forEach(o),eh=n(W,` specified by the user
along with the additional arguments to `),_s=r(W,"A",{href:!0});var Ig=i(_s);vi=r(Ig,"STRONG",{});var $v=i(vi);oh=n($v,"call"),$v.forEach(o),th=n(Ig,"()"),Ig.forEach(o),nh=n(W,` and returns the output, together with
resized and normalized `),yi=r(W,"CODE",{});var qv=i(yi);sh=n(qv,"pixel_values"),qv.forEach(o),ah=n(W,"."),W.forEach(o),rh=u(_r),bi=r(_r,"P",{});var Fv=i(bi);ih=n(Fv,"Please refer to the docstring of the above two methods for more information."),Fv.forEach(o),_r.forEach(o),Bo.forEach(o),Nl=u(s),nt=r(s,"H2",{class:!0});var gd=i(nt);St=r(gd,"A",{id:!0,class:!0,href:!0});var Ev=i(St);Li=r(Ev,"SPAN",{});var zv=i(Li);k(vs.$$.fragment,zv),zv.forEach(o),Ev.forEach(o),lh=u(gd),ki=r(gd,"SPAN",{});var Cv=i(ki);dh=n(Cv,"LayoutLMv3Model"),Cv.forEach(o),gd.forEach(o),jl=u(s),Ao=r(s,"DIV",{class:!0});var vr=i(Ao);k(ys.$$.fragment,vr),ch=u(vr),bs=r(vr,"P",{});var _d=i(bs);ph=n(_d,`The bare LayoutLMv3 Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ls=r(_d,"A",{href:!0,rel:!0});var Pv=i(Ls);uh=n(Pv,"torch.nn.Module"),Pv.forEach(o),hh=n(_d,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),_d.forEach(o),mh=u(vr),yo=r(vr,"DIV",{class:!0});var _n=i(yo);k(ks.$$.fragment,_n),fh=u(_n),st=r(_n,"P",{});var yr=i(st);gh=n(yr,"The "),Ja=r(yr,"A",{href:!0});var Av=i(Ja);_h=n(Av,"LayoutLMv3Model"),Av.forEach(o),vh=n(yr," forward method, overrides the "),wi=r(yr,"CODE",{});var Iv=i(wi);yh=n(Iv,"__call__"),Iv.forEach(o),bh=n(yr," special method."),yr.forEach(o),Lh=u(_n),k(Dt.$$.fragment,_n),kh=u(_n),k(Rt.$$.fragment,_n),_n.forEach(o),vr.forEach(o),Ol=u(s),at=r(s,"H2",{class:!0});var vd=i(at);Wt=r(vd,"A",{id:!0,class:!0,href:!0});var Nv=i(Wt);Ti=r(Nv,"SPAN",{});var jv=i(Ti);k(ws.$$.fragment,jv),jv.forEach(o),Nv.forEach(o),wh=u(vd),xi=r(vd,"SPAN",{});var Ov=i(xi);Th=n(Ov,"LayoutLMv3ForSequenceClassification"),Ov.forEach(o),vd.forEach(o),Sl=u(s),uo=r(s,"DIV",{class:!0});var vn=i(uo);k(Ts.$$.fragment,vn),xh=u(vn),xs=r(vn,"P",{});var yd=i(xs);Mh=n(yd,`LayoutLMv3 Model with a sequence classification head on top (a linear layer on top of the final hidden state of the
[CLS] token) e.g. for document image classification tasks such as the
`),Ms=r(yd,"A",{href:!0,rel:!0});var Sv=i(Ms);$h=n(Sv,"RVL-CDIP"),Sv.forEach(o),qh=n(yd," dataset."),yd.forEach(o),Fh=u(vn),$s=r(vn,"P",{});var bd=i($s);Eh=n(bd,"This model is a PyTorch "),qs=r(bd,"A",{href:!0,rel:!0});var Dv=i(qs);zh=n(Dv,"torch.nn.Module"),Dv.forEach(o),Ch=n(bd,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),bd.forEach(o),Ph=u(vn),bo=r(vn,"DIV",{class:!0});var yn=i(bo);k(Fs.$$.fragment,yn),Ah=u(yn),rt=r(yn,"P",{});var br=i(rt);Ih=n(br,"The "),Za=r(br,"A",{href:!0});var Rv=i(Za);Nh=n(Rv,"LayoutLMv3ForSequenceClassification"),Rv.forEach(o),jh=n(br," forward method, overrides the "),Mi=r(br,"CODE",{});var Wv=i(Mi);Oh=n(Wv,"__call__"),Wv.forEach(o),Sh=n(br," special method."),br.forEach(o),Dh=u(yn),k(Bt.$$.fragment,yn),Rh=u(yn),k(Ut.$$.fragment,yn),yn.forEach(o),vn.forEach(o),Dl=u(s),it=r(s,"H2",{class:!0});var Ld=i(it);Qt=r(Ld,"A",{id:!0,class:!0,href:!0});var Bv=i(Qt);$i=r(Bv,"SPAN",{});var Uv=i($i);k(Es.$$.fragment,Uv),Uv.forEach(o),Bv.forEach(o),Wh=u(Ld),qi=r(Ld,"SPAN",{});var Qv=i(qi);Bh=n(Qv,"LayoutLMv3ForTokenClassification"),Qv.forEach(o),Ld.forEach(o),Rl=u(s),ho=r(s,"DIV",{class:!0});var bn=i(ho);k(zs.$$.fragment,bn),Uh=u(bn),mo=r(bn,"P",{});var Uo=i(mo);Qh=n(Uo,`LayoutLMv3 Model with a token classification head on top (a linear layer on top of the final hidden states) e.g.
for sequence labeling (information extraction) tasks such as `),Cs=r(Uo,"A",{href:!0,rel:!0});var Vv=i(Cs);Vh=n(Vv,"FUNSD"),Vv.forEach(o),Hh=n(Uo,`,
`),Ps=r(Uo,"A",{href:!0,rel:!0});var Hv=i(Ps);Kh=n(Hv,"SROIE"),Hv.forEach(o),Gh=n(Uo,", "),As=r(Uo,"A",{href:!0,rel:!0});var Kv=i(As);Yh=n(Kv,"CORD"),Kv.forEach(o),Xh=n(Uo,` and
`),Is=r(Uo,"A",{href:!0,rel:!0});var Gv=i(Is);Jh=n(Gv,"Kleister-NDA"),Gv.forEach(o),Zh=n(Uo,"."),Uo.forEach(o),em=u(bn),Ns=r(bn,"P",{});var kd=i(Ns);om=n(kd,"This model is a PyTorch "),js=r(kd,"A",{href:!0,rel:!0});var Yv=i(js);tm=n(Yv,"torch.nn.Module"),Yv.forEach(o),nm=n(kd,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),kd.forEach(o),sm=u(bn),Lo=r(bn,"DIV",{class:!0});var Ln=i(Lo);k(Os.$$.fragment,Ln),am=u(Ln),lt=r(Ln,"P",{});var Lr=i(lt);rm=n(Lr,"The "),er=r(Lr,"A",{href:!0});var Xv=i(er);im=n(Xv,"LayoutLMv3ForTokenClassification"),Xv.forEach(o),lm=n(Lr," forward method, overrides the "),Fi=r(Lr,"CODE",{});var Jv=i(Fi);dm=n(Jv,"__call__"),Jv.forEach(o),cm=n(Lr," special method."),Lr.forEach(o),pm=u(Ln),k(Vt.$$.fragment,Ln),um=u(Ln),k(Ht.$$.fragment,Ln),Ln.forEach(o),bn.forEach(o),Wl=u(s),dt=r(s,"H2",{class:!0});var wd=i(dt);Kt=r(wd,"A",{id:!0,class:!0,href:!0});var Zv=i(Kt);Ei=r(Zv,"SPAN",{});var ey=i(Ei);k(Ss.$$.fragment,ey),ey.forEach(o),Zv.forEach(o),hm=u(wd),zi=r(wd,"SPAN",{});var oy=i(zi);mm=n(oy,"LayoutLMv3ForQuestionAnswering"),oy.forEach(o),wd.forEach(o),Bl=u(s),fo=r(s,"DIV",{class:!0});var kn=i(fo);k(Ds.$$.fragment,kn),fm=u(kn),Io=r(kn,"P",{});var wn=i(Io);gm=n(wn,`LayoutLMv3 Model with a span classification head on top for extractive question-answering tasks such as
`),Rs=r(wn,"A",{href:!0,rel:!0});var ty=i(Rs);_m=n(ty,"DocVQA"),ty.forEach(o),vm=n(wn,` (a linear layer on top of the text part of the hidden-states output to
compute `),Ci=r(wn,"CODE",{});var ny=i(Ci);ym=n(ny,"span start logits"),ny.forEach(o),bm=n(wn," and "),Pi=r(wn,"CODE",{});var sy=i(Pi);Lm=n(sy,"span end logits"),sy.forEach(o),km=n(wn,")."),wn.forEach(o),wm=u(kn),Ws=r(kn,"P",{});var Td=i(Ws);Tm=n(Td,"This model is a PyTorch "),Bs=r(Td,"A",{href:!0,rel:!0});var ay=i(Bs);xm=n(ay,"torch.nn.Module"),ay.forEach(o),Mm=n(Td,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Td.forEach(o),$m=u(kn),ko=r(kn,"DIV",{class:!0});var Tn=i(ko);k(Us.$$.fragment,Tn),qm=u(Tn),ct=r(Tn,"P",{});var kr=i(ct);Fm=n(kr,"The "),or=r(kr,"A",{href:!0});var ry=i(or);Em=n(ry,"LayoutLMv3ForQuestionAnswering"),ry.forEach(o),zm=n(kr," forward method, overrides the "),Ai=r(kr,"CODE",{});var iy=i(Ai);Cm=n(iy,"__call__"),iy.forEach(o),Pm=n(kr," special method."),kr.forEach(o),Am=u(Tn),k(Gt.$$.fragment,Tn),Im=u(Tn),k(Yt.$$.fragment,Tn),Tn.forEach(o),kn.forEach(o),Ul=u(s),pt=r(s,"H2",{class:!0});var xd=i(pt);Xt=r(xd,"A",{id:!0,class:!0,href:!0});var ly=i(Xt);Ii=r(ly,"SPAN",{});var dy=i(Ii);k(Qs.$$.fragment,dy),dy.forEach(o),ly.forEach(o),Nm=u(xd),Ni=r(xd,"SPAN",{});var cy=i(Ni);jm=n(cy,"TFLayoutLMv3Model"),cy.forEach(o),xd.forEach(o),Ql=u(s),io=r(s,"DIV",{class:!0});var Qo=i(io);k(Vs.$$.fragment,Qo),Om=u(Qo),Hs=r(Qo,"P",{});var Md=i(Hs);Sm=n(Md,`The bare LayoutLMv3 Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),tr=r(Md,"A",{href:!0});var py=i(tr);Dm=n(py,"TFPreTrainedModel"),py.forEach(o),Rm=n(Md,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Md.forEach(o),Wm=u(Qo),Ks=r(Qo,"P",{});var $d=i(Ks);Bm=n($d,"This model is also a "),Gs=r($d,"A",{href:!0,rel:!0});var uy=i(Gs);Um=n(uy,"tf.keras.Model"),uy.forEach(o),Qm=n($d,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),$d.forEach(o),Vm=u(Qo),k(Jt.$$.fragment,Qo),Hm=u(Qo),wo=r(Qo,"DIV",{class:!0});var xn=i(wo);k(Ys.$$.fragment,xn),Km=u(xn),ut=r(xn,"P",{});var wr=i(ut);Gm=n(wr,"The "),nr=r(wr,"A",{href:!0});var hy=i(nr);Ym=n(hy,"TFLayoutLMv3Model"),hy.forEach(o),Xm=n(wr," forward method, overrides the "),ji=r(wr,"CODE",{});var my=i(ji);Jm=n(my,"__call__"),my.forEach(o),Zm=n(wr," special method."),wr.forEach(o),ef=u(xn),k(Zt.$$.fragment,xn),of=u(xn),k(en.$$.fragment,xn),xn.forEach(o),Qo.forEach(o),Vl=u(s),ht=r(s,"H2",{class:!0});var qd=i(ht);on=r(qd,"A",{id:!0,class:!0,href:!0});var fy=i(on);Oi=r(fy,"SPAN",{});var gy=i(Oi);k(Xs.$$.fragment,gy),gy.forEach(o),fy.forEach(o),tf=u(qd),Si=r(qd,"SPAN",{});var _y=i(Si);nf=n(_y,"TFLayoutLMv3ForSequenceClassification"),_y.forEach(o),qd.forEach(o),Hl=u(s),Ue=r(s,"DIV",{class:!0});var Fo=i(Ue);k(Js.$$.fragment,Fo),sf=u(Fo),Zs=r(Fo,"P",{});var Fd=i(Zs);af=n(Fd,`LayoutLMv3 Model with a sequence classification head on top (a linear layer on top of the final hidden state of the
[CLS] token) e.g. for document image classification tasks such as the
`),ea=r(Fd,"A",{href:!0,rel:!0});var vy=i(ea);rf=n(vy,"RVL-CDIP"),vy.forEach(o),lf=n(Fd," dataset."),Fd.forEach(o),df=u(Fo),oa=r(Fo,"P",{});var Ed=i(oa);cf=n(Ed,"This model inherits from "),sr=r(Ed,"A",{href:!0});var yy=i(sr);pf=n(yy,"TFPreTrainedModel"),yy.forEach(o),uf=n(Ed,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ed.forEach(o),hf=u(Fo),ta=r(Fo,"P",{});var zd=i(ta);mf=n(zd,"This model is also a "),na=r(zd,"A",{href:!0,rel:!0});var by=i(na);ff=n(by,"tf.keras.Model"),by.forEach(o),gf=n(zd,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),zd.forEach(o),_f=u(Fo),k(tn.$$.fragment,Fo),vf=u(Fo),To=r(Fo,"DIV",{class:!0});var Mn=i(To);k(sa.$$.fragment,Mn),yf=u(Mn),mt=r(Mn,"P",{});var Tr=i(mt);bf=n(Tr,"The "),ar=r(Tr,"A",{href:!0});var Ly=i(ar);Lf=n(Ly,"TFLayoutLMv3ForSequenceClassification"),Ly.forEach(o),kf=n(Tr," forward method, overrides the "),Di=r(Tr,"CODE",{});var ky=i(Di);wf=n(ky,"__call__"),ky.forEach(o),Tf=n(Tr," special method."),Tr.forEach(o),xf=u(Mn),k(nn.$$.fragment,Mn),Mf=u(Mn),k(sn.$$.fragment,Mn),Mn.forEach(o),Fo.forEach(o),Kl=u(s),ft=r(s,"H2",{class:!0});var Cd=i(ft);an=r(Cd,"A",{id:!0,class:!0,href:!0});var wy=i(an);Ri=r(wy,"SPAN",{});var Ty=i(Ri);k(aa.$$.fragment,Ty),Ty.forEach(o),wy.forEach(o),$f=u(Cd),Wi=r(Cd,"SPAN",{});var xy=i(Wi);qf=n(xy,"TFLayoutLMv3ForTokenClassification"),xy.forEach(o),Cd.forEach(o),Gl=u(s),Qe=r(s,"DIV",{class:!0});var Eo=i(Qe);k(ra.$$.fragment,Eo),Ff=u(Eo),go=r(Eo,"P",{});var Vo=i(go);Ef=n(Vo,`LayoutLMv3 Model with a token classification head on top (a linear layer on top of the final hidden states) e.g.
for sequence labeling (information extraction) tasks such as `),ia=r(Vo,"A",{href:!0,rel:!0});var My=i(ia);zf=n(My,"FUNSD"),My.forEach(o),Cf=n(Vo,`,
`),la=r(Vo,"A",{href:!0,rel:!0});var $y=i(la);Pf=n($y,"SROIE"),$y.forEach(o),Af=n(Vo,", "),da=r(Vo,"A",{href:!0,rel:!0});var qy=i(da);If=n(qy,"CORD"),qy.forEach(o),Nf=n(Vo,` and
`),ca=r(Vo,"A",{href:!0,rel:!0});var Fy=i(ca);jf=n(Fy,"Kleister-NDA"),Fy.forEach(o),Of=n(Vo,"."),Vo.forEach(o),Sf=u(Eo),pa=r(Eo,"P",{});var Pd=i(pa);Df=n(Pd,"This model inherits from "),rr=r(Pd,"A",{href:!0});var Ey=i(rr);Rf=n(Ey,"TFPreTrainedModel"),Ey.forEach(o),Wf=n(Pd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Pd.forEach(o),Bf=u(Eo),ua=r(Eo,"P",{});var Ad=i(ua);Uf=n(Ad,"This model is also a "),ha=r(Ad,"A",{href:!0,rel:!0});var zy=i(ha);Qf=n(zy,"tf.keras.Model"),zy.forEach(o),Vf=n(Ad,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Ad.forEach(o),Hf=u(Eo),k(rn.$$.fragment,Eo),Kf=u(Eo),xo=r(Eo,"DIV",{class:!0});var $n=i(xo);k(ma.$$.fragment,$n),Gf=u($n),gt=r($n,"P",{});var xr=i(gt);Yf=n(xr,"The "),ir=r(xr,"A",{href:!0});var Cy=i(ir);Xf=n(Cy,"TFLayoutLMv3ForTokenClassification"),Cy.forEach(o),Jf=n(xr," forward method, overrides the "),Bi=r(xr,"CODE",{});var Py=i(Bi);Zf=n(Py,"__call__"),Py.forEach(o),eg=n(xr," special method."),xr.forEach(o),og=u($n),k(ln.$$.fragment,$n),tg=u($n),k(dn.$$.fragment,$n),$n.forEach(o),Eo.forEach(o),Yl=u(s),_t=r(s,"H2",{class:!0});var Id=i(_t);cn=r(Id,"A",{id:!0,class:!0,href:!0});var Ay=i(cn);Ui=r(Ay,"SPAN",{});var Iy=i(Ui);k(fa.$$.fragment,Iy),Iy.forEach(o),Ay.forEach(o),ng=u(Id),Qi=r(Id,"SPAN",{});var Ny=i(Qi);sg=n(Ny,"TFLayoutLMv3ForQuestionAnswering"),Ny.forEach(o),Id.forEach(o),Xl=u(s),Ve=r(s,"DIV",{class:!0});var zo=i(Ve);k(ga.$$.fragment,zo),ag=u(zo),No=r(zo,"P",{});var qn=i(No);rg=n(qn,`LayoutLMv3 Model with a span classification head on top for extractive question-answering tasks such as
`),_a=r(qn,"A",{href:!0,rel:!0});var jy=i(_a);ig=n(jy,"DocVQA"),jy.forEach(o),lg=n(qn,` (a linear layer on top of the text part of the hidden-states output to
compute `),Vi=r(qn,"CODE",{});var Oy=i(Vi);dg=n(Oy,"span start logits"),Oy.forEach(o),cg=n(qn," and "),Hi=r(qn,"CODE",{});var Sy=i(Hi);pg=n(Sy,"span end logits"),Sy.forEach(o),ug=n(qn,")."),qn.forEach(o),hg=u(zo),va=r(zo,"P",{});var Nd=i(va);mg=n(Nd,"This model inherits from "),lr=r(Nd,"A",{href:!0});var Dy=i(lr);fg=n(Dy,"TFPreTrainedModel"),Dy.forEach(o),gg=n(Nd,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Nd.forEach(o),_g=u(zo),ya=r(zo,"P",{});var jd=i(ya);vg=n(jd,"This model is also a "),ba=r(jd,"A",{href:!0,rel:!0});var Ry=i(ba);yg=n(Ry,"tf.keras.Model"),Ry.forEach(o),bg=n(jd,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),jd.forEach(o),Lg=u(zo),k(pn.$$.fragment,zo),kg=u(zo),Mo=r(zo,"DIV",{class:!0});var Fn=i(Mo);k(La.$$.fragment,Fn),wg=u(Fn),vt=r(Fn,"P",{});var Mr=i(vt);Tg=n(Mr,"The "),dr=r(Mr,"A",{href:!0});var Wy=i(dr);xg=n(Wy,"TFLayoutLMv3ForQuestionAnswering"),Wy.forEach(o),Mg=n(Mr," forward method, overrides the "),Ki=r(Mr,"CODE",{});var By=i(Ki);$g=n(By,"__call__"),By.forEach(o),qg=n(Mr," special method."),Mr.forEach(o),Fg=u(Fn),k(un.$$.fragment,Fn),Eg=u(Fn),k(hn.$$.fragment,Fn),Fn.forEach(o),zo.forEach(o),this.h()},h(){l(c,"name","hf:doc:metadata"),l(c,"content",JSON.stringify(yb)),l(_,"id","layoutlmv3"),l(_,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(_,"href","#layoutlmv3"),l(g,"class","relative group"),l(ae,"id","overview"),l(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(ae,"href","#overview"),l(R,"class","relative group"),l(ie,"href","https://arxiv.org/abs/2204.08387"),l(ie,"rel","nofollow"),l(pe,"href","layoutlmv2"),l(ue,"href","vit"),l(me,"href","layoutlmv2"),l(te,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Processor"),l(N,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor"),l(v,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer"),l(ne,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3TokenizerFast"),l(We,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Processor"),l(D,"href","layoutlmv2#usage-layoutlmv2processor"),l(Oe,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/LayoutLMv3"),l(Oe,"rel","nofollow"),l(En,"href","https://github.com/huggingface/transformers/tree/main/examples/research_projects/layoutlmv3"),l(En,"rel","nofollow"),Ky(kt.src,jg="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/layoutlmv3_architecture.png")||l(kt,"src",jg),l(kt,"alt","drawing"),l(kt,"width","600"),l(Ma,"href","https://arxiv.org/abs/2204.08387"),l(zn,"href","https://huggingface.co/nielsr"),l(zn,"rel","nofollow"),l(Cn,"href","https://huggingface.co/chriskoo"),l(Cn,"rel","nofollow"),l(Pn,"href","https://huggingface.co/tokec"),l(Pn,"rel","nofollow"),l(An,"href","https://huggingface.co/lre"),l(An,"rel","nofollow"),l(In,"href","https://github.com/microsoft/unilm/tree/master/layoutlmv3"),l(In,"rel","nofollow"),l(Tt,"id","resources"),l(Tt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Tt,"href","#resources"),l(Ho,"class","relative group"),l(Fa,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv2#transformers.LayoutLMv2ForSequenceClassification"),l(On,"href","https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv2/RVL-CDIP/Fine_tuning_LayoutLMv2ForSequenceClassification_on_RVL_CDIP.ipynb"),l(On,"rel","nofollow"),l(Ea,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3ForTokenClassification"),l(Dn,"href","https://github.com/huggingface/transformers/tree/main/examples/research_projects/layoutlmv3"),l(Dn,"rel","nofollow"),l(Rn,"href","https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv3/Fine_tune_LayoutLMv3_on_FUNSD_(HuggingFace_Trainer).ipynb"),l(Rn,"rel","nofollow"),l(Wn,"href","https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv2/FUNSD/Inference_with_LayoutLMv2ForTokenClassification.ipynb"),l(Wn,"rel","nofollow"),l(za,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv2#transformers.LayoutLMv2ForTokenClassification"),l(Bn,"href","https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv2/FUNSD/True_inference_with_LayoutLMv2ForTokenClassification_%2B_Gradio_demo.ipynb"),l(Bn,"rel","nofollow"),l(Ca,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv2#transformers.LayoutLMv2ForTokenClassification"),l(Un,"href","https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv2/FUNSD/Fine_tuning_LayoutLMv2ForTokenClassification_on_FUNSD_using_HuggingFace_Trainer.ipynb"),l(Un,"rel","nofollow"),l(Pa,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv2#transformers.LayoutLMv2ForTokenClassification"),l(Ia,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv2#transformers.LayoutLMv2ForQuestionAnswering"),l(Vn,"href","https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv2/DocVQA/Fine_tuning_LayoutLMv2ForQuestionAnswering_on_DocVQA.ipynb"),l(Vn,"rel","nofollow"),l(qt,"id","transformers.LayoutLMv3Config"),l(qt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(qt,"href","#transformers.LayoutLMv3Config"),l(Go,"class","relative group"),l(Na,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Model"),l(Gn,"href","https://huggingface.co/microsoft/layoutlmv3-base"),l(Gn,"rel","nofollow"),l(ja,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),l(Oa,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),l(co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Et,"id","transformers.LayoutLMv3ImageProcessor"),l(Et,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Et,"href","#transformers.LayoutLMv3ImageProcessor"),l(Jo,"class","relative group"),l(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ct,"id","transformers.LayoutLMv3ImageProcessor"),l(Ct,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Ct,"href","#transformers.LayoutLMv3ImageProcessor"),l(Zo,"class","relative group"),l(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(At,"id","transformers.LayoutLMv3Tokenizer"),l(At,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(At,"href","#transformers.LayoutLMv3Tokenizer"),l(et,"class","relative group"),l(Sa,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer"),l(Da,"href","/docs/transformers/v4.25.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Wa,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer"),l(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ba,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Nt,"id","transformers.LayoutLMv3TokenizerFast"),l(Nt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Nt,"href","#transformers.LayoutLMv3TokenizerFast"),l(ot,"class","relative group"),l(Ua,"href","/docs/transformers/v4.25.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ot,"id","transformers.LayoutLMv3Processor"),l(Ot,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Ot,"href","#transformers.LayoutLMv3Processor"),l(tt,"class","relative group"),l(Va,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Processor"),l(Ha,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor"),l(Ka,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer"),l(Ga,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3TokenizerFast"),l(fs,"href","/docs/transformers/v4.25.1/en/model_doc/deit#transformers.DeiTImageProcessor.__call__"),l(Ya,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor"),l(gs,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer.__call__"),l(Xa,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor"),l(_s,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer.__call__"),l(Ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(St,"id","transformers.LayoutLMv3Model"),l(St,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(St,"href","#transformers.LayoutLMv3Model"),l(nt,"class","relative group"),l(Ls,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Ls,"rel","nofollow"),l(Ja,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3Model"),l(yo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Wt,"id","transformers.LayoutLMv3ForSequenceClassification"),l(Wt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Wt,"href","#transformers.LayoutLMv3ForSequenceClassification"),l(at,"class","relative group"),l(Ms,"href","https://www.cs.cmu.edu/~aharley/rvl-cdip/"),l(Ms,"rel","nofollow"),l(qs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(qs,"rel","nofollow"),l(Za,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3ForSequenceClassification"),l(bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Qt,"id","transformers.LayoutLMv3ForTokenClassification"),l(Qt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Qt,"href","#transformers.LayoutLMv3ForTokenClassification"),l(it,"class","relative group"),l(Cs,"href","https://guillaumejaume.github.io/FUNSD/"),l(Cs,"rel","nofollow"),l(Ps,"href","https://rrc.cvc.uab.es/?ch=13"),l(Ps,"rel","nofollow"),l(As,"href","https://github.com/clovaai/cord"),l(As,"rel","nofollow"),l(Is,"href","https://github.com/applicaai/kleister-nda"),l(Is,"rel","nofollow"),l(js,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(js,"rel","nofollow"),l(er,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3ForTokenClassification"),l(Lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ho,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Kt,"id","transformers.LayoutLMv3ForQuestionAnswering"),l(Kt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Kt,"href","#transformers.LayoutLMv3ForQuestionAnswering"),l(dt,"class","relative group"),l(Rs,"href","https://rrc.cvc.uab.es/?ch=17"),l(Rs,"rel","nofollow"),l(Bs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Bs,"rel","nofollow"),l(or,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.LayoutLMv3ForQuestionAnswering"),l(ko,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Xt,"id","transformers.TFLayoutLMv3Model"),l(Xt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Xt,"href","#transformers.TFLayoutLMv3Model"),l(pt,"class","relative group"),l(tr,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),l(Gs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(Gs,"rel","nofollow"),l(nr,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.TFLayoutLMv3Model"),l(wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(io,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(on,"id","transformers.TFLayoutLMv3ForSequenceClassification"),l(on,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(on,"href","#transformers.TFLayoutLMv3ForSequenceClassification"),l(ht,"class","relative group"),l(ea,"href","https://www.cs.cmu.edu/~aharley/rvl-cdip/"),l(ea,"rel","nofollow"),l(sr,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),l(na,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(na,"rel","nofollow"),l(ar,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.TFLayoutLMv3ForSequenceClassification"),l(To,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(an,"id","transformers.TFLayoutLMv3ForTokenClassification"),l(an,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(an,"href","#transformers.TFLayoutLMv3ForTokenClassification"),l(ft,"class","relative group"),l(ia,"href","https://guillaumejaume.github.io/FUNSD/"),l(ia,"rel","nofollow"),l(la,"href","https://rrc.cvc.uab.es/?ch=13"),l(la,"rel","nofollow"),l(da,"href","https://github.com/clovaai/cord"),l(da,"rel","nofollow"),l(ca,"href","https://github.com/applicaai/kleister-nda"),l(ca,"rel","nofollow"),l(rr,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),l(ha,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(ha,"rel","nofollow"),l(ir,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.TFLayoutLMv3ForTokenClassification"),l(xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(cn,"id","transformers.TFLayoutLMv3ForQuestionAnswering"),l(cn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(cn,"href","#transformers.TFLayoutLMv3ForQuestionAnswering"),l(_t,"class","relative group"),l(_a,"href","https://rrc.cvc.uab.es/?ch=17"),l(_a,"rel","nofollow"),l(lr,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),l(ba,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(ba,"rel","nofollow"),l(dr,"href","/docs/transformers/v4.25.1/en/model_doc/layoutlmv3#transformers.TFLayoutLMv3ForQuestionAnswering"),l(Mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(s,f){e(document.head,c),m(s,b,f),m(s,g,f),e(g,_),e(_,y),w(d,y,null),e(g,h),e(g,F),e(F,we),m(s,_e,f),m(s,R,f),e(R,ae),e(ae,se),w($,se,null),e(R,Te),e(R,V),e(V,xe),m(s,ve,f),m(s,O,f),e(O,Me),e(O,ie),e(ie,G),e(O,$e),e(O,pe),e(pe,Y),e(O,qe),e(O,ue),e(ue,X),e(O,Fe),m(s,ye,f),m(s,oe,f),e(oe,C),m(s,A,f),m(s,he,f),e(he,H),e(H,Ee),m(s,be,f),m(s,Q,f),e(Q,ze),m(s,Le,f),m(s,z,f),e(z,re),e(re,J),e(re,me),e(me,Ce),e(re,Z),e(re,le),e(le,fe),e(fe,B),e(le,Pe),e(le,j),e(j,Ae),e(j,te),e(te,I),e(j,Ie),e(j,N),e(N,Ne),e(j,je),e(j,v),e(v,q),e(j,Ye),e(j,ne),e(ne,Xe),e(j,Je),e(z,E),e(z,ge),e(ge,Ze),e(ge,We),e(We,eo),e(ge,oo),e(ge,D),e(D,ee),e(ge,to),e(z,no),e(z,U),e(U,so),e(U,Oe),e(Oe,Se),e(U,ao),e(z,de),e(z,De),e(De,Od),e(De,En),e(En,Sd),e(De,Dd),m(s,ul,f),m(s,kt,f),m(s,hl,f),m(s,wt,f),e(wt,Rd),e(wt,Ma),e(Ma,Wd),e(wt,Bd),m(s,ml,f),m(s,Ke,f),e(Ke,Ud),e(Ke,zn),e(zn,Qd),e(Ke,Vd),e(Ke,Cn),e(Cn,Hd),e(Ke,Kd),e(Ke,Pn),e(Pn,Gd),e(Ke,Yd),e(Ke,An),e(An,Xd),e(Ke,Jd),e(Ke,In),e(In,Zd),e(Ke,ec),m(s,fl,f),m(s,Ho,f),e(Ho,Tt),e(Tt,$r),w(Nn,$r,null),e(Ho,oc),e(Ho,qr),e(qr,tc),m(s,gl,f),m(s,$a,f),e($a,nc),m(s,_l,f),w(xt,s,f),m(s,vl,f),w(jn,s,f),m(s,yl,f),m(s,qa,f),e(qa,Mt),e(Mt,Fa),e(Fa,sc),e(Mt,ac),e(Mt,On),e(On,rc),e(Mt,ic),m(s,bl,f),w(Sn,s,f),m(s,Ll,f),m(s,So,f),e(So,Do),e(Do,Ea),e(Ea,lc),e(Do,dc),e(Do,Dn),e(Dn,cc),e(Do,pc),e(Do,Rn),e(Rn,uc),e(Do,hc),e(So,mc),e(So,lo),e(lo,fc),e(lo,Wn),e(Wn,gc),e(lo,_c),e(lo,za),e(za,vc),e(lo,yc),e(lo,Bn),e(Bn,bc),e(lo,Lc),e(lo,Ca),e(Ca,kc),e(lo,wc),e(So,Tc),e(So,Ko),e(Ko,xc),e(Ko,Un),e(Un,Mc),e(Ko,$c),e(Ko,Pa),e(Pa,qc),e(Ko,Fc),m(s,kl,f),w(Qn,s,f),m(s,wl,f),m(s,Aa,f),e(Aa,$t),e($t,Ia),e(Ia,Ec),e($t,zc),e($t,Vn),e(Vn,Cc),e($t,Pc),m(s,Tl,f),m(s,Go,f),e(Go,qt),e(qt,Fr),w(Hn,Fr,null),e(Go,Ac),e(Go,Er),e(Er,Ic),m(s,xl,f),m(s,co,f),w(Kn,co,null),e(co,Nc),e(co,Yo),e(Yo,jc),e(Yo,Na),e(Na,Oc),e(Yo,Sc),e(Yo,Gn),e(Gn,Dc),e(Yo,Rc),e(co,Wc),e(co,Xo),e(Xo,Bc),e(Xo,ja),e(ja,Uc),e(Xo,Qc),e(Xo,Oa),e(Oa,Vc),e(Xo,Hc),e(co,Kc),w(Ft,co,null),m(s,Ml,f),m(s,Jo,f),e(Jo,Et),e(Et,zr),w(Yn,zr,null),e(Jo,Gc),e(Jo,Cr),e(Cr,Yc),m(s,$l,f),m(s,Co,f),w(Xn,Co,null),e(Co,Xc),e(Co,Pr),e(Pr,Jc),e(Co,Zc),e(Co,zt),w(Jn,zt,null),e(zt,ep),e(zt,Ar),e(Ar,op),m(s,ql,f),m(s,Zo,f),e(Zo,Ct),e(Ct,Ir),w(Zn,Ir,null),e(Zo,tp),e(Zo,Nr),e(Nr,np),m(s,Fl,f),m(s,Po,f),w(es,Po,null),e(Po,sp),e(Po,jr),e(jr,ap),e(Po,rp),e(Po,Pt),w(os,Pt,null),e(Pt,ip),e(Pt,Or),e(Or,lp),m(s,El,f),m(s,et,f),e(et,At),e(At,Sr),w(ts,Sr,null),e(et,dp),e(et,Dr),e(Dr,cp),m(s,zl,f),m(s,Be,f),w(ns,Be,null),e(Be,pp),e(Be,Re),e(Re,up),e(Re,Rr),e(Rr,hp),e(Re,mp),e(Re,Sa),e(Sa,fp),e(Re,gp),e(Re,Wr),e(Wr,_p),e(Re,vp),e(Re,Br),e(Br,yp),e(Re,bp),e(Re,Ur),e(Ur,Lp),e(Re,kp),e(Re,Qr),e(Qr,wp),e(Re,Tp),e(Re,Vr),e(Vr,xp),e(Re,Mp),e(Be,$p),e(Be,ss),e(ss,qp),e(ss,Da),e(Da,Fp),e(ss,Ep),e(Be,zp),e(Be,Ra),e(Ra,Wa),e(Wa,Cp),e(Ra,Pp),e(Be,Ap),e(Be,It),w(as,It,null),e(It,Ip),e(It,Hr),e(Hr,Np),e(Be,jp),e(Be,Ba),w(rs,Ba,null),m(s,Cl,f),m(s,ot,f),e(ot,Nt),e(Nt,Kr),w(is,Kr,null),e(ot,Op),e(ot,Gr),e(Gr,Sp),m(s,Pl,f),m(s,po,f),w(ls,po,null),e(po,Dp),e(po,ds),e(ds,Rp),e(ds,Yr),e(Yr,Wp),e(ds,Bp),e(po,Up),e(po,cs),e(cs,Qp),e(cs,Ua),e(Ua,Vp),e(cs,Hp),e(po,Kp),e(po,jt),w(ps,jt,null),e(jt,Gp),e(jt,Xr),e(Xr,Yp),m(s,Al,f),m(s,tt,f),e(tt,Ot),e(Ot,Jr),w(us,Jr,null),e(tt,Xp),e(tt,Zr),e(Zr,Jp),m(s,Il,f),m(s,ro,f),w(hs,ro,null),e(ro,Zp),e(ro,ei),e(ei,eu),e(ro,ou),e(ro,Qa),e(Qa,Va),e(Va,tu),e(Qa,nu),e(ro,su),e(ro,ce),e(ce,au),e(ce,Ha),e(Ha,ru),e(ce,iu),e(ce,Ka),e(Ka,lu),e(ce,du),e(ce,Ga),e(Ga,cu),e(ce,pu),e(ce,oi),e(oi,uu),e(ce,hu),e(ce,ti),e(ti,mu),e(ce,fu),e(ce,ni),e(ni,gu),e(ce,_u),e(ce,si),e(si,vu),e(ce,yu),e(ce,ai),e(ai,bu),e(ce,Lu),e(ce,ri),e(ri,ku),e(ce,wu),e(ro,Tu),e(ro,Ro),w(ms,Ro,null),e(Ro,xu),e(Ro,S),e(S,Mu),e(S,ii),e(ii,$u),e(S,qu),e(S,fs),e(fs,li),e(li,Fu),e(fs,Eu),e(S,zu),e(S,Ya),e(Ya,Cu),e(S,Pu),e(S,di),e(di,Au),e(S,Iu),e(S,ci),e(ci,Nu),e(S,ju),e(S,gs),e(gs,pi),e(pi,Ou),e(gs,Su),e(S,Du),e(S,ui),e(ui,Ru),e(S,Wu),e(S,Xa),e(Xa,Bu),e(S,Uu),e(S,hi),e(hi,Qu),e(S,Vu),e(S,mi),e(mi,Hu),e(S,Ku),e(S,fi),e(fi,Gu),e(S,Yu),e(S,gi),e(gi,Xu),e(S,Ju),e(S,_i),e(_i,Zu),e(S,eh),e(S,_s),e(_s,vi),e(vi,oh),e(_s,th),e(S,nh),e(S,yi),e(yi,sh),e(S,ah),e(Ro,rh),e(Ro,bi),e(bi,ih),m(s,Nl,f),m(s,nt,f),e(nt,St),e(St,Li),w(vs,Li,null),e(nt,lh),e(nt,ki),e(ki,dh),m(s,jl,f),m(s,Ao,f),w(ys,Ao,null),e(Ao,ch),e(Ao,bs),e(bs,ph),e(bs,Ls),e(Ls,uh),e(bs,hh),e(Ao,mh),e(Ao,yo),w(ks,yo,null),e(yo,fh),e(yo,st),e(st,gh),e(st,Ja),e(Ja,_h),e(st,vh),e(st,wi),e(wi,yh),e(st,bh),e(yo,Lh),w(Dt,yo,null),e(yo,kh),w(Rt,yo,null),m(s,Ol,f),m(s,at,f),e(at,Wt),e(Wt,Ti),w(ws,Ti,null),e(at,wh),e(at,xi),e(xi,Th),m(s,Sl,f),m(s,uo,f),w(Ts,uo,null),e(uo,xh),e(uo,xs),e(xs,Mh),e(xs,Ms),e(Ms,$h),e(xs,qh),e(uo,Fh),e(uo,$s),e($s,Eh),e($s,qs),e(qs,zh),e($s,Ch),e(uo,Ph),e(uo,bo),w(Fs,bo,null),e(bo,Ah),e(bo,rt),e(rt,Ih),e(rt,Za),e(Za,Nh),e(rt,jh),e(rt,Mi),e(Mi,Oh),e(rt,Sh),e(bo,Dh),w(Bt,bo,null),e(bo,Rh),w(Ut,bo,null),m(s,Dl,f),m(s,it,f),e(it,Qt),e(Qt,$i),w(Es,$i,null),e(it,Wh),e(it,qi),e(qi,Bh),m(s,Rl,f),m(s,ho,f),w(zs,ho,null),e(ho,Uh),e(ho,mo),e(mo,Qh),e(mo,Cs),e(Cs,Vh),e(mo,Hh),e(mo,Ps),e(Ps,Kh),e(mo,Gh),e(mo,As),e(As,Yh),e(mo,Xh),e(mo,Is),e(Is,Jh),e(mo,Zh),e(ho,em),e(ho,Ns),e(Ns,om),e(Ns,js),e(js,tm),e(Ns,nm),e(ho,sm),e(ho,Lo),w(Os,Lo,null),e(Lo,am),e(Lo,lt),e(lt,rm),e(lt,er),e(er,im),e(lt,lm),e(lt,Fi),e(Fi,dm),e(lt,cm),e(Lo,pm),w(Vt,Lo,null),e(Lo,um),w(Ht,Lo,null),m(s,Wl,f),m(s,dt,f),e(dt,Kt),e(Kt,Ei),w(Ss,Ei,null),e(dt,hm),e(dt,zi),e(zi,mm),m(s,Bl,f),m(s,fo,f),w(Ds,fo,null),e(fo,fm),e(fo,Io),e(Io,gm),e(Io,Rs),e(Rs,_m),e(Io,vm),e(Io,Ci),e(Ci,ym),e(Io,bm),e(Io,Pi),e(Pi,Lm),e(Io,km),e(fo,wm),e(fo,Ws),e(Ws,Tm),e(Ws,Bs),e(Bs,xm),e(Ws,Mm),e(fo,$m),e(fo,ko),w(Us,ko,null),e(ko,qm),e(ko,ct),e(ct,Fm),e(ct,or),e(or,Em),e(ct,zm),e(ct,Ai),e(Ai,Cm),e(ct,Pm),e(ko,Am),w(Gt,ko,null),e(ko,Im),w(Yt,ko,null),m(s,Ul,f),m(s,pt,f),e(pt,Xt),e(Xt,Ii),w(Qs,Ii,null),e(pt,Nm),e(pt,Ni),e(Ni,jm),m(s,Ql,f),m(s,io,f),w(Vs,io,null),e(io,Om),e(io,Hs),e(Hs,Sm),e(Hs,tr),e(tr,Dm),e(Hs,Rm),e(io,Wm),e(io,Ks),e(Ks,Bm),e(Ks,Gs),e(Gs,Um),e(Ks,Qm),e(io,Vm),w(Jt,io,null),e(io,Hm),e(io,wo),w(Ys,wo,null),e(wo,Km),e(wo,ut),e(ut,Gm),e(ut,nr),e(nr,Ym),e(ut,Xm),e(ut,ji),e(ji,Jm),e(ut,Zm),e(wo,ef),w(Zt,wo,null),e(wo,of),w(en,wo,null),m(s,Vl,f),m(s,ht,f),e(ht,on),e(on,Oi),w(Xs,Oi,null),e(ht,tf),e(ht,Si),e(Si,nf),m(s,Hl,f),m(s,Ue,f),w(Js,Ue,null),e(Ue,sf),e(Ue,Zs),e(Zs,af),e(Zs,ea),e(ea,rf),e(Zs,lf),e(Ue,df),e(Ue,oa),e(oa,cf),e(oa,sr),e(sr,pf),e(oa,uf),e(Ue,hf),e(Ue,ta),e(ta,mf),e(ta,na),e(na,ff),e(ta,gf),e(Ue,_f),w(tn,Ue,null),e(Ue,vf),e(Ue,To),w(sa,To,null),e(To,yf),e(To,mt),e(mt,bf),e(mt,ar),e(ar,Lf),e(mt,kf),e(mt,Di),e(Di,wf),e(mt,Tf),e(To,xf),w(nn,To,null),e(To,Mf),w(sn,To,null),m(s,Kl,f),m(s,ft,f),e(ft,an),e(an,Ri),w(aa,Ri,null),e(ft,$f),e(ft,Wi),e(Wi,qf),m(s,Gl,f),m(s,Qe,f),w(ra,Qe,null),e(Qe,Ff),e(Qe,go),e(go,Ef),e(go,ia),e(ia,zf),e(go,Cf),e(go,la),e(la,Pf),e(go,Af),e(go,da),e(da,If),e(go,Nf),e(go,ca),e(ca,jf),e(go,Of),e(Qe,Sf),e(Qe,pa),e(pa,Df),e(pa,rr),e(rr,Rf),e(pa,Wf),e(Qe,Bf),e(Qe,ua),e(ua,Uf),e(ua,ha),e(ha,Qf),e(ua,Vf),e(Qe,Hf),w(rn,Qe,null),e(Qe,Kf),e(Qe,xo),w(ma,xo,null),e(xo,Gf),e(xo,gt),e(gt,Yf),e(gt,ir),e(ir,Xf),e(gt,Jf),e(gt,Bi),e(Bi,Zf),e(gt,eg),e(xo,og),w(ln,xo,null),e(xo,tg),w(dn,xo,null),m(s,Yl,f),m(s,_t,f),e(_t,cn),e(cn,Ui),w(fa,Ui,null),e(_t,ng),e(_t,Qi),e(Qi,sg),m(s,Xl,f),m(s,Ve,f),w(ga,Ve,null),e(Ve,ag),e(Ve,No),e(No,rg),e(No,_a),e(_a,ig),e(No,lg),e(No,Vi),e(Vi,dg),e(No,cg),e(No,Hi),e(Hi,pg),e(No,ug),e(Ve,hg),e(Ve,va),e(va,mg),e(va,lr),e(lr,fg),e(va,gg),e(Ve,_g),e(Ve,ya),e(ya,vg),e(ya,ba),e(ba,yg),e(ya,bg),e(Ve,Lg),w(pn,Ve,null),e(Ve,kg),e(Ve,Mo),w(La,Mo,null),e(Mo,wg),e(Mo,vt),e(vt,Tg),e(vt,dr),e(dr,xg),e(vt,Mg),e(vt,Ki),e(Ki,$g),e(vt,qg),e(Mo,Fg),w(un,Mo,null),e(Mo,Eg),w(hn,Mo,null),Jl=!0},p(s,[f]){const ka={};f&2&&(ka.$$scope={dirty:f,ctx:s}),xt.$set(ka);const Gi={};f&2&&(Gi.$$scope={dirty:f,ctx:s}),Ft.$set(Gi);const Yi={};f&2&&(Yi.$$scope={dirty:f,ctx:s}),Dt.$set(Yi);const Xi={};f&2&&(Xi.$$scope={dirty:f,ctx:s}),Rt.$set(Xi);const wa={};f&2&&(wa.$$scope={dirty:f,ctx:s}),Bt.$set(wa);const Ji={};f&2&&(Ji.$$scope={dirty:f,ctx:s}),Ut.$set(Ji);const Zi={};f&2&&(Zi.$$scope={dirty:f,ctx:s}),Vt.$set(Zi);const el={};f&2&&(el.$$scope={dirty:f,ctx:s}),Ht.$set(el);const jo={};f&2&&(jo.$$scope={dirty:f,ctx:s}),Gt.$set(jo);const ol={};f&2&&(ol.$$scope={dirty:f,ctx:s}),Yt.$set(ol);const tl={};f&2&&(tl.$$scope={dirty:f,ctx:s}),Jt.$set(tl);const nl={};f&2&&(nl.$$scope={dirty:f,ctx:s}),Zt.$set(nl);const sl={};f&2&&(sl.$$scope={dirty:f,ctx:s}),en.$set(sl);const al={};f&2&&(al.$$scope={dirty:f,ctx:s}),tn.$set(al);const rl={};f&2&&(rl.$$scope={dirty:f,ctx:s}),nn.$set(rl);const il={};f&2&&(il.$$scope={dirty:f,ctx:s}),sn.$set(il);const Oo={};f&2&&(Oo.$$scope={dirty:f,ctx:s}),rn.$set(Oo);const mn={};f&2&&(mn.$$scope={dirty:f,ctx:s}),ln.$set(mn);const ll={};f&2&&(ll.$$scope={dirty:f,ctx:s}),dn.$set(ll);const Ta={};f&2&&(Ta.$$scope={dirty:f,ctx:s}),pn.$set(Ta);const dl={};f&2&&(dl.$$scope={dirty:f,ctx:s}),un.$set(dl);const _o={};f&2&&(_o.$$scope={dirty:f,ctx:s}),hn.$set(_o)},i(s){Jl||(T(d.$$.fragment,s),T($.$$.fragment,s),T(Nn.$$.fragment,s),T(xt.$$.fragment,s),T(jn.$$.fragment,s),T(Sn.$$.fragment,s),T(Qn.$$.fragment,s),T(Hn.$$.fragment,s),T(Kn.$$.fragment,s),T(Ft.$$.fragment,s),T(Yn.$$.fragment,s),T(Xn.$$.fragment,s),T(Jn.$$.fragment,s),T(Zn.$$.fragment,s),T(es.$$.fragment,s),T(os.$$.fragment,s),T(ts.$$.fragment,s),T(ns.$$.fragment,s),T(as.$$.fragment,s),T(rs.$$.fragment,s),T(is.$$.fragment,s),T(ls.$$.fragment,s),T(ps.$$.fragment,s),T(us.$$.fragment,s),T(hs.$$.fragment,s),T(ms.$$.fragment,s),T(vs.$$.fragment,s),T(ys.$$.fragment,s),T(ks.$$.fragment,s),T(Dt.$$.fragment,s),T(Rt.$$.fragment,s),T(ws.$$.fragment,s),T(Ts.$$.fragment,s),T(Fs.$$.fragment,s),T(Bt.$$.fragment,s),T(Ut.$$.fragment,s),T(Es.$$.fragment,s),T(zs.$$.fragment,s),T(Os.$$.fragment,s),T(Vt.$$.fragment,s),T(Ht.$$.fragment,s),T(Ss.$$.fragment,s),T(Ds.$$.fragment,s),T(Us.$$.fragment,s),T(Gt.$$.fragment,s),T(Yt.$$.fragment,s),T(Qs.$$.fragment,s),T(Vs.$$.fragment,s),T(Jt.$$.fragment,s),T(Ys.$$.fragment,s),T(Zt.$$.fragment,s),T(en.$$.fragment,s),T(Xs.$$.fragment,s),T(Js.$$.fragment,s),T(tn.$$.fragment,s),T(sa.$$.fragment,s),T(nn.$$.fragment,s),T(sn.$$.fragment,s),T(aa.$$.fragment,s),T(ra.$$.fragment,s),T(rn.$$.fragment,s),T(ma.$$.fragment,s),T(ln.$$.fragment,s),T(dn.$$.fragment,s),T(fa.$$.fragment,s),T(ga.$$.fragment,s),T(pn.$$.fragment,s),T(La.$$.fragment,s),T(un.$$.fragment,s),T(hn.$$.fragment,s),Jl=!0)},o(s){x(d.$$.fragment,s),x($.$$.fragment,s),x(Nn.$$.fragment,s),x(xt.$$.fragment,s),x(jn.$$.fragment,s),x(Sn.$$.fragment,s),x(Qn.$$.fragment,s),x(Hn.$$.fragment,s),x(Kn.$$.fragment,s),x(Ft.$$.fragment,s),x(Yn.$$.fragment,s),x(Xn.$$.fragment,s),x(Jn.$$.fragment,s),x(Zn.$$.fragment,s),x(es.$$.fragment,s),x(os.$$.fragment,s),x(ts.$$.fragment,s),x(ns.$$.fragment,s),x(as.$$.fragment,s),x(rs.$$.fragment,s),x(is.$$.fragment,s),x(ls.$$.fragment,s),x(ps.$$.fragment,s),x(us.$$.fragment,s),x(hs.$$.fragment,s),x(ms.$$.fragment,s),x(vs.$$.fragment,s),x(ys.$$.fragment,s),x(ks.$$.fragment,s),x(Dt.$$.fragment,s),x(Rt.$$.fragment,s),x(ws.$$.fragment,s),x(Ts.$$.fragment,s),x(Fs.$$.fragment,s),x(Bt.$$.fragment,s),x(Ut.$$.fragment,s),x(Es.$$.fragment,s),x(zs.$$.fragment,s),x(Os.$$.fragment,s),x(Vt.$$.fragment,s),x(Ht.$$.fragment,s),x(Ss.$$.fragment,s),x(Ds.$$.fragment,s),x(Us.$$.fragment,s),x(Gt.$$.fragment,s),x(Yt.$$.fragment,s),x(Qs.$$.fragment,s),x(Vs.$$.fragment,s),x(Jt.$$.fragment,s),x(Ys.$$.fragment,s),x(Zt.$$.fragment,s),x(en.$$.fragment,s),x(Xs.$$.fragment,s),x(Js.$$.fragment,s),x(tn.$$.fragment,s),x(sa.$$.fragment,s),x(nn.$$.fragment,s),x(sn.$$.fragment,s),x(aa.$$.fragment,s),x(ra.$$.fragment,s),x(rn.$$.fragment,s),x(ma.$$.fragment,s),x(ln.$$.fragment,s),x(dn.$$.fragment,s),x(fa.$$.fragment,s),x(ga.$$.fragment,s),x(pn.$$.fragment,s),x(La.$$.fragment,s),x(un.$$.fragment,s),x(hn.$$.fragment,s),Jl=!1},d(s){o(c),s&&o(b),s&&o(g),M(d),s&&o(_e),s&&o(R),M($),s&&o(ve),s&&o(O),s&&o(ye),s&&o(oe),s&&o(A),s&&o(he),s&&o(be),s&&o(Q),s&&o(Le),s&&o(z),s&&o(ul),s&&o(kt),s&&o(hl),s&&o(wt),s&&o(ml),s&&o(Ke),s&&o(fl),s&&o(Ho),M(Nn),s&&o(gl),s&&o($a),s&&o(_l),M(xt,s),s&&o(vl),M(jn,s),s&&o(yl),s&&o(qa),s&&o(bl),M(Sn,s),s&&o(Ll),s&&o(So),s&&o(kl),M(Qn,s),s&&o(wl),s&&o(Aa),s&&o(Tl),s&&o(Go),M(Hn),s&&o(xl),s&&o(co),M(Kn),M(Ft),s&&o(Ml),s&&o(Jo),M(Yn),s&&o($l),s&&o(Co),M(Xn),M(Jn),s&&o(ql),s&&o(Zo),M(Zn),s&&o(Fl),s&&o(Po),M(es),M(os),s&&o(El),s&&o(et),M(ts),s&&o(zl),s&&o(Be),M(ns),M(as),M(rs),s&&o(Cl),s&&o(ot),M(is),s&&o(Pl),s&&o(po),M(ls),M(ps),s&&o(Al),s&&o(tt),M(us),s&&o(Il),s&&o(ro),M(hs),M(ms),s&&o(Nl),s&&o(nt),M(vs),s&&o(jl),s&&o(Ao),M(ys),M(ks),M(Dt),M(Rt),s&&o(Ol),s&&o(at),M(ws),s&&o(Sl),s&&o(uo),M(Ts),M(Fs),M(Bt),M(Ut),s&&o(Dl),s&&o(it),M(Es),s&&o(Rl),s&&o(ho),M(zs),M(Os),M(Vt),M(Ht),s&&o(Wl),s&&o(dt),M(Ss),s&&o(Bl),s&&o(fo),M(Ds),M(Us),M(Gt),M(Yt),s&&o(Ul),s&&o(pt),M(Qs),s&&o(Ql),s&&o(io),M(Vs),M(Jt),M(Ys),M(Zt),M(en),s&&o(Vl),s&&o(ht),M(Xs),s&&o(Hl),s&&o(Ue),M(Js),M(tn),M(sa),M(nn),M(sn),s&&o(Kl),s&&o(ft),M(aa),s&&o(Gl),s&&o(Qe),M(ra),M(rn),M(ma),M(ln),M(dn),s&&o(Yl),s&&o(_t),M(fa),s&&o(Xl),s&&o(Ve),M(ga),M(pn),M(La),M(un),M(hn)}}}const yb={local:"layoutlmv3",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.LayoutLMv3Config",title:"LayoutLMv3Config"},{local:"transformers.LayoutLMv3ImageProcessor",title:"LayoutLMv3FeatureExtractor"},{local:"transformers.LayoutLMv3ImageProcessor",title:"LayoutLMv3ImageProcessor"},{local:"transformers.LayoutLMv3Tokenizer",title:"LayoutLMv3Tokenizer"},{local:"transformers.LayoutLMv3TokenizerFast",title:"LayoutLMv3TokenizerFast"},{local:"transformers.LayoutLMv3Processor",title:"LayoutLMv3Processor"},{local:"transformers.LayoutLMv3Model",title:"LayoutLMv3Model"},{local:"transformers.LayoutLMv3ForSequenceClassification",title:"LayoutLMv3ForSequenceClassification"},{local:"transformers.LayoutLMv3ForTokenClassification",title:"LayoutLMv3ForTokenClassification"},{local:"transformers.LayoutLMv3ForQuestionAnswering",title:"LayoutLMv3ForQuestionAnswering"},{local:"transformers.TFLayoutLMv3Model",title:"TFLayoutLMv3Model"},{local:"transformers.TFLayoutLMv3ForSequenceClassification",title:"TFLayoutLMv3ForSequenceClassification"},{local:"transformers.TFLayoutLMv3ForTokenClassification",title:"TFLayoutLMv3ForTokenClassification"},{local:"transformers.TFLayoutLMv3ForQuestionAnswering",title:"TFLayoutLMv3ForQuestionAnswering"}],title:"LayoutLMv3"};function bb(P){return Gy(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class qb extends Uy{constructor(c){super();Qy(this,c,bb,vb,Vy,{})}}export{qb as default,yb as metadata};
