import{S as Dy,i as Ry,s as Wy,e as a,k as p,w as L,t,M as By,c as r,d as o,m as u,a as i,x as k,h as n,b as l,N as Uy,G as e,g as h,y as w,q as T,o as x,B as M,v as Qy,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 Ag}from"../../chunks/PipelineTag-hf-doc-builder.js";function Vy(A){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 m=i(c);b=n(m,"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(m,"A",{href:!0});var F=i(g);_=n(F,"LayoutLMv2Processor"),F.forEach(o),y=n(m," instead when preparing data for the model!"),m.forEach(o),this.h()},h(){l(g,"href","/docs/transformers/main/en/model_doc/layoutlmv2#transformers.LayoutLMv2Processor")},m(d,m){h(d,c,m),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function Hy(A){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 m=i(c);b=n(m,"Example:"),m.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,m){h(d,c,m),e(c,b),h(d,g,m),w(_,d,m),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 Ky(A){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 m=i(c);b=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(m,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){h(d,c,m),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function Gy(A){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 m=i(c);b=n(m,"Examples:"),m.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,m){h(d,c,m),e(c,b),h(d,g,m),w(_,d,m),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 Yy(A){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 m=i(c);b=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(m,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){h(d,c,m),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function Xy(A){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 m=i(c);b=n(m,"Examples:"),m.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,m){h(d,c,m),e(c,b),h(d,g,m),w(_,d,m),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(A){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 m=i(c);b=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(m,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){h(d,c,m),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function Zy(A){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 m=i(c);b=n(m,"Examples:"),m.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,m){h(d,c,m),e(c,b),h(d,g,m),w(_,d,m),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(A){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 m=i(c);b=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(m,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){h(d,c,m),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function ob(A){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 m=i(c);b=n(m,"Examples:"),m.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,m){h(d,c,m),e(c,b),h(d,g,m),w(_,d,m),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(A){let c,b,g,_,y,d,m,F,we,_e,R,ae,se,$,Te,V,xe,ve,O,Me,ie,G,$e,pe,Y,qe,ue,X,Fe,ye,oe,C,P,me,H,Ee,be,Q,ze,Le,z,re,J,he,Ce,Z,le,fe,B,Ae,I,Pe,te,j,je,N,Ne,Ie;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(),m=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"),P=a("li"),me=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"),he=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"),Ae=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=a("code"),Pe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=p(),j=a("p"),je=t(`Note that when creating models and layers with
`),N=a("a"),Ne=t("subclassing"),Ie=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),m=r(v,"UL",{});var ne=i(m);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);P=r(D,"LI",{});var ee=i(P);me=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);he=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);Ae=n(Se,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=r(Se,"CODE",{});var ao=i(I);Pe=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),j=r(v,"P",{});var de=i(j);je=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),Ie=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){h(v,c,q),e(c,b),e(c,g),e(g,_),e(c,y),h(v,d,q),h(v,m,q),e(m,F),e(F,we),e(m,_e),e(m,R),e(R,ae),h(v,se,q),h(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),h(v,oe,q),h(v,C,q),e(C,P),e(P,me),e(P,H),e(H,Ee),e(P,be),e(P,Q),e(Q,ze),e(C,Le),e(C,z),e(z,re),e(z,J),e(J,he),e(z,Ce),e(z,Z),e(Z,le),e(C,fe),e(C,B),e(B,Ae),e(B,I),e(I,Pe),h(v,te,q),h(v,j,q),e(j,je),e(j,N),e(N,Ne),e(j,Ie)},d(v){v&&o(c),v&&o(d),v&&o(m),v&&o(se),v&&o($),v&&o(oe),v&&o(C),v&&o(te),v&&o(j)}}}function nb(A){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 m=i(c);b=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(m,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){h(d,c,m),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function sb(A){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 m=i(c);b=n(m,"Examples:"),m.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,m){h(d,c,m),e(c,b),h(d,g,m),w(_,d,m),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 ab(A){let c,b,g,_,y,d,m,F,we,_e,R,ae,se,$,Te,V,xe,ve,O,Me,ie,G,$e,pe,Y,qe,ue,X,Fe,ye,oe,C,P,me,H,Ee,be,Q,ze,Le,z,re,J,he,Ce,Z,le,fe,B,Ae,I,Pe,te,j,je,N,Ne,Ie;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(),m=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"),P=a("li"),me=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"),he=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"),Ae=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=a("code"),Pe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=p(),j=a("p"),je=t(`Note that when creating models and layers with
`),N=a("a"),Ne=t("subclassing"),Ie=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),m=r(v,"UL",{});var ne=i(m);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);P=r(D,"LI",{});var ee=i(P);me=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);he=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);Ae=n(Se,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=r(Se,"CODE",{});var ao=i(I);Pe=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),j=r(v,"P",{});var de=i(j);je=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),Ie=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){h(v,c,q),e(c,b),e(c,g),e(g,_),e(c,y),h(v,d,q),h(v,m,q),e(m,F),e(F,we),e(m,_e),e(m,R),e(R,ae),h(v,se,q),h(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),h(v,oe,q),h(v,C,q),e(C,P),e(P,me),e(P,H),e(H,Ee),e(P,be),e(P,Q),e(Q,ze),e(C,Le),e(C,z),e(z,re),e(z,J),e(J,he),e(z,Ce),e(z,Z),e(Z,le),e(C,fe),e(C,B),e(B,Ae),e(B,I),e(I,Pe),h(v,te,q),h(v,j,q),e(j,je),e(j,N),e(N,Ne),e(j,Ie)},d(v){v&&o(c),v&&o(d),v&&o(m),v&&o(se),v&&o($),v&&o(oe),v&&o(C),v&&o(te),v&&o(j)}}}function rb(A){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 m=i(c);b=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(m,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){h(d,c,m),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function ib(A){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 m=i(c);b=n(m,"Examples:"),m.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,m){h(d,c,m),e(c,b),h(d,g,m),w(_,d,m),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 lb(A){let c,b,g,_,y,d,m,F,we,_e,R,ae,se,$,Te,V,xe,ve,O,Me,ie,G,$e,pe,Y,qe,ue,X,Fe,ye,oe,C,P,me,H,Ee,be,Q,ze,Le,z,re,J,he,Ce,Z,le,fe,B,Ae,I,Pe,te,j,je,N,Ne,Ie;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(),m=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"),P=a("li"),me=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"),he=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"),Ae=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=a("code"),Pe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=p(),j=a("p"),je=t(`Note that when creating models and layers with
`),N=a("a"),Ne=t("subclassing"),Ie=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),m=r(v,"UL",{});var ne=i(m);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);P=r(D,"LI",{});var ee=i(P);me=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);he=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);Ae=n(Se,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=r(Se,"CODE",{});var ao=i(I);Pe=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),j=r(v,"P",{});var de=i(j);je=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),Ie=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){h(v,c,q),e(c,b),e(c,g),e(g,_),e(c,y),h(v,d,q),h(v,m,q),e(m,F),e(F,we),e(m,_e),e(m,R),e(R,ae),h(v,se,q),h(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),h(v,oe,q),h(v,C,q),e(C,P),e(P,me),e(P,H),e(H,Ee),e(P,be),e(P,Q),e(Q,ze),e(C,Le),e(C,z),e(z,re),e(z,J),e(J,he),e(z,Ce),e(z,Z),e(Z,le),e(C,fe),e(C,B),e(B,Ae),e(B,I),e(I,Pe),h(v,te,q),h(v,j,q),e(j,je),e(j,N),e(N,Ne),e(j,Ie)},d(v){v&&o(c),v&&o(d),v&&o(m),v&&o(se),v&&o($),v&&o(oe),v&&o(C),v&&o(te),v&&o(j)}}}function db(A){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 m=i(c);b=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(m,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){h(d,c,m),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function cb(A){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 m=i(c);b=n(m,"Examples:"),m.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,m){h(d,c,m),e(c,b),h(d,g,m),w(_,d,m),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 pb(A){let c,b,g,_,y,d,m,F,we,_e,R,ae,se,$,Te,V,xe,ve,O,Me,ie,G,$e,pe,Y,qe,ue,X,Fe,ye,oe,C,P,me,H,Ee,be,Q,ze,Le,z,re,J,he,Ce,Z,le,fe,B,Ae,I,Pe,te,j,je,N,Ne,Ie;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(),m=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"),P=a("li"),me=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"),he=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"),Ae=t(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=a("code"),Pe=t('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=p(),j=a("p"),je=t(`Note that when creating models and layers with
`),N=a("a"),Ne=t("subclassing"),Ie=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),m=r(v,"UL",{});var ne=i(m);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);P=r(D,"LI",{});var ee=i(P);me=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);he=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);Ae=n(Se,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),I=r(Se,"CODE",{});var ao=i(I);Pe=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),j=r(v,"P",{});var de=i(j);je=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),Ie=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){h(v,c,q),e(c,b),e(c,g),e(g,_),e(c,y),h(v,d,q),h(v,m,q),e(m,F),e(F,we),e(m,_e),e(m,R),e(R,ae),h(v,se,q),h(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),h(v,oe,q),h(v,C,q),e(C,P),e(P,me),e(P,H),e(H,Ee),e(P,be),e(P,Q),e(Q,ze),e(C,Le),e(C,z),e(z,re),e(z,J),e(J,he),e(z,Ce),e(z,Z),e(Z,le),e(C,fe),e(C,B),e(B,Ae),e(B,I),e(I,Pe),h(v,te,q),h(v,j,q),e(j,je),e(j,N),e(N,Ne),e(j,Ie)},d(v){v&&o(c),v&&o(d),v&&o(m),v&&o(se),v&&o($),v&&o(oe),v&&o(C),v&&o(te),v&&o(j)}}}function ub(A){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 m=i(c);b=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(m,"CODE",{});var F=i(g);_=n(F,"Module"),F.forEach(o),y=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){h(d,c,m),e(c,b),e(c,g),e(g,_),e(c,y)},d(d){d&&o(c)}}}function mb(A){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 m=i(c);b=n(m,"Examples:"),m.forEach(o),g=u(d),k(_.$$.fragment,d)},m(d,m){h(d,c,m),e(c,b),h(d,g,m),w(_,d,m),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 hb(A){let c,b,g,_,y,d,m,F,we,_e,R,ae,se,$,Te,V,xe,ve,O,Me,ie,G,$e,pe,Y,qe,ue,X,Fe,ye,oe,C,P,me,H,Ee,be,Q,ze,Le,z,re,J,he,Ce,Z,le,fe,B,Ae,I,Pe,te,j,je,N,Ne,Ie,v,q,Ye,ne,Xe,Je,E,ge,Ze,We,eo,oo,D,ee,to,no,U,so,Oe,Se,ao,de,De,Id,En,Od,Sd,cl,kt,Pg,pl,wt,Dd,Ma,Rd,Wd,ul,Ke,Bd,zn,Ud,Qd,Cn,Vd,Hd,An,Kd,Gd,Pn,Yd,Xd,jn,Jd,Zd,ml,Vo,Tt,Mr,Nn,ec,$r,oc,hl,$a,tc,fl,xt,gl,In,_l,qa,Mt,Fa,nc,sc,On,ac,rc,vl,Sn,yl,Oo,So,Ea,ic,lc,Dn,dc,cc,Rn,pc,uc,mc,lo,hc,Wn,fc,gc,za,_c,vc,Bn,yc,bc,Ca,Lc,kc,wc,Ho,Tc,Un,xc,Mc,Aa,$c,qc,bl,Qn,Ll,Pa,$t,ja,Fc,Ec,Vn,zc,Cc,kl,Ko,qt,qr,Hn,Ac,Fr,Pc,wl,co,Kn,jc,Go,Nc,Na,Ic,Oc,Gn,Sc,Dc,Rc,Yo,Wc,Ia,Bc,Uc,Oa,Qc,Vc,Hc,Ft,Tl,Xo,Et,Er,Yn,Kc,zr,Gc,xl,Jo,Xn,Yc,zt,Jn,Xc,Cr,Jc,Ml,Zo,Ct,Ar,Zn,Zc,Pr,ep,$l,Co,es,op,jr,tp,np,At,os,sp,Nr,ap,ql,et,Pt,Ir,ts,rp,Or,ip,Fl,Be,ns,lp,Re,dp,Sr,cp,pp,Sa,up,mp,Dr,hp,fp,Rr,gp,_p,Wr,vp,yp,Br,bp,Lp,Ur,kp,wp,Tp,ss,xp,Da,Mp,$p,qp,Ra,Wa,Fp,Ep,zp,jt,as,Cp,Qr,Ap,Pp,Ba,rs,El,ot,Nt,Vr,is,jp,Hr,Np,zl,po,ls,Ip,ds,Op,Kr,Sp,Dp,Rp,cs,Wp,Ua,Bp,Up,Qp,It,ps,Vp,Gr,Hp,Cl,tt,Ot,Yr,us,Kp,Xr,Gp,Al,ro,ms,Yp,Jr,Xp,Jp,Qa,Va,Zp,eu,ou,ce,tu,Ha,nu,su,Ka,au,ru,Ga,iu,lu,Zr,du,cu,ei,pu,uu,oi,mu,hu,ti,fu,gu,ni,_u,vu,si,yu,bu,Lu,Do,hs,ku,S,wu,ai,Tu,xu,fs,ri,Mu,$u,qu,Ya,Fu,Eu,ii,zu,Cu,li,Au,Pu,gs,di,ju,Nu,Iu,ci,Ou,Su,Xa,Du,Ru,pi,Wu,Bu,ui,Uu,Qu,mi,Vu,Hu,hi,Ku,Gu,fi,Yu,Xu,_s,gi,Ju,Zu,em,_i,om,tm,nm,vi,sm,Pl,nt,St,yi,vs,am,bi,rm,jl,Ao,ys,im,bs,lm,Ls,dm,cm,pm,yo,ks,um,st,mm,Ja,hm,fm,Li,gm,_m,vm,Dt,ym,Rt,Nl,at,Wt,ki,ws,bm,wi,Lm,Il,uo,Ts,km,xs,wm,Ms,Tm,xm,Mm,$s,$m,qs,qm,Fm,Em,bo,Fs,zm,rt,Cm,Za,Am,Pm,Ti,jm,Nm,Im,Bt,Om,Ut,Ol,it,Qt,xi,Es,Sm,Mi,Dm,Sl,mo,zs,Rm,ho,Wm,Cs,Bm,Um,As,Qm,Vm,Ps,Hm,Km,js,Gm,Ym,Xm,Ns,Jm,Is,Zm,eh,oh,Lo,Os,th,lt,nh,er,sh,ah,$i,rh,ih,lh,Vt,dh,Ht,Dl,dt,Kt,qi,Ss,ch,Fi,ph,Rl,fo,Ds,uh,Po,mh,Rs,hh,fh,Ei,gh,_h,zi,vh,yh,bh,Ws,Lh,Bs,kh,wh,Th,ko,Us,xh,ct,Mh,or,$h,qh,Ci,Fh,Eh,zh,Gt,Ch,Yt,Wl,pt,Xt,Ai,Qs,Ah,Pi,Ph,Bl,io,Vs,jh,Hs,Nh,tr,Ih,Oh,Sh,Ks,Dh,Gs,Rh,Wh,Bh,Jt,Uh,wo,Ys,Qh,ut,Vh,nr,Hh,Kh,ji,Gh,Yh,Xh,Zt,Jh,en,Ul,mt,on,Ni,Xs,Zh,Ii,ef,Ql,Ue,Js,of,Zs,tf,ea,nf,sf,af,oa,rf,sr,lf,df,cf,ta,pf,na,uf,mf,hf,tn,ff,To,sa,gf,ht,_f,ar,vf,yf,Oi,bf,Lf,kf,nn,wf,sn,Vl,ft,an,Si,aa,Tf,Di,xf,Hl,Qe,ra,Mf,go,$f,ia,qf,Ff,la,Ef,zf,da,Cf,Af,ca,Pf,jf,Nf,pa,If,rr,Of,Sf,Df,ua,Rf,ma,Wf,Bf,Uf,rn,Qf,xo,ha,Vf,gt,Hf,ir,Kf,Gf,Ri,Yf,Xf,Jf,ln,Zf,dn,Kl,_t,cn,Wi,fa,eg,Bi,og,Gl,Ve,ga,tg,jo,ng,_a,sg,ag,Ui,rg,ig,Qi,lg,dg,cg,va,pg,lr,ug,mg,hg,ya,fg,ba,gg,_g,vg,pn,yg,Mo,La,bg,vt,Lg,dr,kg,wg,Vi,Tg,xg,Mg,un,$g,mn,Yl;return d=new He({}),$=new He({}),Nn=new He({}),xt=new vo({props:{$$slots:{default:[Vy]},$$scope:{ctx:A}}}),In=new Ag({props:{pipeline:"text-classification"}}),Sn=new Ag({props:{pipeline:"token-classification"}}),Qn=new Ag({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/main/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/main/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/main/src/transformers/models/layoutlmv3/configuration_layoutlmv3.py#L40"}}),Ft=new yt({props:{anchor:"transformers.LayoutLMv3Config.example",$$slots:{default:[Hy]},$$scope:{ctx:A}}}),Yn=new He({}),Xn=new K({props:{name:"class transformers.LayoutLMv3FeatureExtractor",anchor:"transformers.LayoutLMv3FeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/layoutlmv3/feature_extraction_layoutlmv3.py#L28"}}),Jn=new K({props:{name:"__call__",anchor:"transformers.LayoutLMv3FeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L448"}}),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/main/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[transformers.utils.generic.TensorType, str, 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/main/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/main/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[transformers.utils.generic.TensorType, str, 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/main/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/main/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 <code>&gt;= 7.5</code> (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/main/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/main/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/main/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 <code>&gt;= 7.5</code> (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/main/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/main/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/main/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/main/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[transformers.utils.generic.TensorType, str, 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/main/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/main/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 <code>&gt;= 7.5</code> (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/main/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/main/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/main/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 <code>&gt;= 7.5</code> (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/main/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/main/src/transformers/models/layoutlmv3/tokenization_layoutlmv3_fast.py#L224"}}),us=new He({}),ms=new K({props:{name:"class transformers.LayoutLMv3Processor",anchor:"transformers.LayoutLMv3Processor",parameters:[{name:"image_processor",val:" = None"},{name:"tokenizer",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LayoutLMv3Processor.image_processor",description:`<strong>image_processor</strong> (<code>LayoutLMv3ImageProcessor</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor">LayoutLMv3ImageProcessor</a>. The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.LayoutLMv3Processor.tokenizer",description:`<strong>tokenizer</strong> (<code>LayoutLMv3Tokenizer</code> or <code>LayoutLMv3TokenizerFast</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer">LayoutLMv3Tokenizer</a> or <a href="/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3TokenizerFast">LayoutLMv3TokenizerFast</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/layoutlmv3/processing_layoutlmv3.py#L27"}}),hs=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[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/layoutlmv3/processing_layoutlmv3.py#L67"}}),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/main/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/main/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/main/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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L845",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[Ky]},$$scope:{ctx:A}}}),Rt=new yt({props:{anchor:"transformers.LayoutLMv3Model.forward.example",$$slots:{default:[Gy]},$$scope:{ctx:A}}}),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/main/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/main/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/main/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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1302",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[Yy]},$$scope:{ctx:A}}}),Ut=new yt({props:{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.example",$$slots:{default:[Xy]},$$scope:{ctx:A}}}),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/main/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/main/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/main/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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1059",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[Jy]},$$scope:{ctx:A}}}),Ht=new yt({props:{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.example",$$slots:{default:[Zy]},$$scope:{ctx:A}}}),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/main/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/main/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/main/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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1170",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[eb]},$$scope:{ctx:A}}}),Yt=new yt({props:{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.example",$$slots:{default:[ob]},$$scope:{ctx:A}}}),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/main/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/main/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/main/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1143"}}),Jt=new vo({props:{$$slots:{default:[tb]},$$scope:{ctx:A}}}),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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1151",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[nb]},$$scope:{ctx:A}}}),en=new yt({props:{anchor:"transformers.TFLayoutLMv3Model.call.example",$$slots:{default:[sb]},$$scope:{ctx:A}}}),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/main/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/main/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/main/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1268"}}),tn=new vo({props:{$$slots:{default:[ab]},$$scope:{ctx:A}}}),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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1278",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[rb]},$$scope:{ctx:A}}}),sn=new yt({props:{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.example",$$slots:{default:[ib]},$$scope:{ctx:A}}}),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/main/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/main/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/main/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1379"}}),rn=new vo({props:{$$slots:{default:[lb]},$$scope:{ctx:A}}}),ha=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1398",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[db]},$$scope:{ctx:A}}}),dn=new yt({props:{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.example",$$slots:{default:[cb]},$$scope:{ctx:A}}}),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/main/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/main/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/main/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1508"}}),pn=new vo({props:{$$slots:{default:[pb]},$$scope:{ctx:A}}}),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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1520",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[ub]},$$scope:{ctx:A}}}),mn=new yt({props:{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.example",$$slots:{default:[mb]},$$scope:{ctx:A}}}),{c(){c=a("meta"),b=p(),g=a("h1"),_=a("a"),y=a("span"),L(d.$$.fragment),m=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:"),P=p(),me=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 "),he=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."),Ae=p(),I=a("li"),Pe=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"),j=t("LayoutLMv3Processor"),je=t(" which internally combines a "),N=a("a"),Ne=t("LayoutLMv3FeatureExtractor"),Ie=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"),Id=t("Demo scripts can be found "),En=a("a"),Od=t("here"),Sd=t("."),cl=p(),kt=a("img"),pl=p(),wt=a("small"),Dd=t("LayoutLMv3 architecture. Taken from the "),Ma=a("a"),Rd=t("original paper"),Wd=t("."),ul=p(),Ke=a("p"),Bd=t("This model was contributed by "),zn=a("a"),Ud=t("nielsr"),Qd=t(". The TensorFlow version of this model was added by "),Cn=a("a"),Vd=t("chriskoo"),Hd=t(", "),An=a("a"),Kd=t("tokec"),Gd=t(", and "),Pn=a("a"),Yd=t("lre"),Xd=t(". The original code can be found "),jn=a("a"),Jd=t("here"),Zd=t("."),ml=p(),Vo=a("h2"),Tt=a("a"),Mr=a("span"),L(Nn.$$.fragment),ec=p(),$r=a("span"),oc=t("Resources"),hl=p(),$a=a("p"),tc=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."),fl=p(),L(xt.$$.fragment),gl=p(),L(In.$$.fragment),_l=p(),qa=a("ul"),Mt=a("li"),Fa=a("a"),nc=t("LayoutLMv2ForSequenceClassification"),sc=t(" is supported by this "),On=a("a"),ac=t("notebook"),rc=t("."),vl=p(),L(Sn.$$.fragment),yl=p(),Oo=a("ul"),So=a("li"),Ea=a("a"),ic=t("LayoutLMv3ForTokenClassification"),lc=t(" is supported by this "),Dn=a("a"),dc=t("example script"),cc=t(" and "),Rn=a("a"),pc=t("notebook"),uc=t("."),mc=p(),lo=a("li"),hc=t("A "),Wn=a("a"),fc=t("notebook"),gc=t(" for how to perform inference with "),za=a("a"),_c=t("LayoutLMv2ForTokenClassification"),vc=t(" and a "),Bn=a("a"),yc=t("notebook"),bc=t(" for how to perform inference when no labels are available with "),Ca=a("a"),Lc=t("LayoutLMv2ForTokenClassification"),kc=t("."),wc=p(),Ho=a("li"),Tc=t("A "),Un=a("a"),xc=t("notebook"),Mc=t(" for how to finetune "),Aa=a("a"),$c=t("LayoutLMv2ForTokenClassification"),qc=t(" with the \u{1F917} Trainer."),bl=p(),L(Qn.$$.fragment),Ll=p(),Pa=a("ul"),$t=a("li"),ja=a("a"),Fc=t("LayoutLMv2ForQuestionAnswering"),Ec=t(" is supported by this "),Vn=a("a"),zc=t("notebook"),Cc=t("."),kl=p(),Ko=a("h2"),qt=a("a"),qr=a("span"),L(Hn.$$.fragment),Ac=p(),Fr=a("span"),Pc=t("LayoutLMv3Config"),wl=p(),co=a("div"),L(Kn.$$.fragment),jc=p(),Go=a("p"),Nc=t("This is the configuration class to store the configuration of a "),Na=a("a"),Ic=t("LayoutLMv3Model"),Oc=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"),Sc=t("microsoft/layoutlmv3-base"),Dc=t(" architecture."),Rc=p(),Yo=a("p"),Wc=t("Configuration objects inherit from "),Ia=a("a"),Bc=t("PretrainedConfig"),Uc=t(` and can be used to control the model outputs. Read the
documentation from `),Oa=a("a"),Qc=t("PretrainedConfig"),Vc=t(" for more information."),Hc=p(),L(Ft.$$.fragment),Tl=p(),Xo=a("h2"),Et=a("a"),Er=a("span"),L(Yn.$$.fragment),Kc=p(),zr=a("span"),Gc=t("LayoutLMv3FeatureExtractor"),xl=p(),Jo=a("div"),L(Xn.$$.fragment),Yc=p(),zt=a("div"),L(Jn.$$.fragment),Xc=p(),Cr=a("p"),Jc=t("Preprocess an image or a batch of images."),Ml=p(),Zo=a("h2"),Ct=a("a"),Ar=a("span"),L(Zn.$$.fragment),Zc=p(),Pr=a("span"),ep=t("LayoutLMv3ImageProcessor"),$l=p(),Co=a("div"),L(es.$$.fragment),op=p(),jr=a("p"),tp=t("Constructs a LayoutLMv3 image processor."),np=p(),At=a("div"),L(os.$$.fragment),sp=p(),Nr=a("p"),ap=t("Preprocess an image or batch of images."),ql=p(),et=a("h2"),Pt=a("a"),Ir=a("span"),L(ts.$$.fragment),rp=p(),Or=a("span"),ip=t("LayoutLMv3Tokenizer"),Fl=p(),Be=a("div"),L(ns.$$.fragment),lp=p(),Re=a("p"),dp=t("Construct a LayoutLMv3 tokenizer. Based on "),Sr=a("code"),cp=t("RoBERTatokenizer"),pp=t(` (Byte Pair Encoding or BPE).
`),Sa=a("a"),up=t("LayoutLMv3Tokenizer"),mp=t(` can be used to turn words, word-level bounding boxes and optional word labels to
token-level `),Dr=a("code"),hp=t("input_ids"),fp=t(", "),Rr=a("code"),gp=t("attention_mask"),_p=t(", "),Wr=a("code"),vp=t("token_type_ids"),yp=t(", "),Br=a("code"),bp=t("bbox"),Lp=t(", and optional "),Ur=a("code"),kp=t("labels"),wp=t(` (for token
classification).`),Tp=p(),ss=a("p"),xp=t("This tokenizer inherits from "),Da=a("a"),Mp=t("PreTrainedTokenizer"),$p=t(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),qp=p(),Ra=a("p"),Wa=a("a"),Fp=t("LayoutLMv3Tokenizer"),Ep=t(` runs end-to-end tokenization: punctuation splitting and wordpiece. It also turns the
word-level bounding boxes into token-level bounding boxes.`),zp=p(),jt=a("div"),L(as.$$.fragment),Cp=p(),Qr=a("p"),Ap=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.`),Pp=p(),Ba=a("div"),L(rs.$$.fragment),El=p(),ot=a("h2"),Nt=a("a"),Vr=a("span"),L(is.$$.fragment),jp=p(),Hr=a("span"),Np=t("LayoutLMv3TokenizerFast"),zl=p(),po=a("div"),L(ls.$$.fragment),Ip=p(),ds=a("p"),Op=t("Construct a \u201Cfast\u201D LayoutLMv3 tokenizer (backed by HuggingFace\u2019s "),Kr=a("em"),Sp=t("tokenizers"),Dp=t(" library). Based on BPE."),Rp=p(),cs=a("p"),Wp=t("This tokenizer inherits from "),Ua=a("a"),Bp=t("PreTrainedTokenizerFast"),Up=t(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Qp=p(),It=a("div"),L(ps.$$.fragment),Vp=p(),Gr=a("p"),Hp=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.`),Cl=p(),tt=a("h2"),Ot=a("a"),Yr=a("span"),L(us.$$.fragment),Kp=p(),Xr=a("span"),Gp=t("LayoutLMv3Processor"),Al=p(),ro=a("div"),L(ms.$$.fragment),Yp=p(),Jr=a("p"),Xp=t(`Constructs a LayoutLMv3 processor which combines a LayoutLMv3 image processor and a LayoutLMv3 tokenizer into a
single processor.`),Jp=p(),Qa=a("p"),Va=a("a"),Zp=t("LayoutLMv3Processor"),eu=t(" offers all the functionalities you need to prepare data for the model."),ou=p(),ce=a("p"),tu=t("It first uses "),Ha=a("a"),nu=t("LayoutLMv3ImageProcessor"),su=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"),au=t("LayoutLMv3Tokenizer"),ru=t(` or
`),Ga=a("a"),iu=t("LayoutLMv3TokenizerFast"),lu=t(", which turns the words and bounding boxes into token-level "),Zr=a("code"),du=t("input_ids"),cu=t(`,
`),ei=a("code"),pu=t("attention_mask"),uu=t(", "),oi=a("code"),mu=t("token_type_ids"),hu=t(", "),ti=a("code"),fu=t("bbox"),gu=t(". Optionally, one can provide integer "),ni=a("code"),_u=t("word_labels"),vu=t(`, which are turned
into token-level `),si=a("code"),yu=t("labels"),bu=t(" for token classification tasks (such as FUNSD, CORD)."),Lu=p(),Do=a("div"),L(hs.$$.fragment),ku=p(),S=a("p"),wu=t("This method first forwards the "),ai=a("code"),Tu=t("images"),xu=t(" argument to "),fs=a("a"),ri=a("strong"),Mu=t("call"),$u=t("()"),qu=t(`. In case
`),Ya=a("a"),Fu=t("LayoutLMv3ImageProcessor"),Eu=t(" was initialized with "),ii=a("code"),zu=t("apply_ocr"),Cu=t(" set to "),li=a("code"),Au=t("True"),Pu=t(`, it passes the obtained words and
bounding boxes along with the additional arguments to `),gs=a("a"),di=a("strong"),ju=t("call"),Nu=t("()"),Iu=t(` and returns the output,
together with resized and normalized `),ci=a("code"),Ou=t("pixel_values"),Su=t(". In case "),Xa=a("a"),Du=t("LayoutLMv3ImageProcessor"),Ru=t(` was initialized with
`),pi=a("code"),Wu=t("apply_ocr"),Bu=t(" set to "),ui=a("code"),Uu=t("False"),Qu=t(", it passes the words ("),mi=a("code"),Vu=t("text"),Hu=t("/`"),hi=a("code"),Ku=t("text_pair"),Gu=t(") and "),fi=a("code"),Yu=t("boxes"),Xu=t(` specified by the user along
with the additional arguments to `),_s=a("a"),gi=a("strong"),Ju=t("call"),Zu=t("()"),em=t(` and returns the output, together with
resized and normalized `),_i=a("code"),om=t("pixel_values"),tm=t("."),nm=p(),vi=a("p"),sm=t("Please refer to the docstring of the above two methods for more information."),Pl=p(),nt=a("h2"),St=a("a"),yi=a("span"),L(vs.$$.fragment),am=p(),bi=a("span"),rm=t("LayoutLMv3Model"),jl=p(),Ao=a("div"),L(ys.$$.fragment),im=p(),bs=a("p"),lm=t(`The bare LayoutLMv3 Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ls=a("a"),dm=t("torch.nn.Module"),cm=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.`),pm=p(),yo=a("div"),L(ks.$$.fragment),um=p(),st=a("p"),mm=t("The "),Ja=a("a"),hm=t("LayoutLMv3Model"),fm=t(" forward method, overrides the "),Li=a("code"),gm=t("__call__"),_m=t(" special method."),vm=p(),L(Dt.$$.fragment),ym=p(),L(Rt.$$.fragment),Nl=p(),at=a("h2"),Wt=a("a"),ki=a("span"),L(ws.$$.fragment),bm=p(),wi=a("span"),Lm=t("LayoutLMv3ForSequenceClassification"),Il=p(),uo=a("div"),L(Ts.$$.fragment),km=p(),xs=a("p"),wm=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"),Tm=t("RVL-CDIP"),xm=t(" dataset."),Mm=p(),$s=a("p"),$m=t("This model is a PyTorch "),qs=a("a"),qm=t("torch.nn.Module"),Fm=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.`),Em=p(),bo=a("div"),L(Fs.$$.fragment),zm=p(),rt=a("p"),Cm=t("The "),Za=a("a"),Am=t("LayoutLMv3ForSequenceClassification"),Pm=t(" forward method, overrides the "),Ti=a("code"),jm=t("__call__"),Nm=t(" special method."),Im=p(),L(Bt.$$.fragment),Om=p(),L(Ut.$$.fragment),Ol=p(),it=a("h2"),Qt=a("a"),xi=a("span"),L(Es.$$.fragment),Sm=p(),Mi=a("span"),Dm=t("LayoutLMv3ForTokenClassification"),Sl=p(),mo=a("div"),L(zs.$$.fragment),Rm=p(),ho=a("p"),Wm=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"),Bm=t("FUNSD"),Um=t(`,
`),As=a("a"),Qm=t("SROIE"),Vm=t(", "),Ps=a("a"),Hm=t("CORD"),Km=t(` and
`),js=a("a"),Gm=t("Kleister-NDA"),Ym=t("."),Xm=p(),Ns=a("p"),Jm=t("This model is a PyTorch "),Is=a("a"),Zm=t("torch.nn.Module"),eh=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.`),oh=p(),Lo=a("div"),L(Os.$$.fragment),th=p(),lt=a("p"),nh=t("The "),er=a("a"),sh=t("LayoutLMv3ForTokenClassification"),ah=t(" forward method, overrides the "),$i=a("code"),rh=t("__call__"),ih=t(" special method."),lh=p(),L(Vt.$$.fragment),dh=p(),L(Ht.$$.fragment),Dl=p(),dt=a("h2"),Kt=a("a"),qi=a("span"),L(Ss.$$.fragment),ch=p(),Fi=a("span"),ph=t("LayoutLMv3ForQuestionAnswering"),Rl=p(),fo=a("div"),L(Ds.$$.fragment),uh=p(),Po=a("p"),mh=t(`LayoutLMv3 Model with a span classification head on top for extractive question-answering tasks such as
`),Rs=a("a"),hh=t("DocVQA"),fh=t(` (a linear layer on top of the text part of the hidden-states output to
compute `),Ei=a("code"),gh=t("span start logits"),_h=t(" and "),zi=a("code"),vh=t("span end logits"),yh=t(")."),bh=p(),Ws=a("p"),Lh=t("This model is a PyTorch "),Bs=a("a"),kh=t("torch.nn.Module"),wh=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.`),Th=p(),ko=a("div"),L(Us.$$.fragment),xh=p(),ct=a("p"),Mh=t("The "),or=a("a"),$h=t("LayoutLMv3ForQuestionAnswering"),qh=t(" forward method, overrides the "),Ci=a("code"),Fh=t("__call__"),Eh=t(" special method."),zh=p(),L(Gt.$$.fragment),Ch=p(),L(Yt.$$.fragment),Wl=p(),pt=a("h2"),Xt=a("a"),Ai=a("span"),L(Qs.$$.fragment),Ah=p(),Pi=a("span"),Ph=t("TFLayoutLMv3Model"),Bl=p(),io=a("div"),L(Vs.$$.fragment),jh=p(),Hs=a("p"),Nh=t(`The bare LayoutLMv3 Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),tr=a("a"),Ih=t("TFPreTrainedModel"),Oh=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.)`),Sh=p(),Ks=a("p"),Dh=t("This model is also a "),Gs=a("a"),Rh=t("tf.keras.Model"),Wh=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.`),Bh=p(),L(Jt.$$.fragment),Uh=p(),wo=a("div"),L(Ys.$$.fragment),Qh=p(),ut=a("p"),Vh=t("The "),nr=a("a"),Hh=t("TFLayoutLMv3Model"),Kh=t(" forward method, overrides the "),ji=a("code"),Gh=t("__call__"),Yh=t(" special method."),Xh=p(),L(Zt.$$.fragment),Jh=p(),L(en.$$.fragment),Ul=p(),mt=a("h2"),on=a("a"),Ni=a("span"),L(Xs.$$.fragment),Zh=p(),Ii=a("span"),ef=t("TFLayoutLMv3ForSequenceClassification"),Ql=p(),Ue=a("div"),L(Js.$$.fragment),of=p(),Zs=a("p"),tf=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"),nf=t("RVL-CDIP"),sf=t(" dataset."),af=p(),oa=a("p"),rf=t("This model inherits from "),sr=a("a"),lf=t("TFPreTrainedModel"),df=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.)`),cf=p(),ta=a("p"),pf=t("This model is also a "),na=a("a"),uf=t("tf.keras.Model"),mf=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(tn.$$.fragment),ff=p(),To=a("div"),L(sa.$$.fragment),gf=p(),ht=a("p"),_f=t("The "),ar=a("a"),vf=t("TFLayoutLMv3ForSequenceClassification"),yf=t(" forward method, overrides the "),Oi=a("code"),bf=t("__call__"),Lf=t(" special method."),kf=p(),L(nn.$$.fragment),wf=p(),L(sn.$$.fragment),Vl=p(),ft=a("h2"),an=a("a"),Si=a("span"),L(aa.$$.fragment),Tf=p(),Di=a("span"),xf=t("TFLayoutLMv3ForTokenClassification"),Hl=p(),Qe=a("div"),L(ra.$$.fragment),Mf=p(),go=a("p"),$f=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"),qf=t("FUNSD"),Ff=t(`,
`),la=a("a"),Ef=t("SROIE"),zf=t(", "),da=a("a"),Cf=t("CORD"),Af=t(` and
`),ca=a("a"),Pf=t("Kleister-NDA"),jf=t("."),Nf=p(),pa=a("p"),If=t("This model inherits from "),rr=a("a"),Of=t("TFPreTrainedModel"),Sf=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.)`),Df=p(),ua=a("p"),Rf=t("This model is also a "),ma=a("a"),Wf=t("tf.keras.Model"),Bf=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.`),Uf=p(),L(rn.$$.fragment),Qf=p(),xo=a("div"),L(ha.$$.fragment),Vf=p(),gt=a("p"),Hf=t("The "),ir=a("a"),Kf=t("TFLayoutLMv3ForTokenClassification"),Gf=t(" forward method, overrides the "),Ri=a("code"),Yf=t("__call__"),Xf=t(" special method."),Jf=p(),L(ln.$$.fragment),Zf=p(),L(dn.$$.fragment),Kl=p(),_t=a("h2"),cn=a("a"),Wi=a("span"),L(fa.$$.fragment),eg=p(),Bi=a("span"),og=t("TFLayoutLMv3ForQuestionAnswering"),Gl=p(),Ve=a("div"),L(ga.$$.fragment),tg=p(),jo=a("p"),ng=t(`LayoutLMv3 Model with a span classification head on top for extractive question-answering tasks such as
`),_a=a("a"),sg=t("DocVQA"),ag=t(` (a linear layer on top of the text part of the hidden-states output to
compute `),Ui=a("code"),rg=t("span start logits"),ig=t(" and "),Qi=a("code"),lg=t("span end logits"),dg=t(")."),cg=p(),va=a("p"),pg=t("This model inherits from "),lr=a("a"),ug=t("TFPreTrainedModel"),mg=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.)`),hg=p(),ya=a("p"),fg=t("This model is also a "),ba=a("a"),gg=t("tf.keras.Model"),_g=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.`),vg=p(),L(pn.$$.fragment),yg=p(),Mo=a("div"),L(La.$$.fragment),bg=p(),vt=a("p"),Lg=t("The "),dr=a("a"),kg=t("TFLayoutLMv3ForQuestionAnswering"),wg=t(" forward method, overrides the "),Vi=a("code"),Tg=t("__call__"),xg=t(" special method."),Mg=p(),L(un.$$.fragment),$g=p(),L(mn.$$.fragment),this.h()},l(s){const f=By('[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 Hi=i(_);y=r(Hi,"SPAN",{});var Ki=i(y);k(d.$$.fragment,Ki),Ki.forEach(o),Hi.forEach(o),m=u(ka),F=r(ka,"SPAN",{});var Gi=i(F);we=n(Gi,"LayoutLMv3"),Gi.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 Yi=i(ae);se=r(Yi,"SPAN",{});var Xi=i(se);k($.$$.fragment,Xi),Xi.forEach(o),Yi.forEach(o),Te=u(wa),V=r(wa,"SPAN",{});var Ji=i(V);xe=n(Ji,"Overview"),Ji.forEach(o),wa.forEach(o),ve=u(s),O=r(s,"P",{});var No=i(O);Me=n(No,"The LayoutLMv3 model was proposed in "),ie=r(No,"A",{href:!0,rel:!0});var Zi=i(ie);G=n(Zi,"LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking"),Zi.forEach(o),$e=n(No,` by Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu, Furu Wei.
LayoutLMv3 simplifies `),pe=r(No,"A",{href:!0});var el=i(pe);Y=n(el,"LayoutLMv2"),el.forEach(o),qe=n(No," by using patch embeddings (as in "),ue=r(No,"A",{href:!0});var ol=i(ue);X=n(ol,"ViT"),ol.forEach(o),Fe=n(No,`) 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).`),No.forEach(o),ye=u(s),oe=r(s,"P",{});var tl=i(oe);C=n(tl,"The abstract from the paper is the following:"),tl.forEach(o),P=u(s),me=r(s,"P",{});var nl=i(me);H=r(nl,"EM",{});var sl=i(H);Ee=n(sl,"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."),sl.forEach(o),nl.forEach(o),be=u(s),Q=r(s,"P",{});var al=i(Q);ze=n(al,"Tips:"),al.forEach(o),Le=u(s),z=r(s,"UL",{});var Io=i(z);re=r(Io,"LI",{});var hn=i(re);J=n(hn,"In terms of data processing, LayoutLMv3 is identical to its predecessor "),he=r(hn,"A",{href:!0});var rl=i(he);Ce=n(rl,"LayoutLMv2"),rl.forEach(o),Z=n(hn,", except that:"),le=r(hn,"UL",{});var Ta=i(le);fe=r(Ta,"LI",{});var il=i(fe);B=n(il,"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."),il.forEach(o),Ae=u(Ta),I=r(Ta,"LI",{});var _o=i(I);Pe=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 jg=i(te);j=n(jg,"LayoutLMv3Processor"),jg.forEach(o),je=n(_o," which internally combines a "),N=r(_o,"A",{href:!0});var Ng=i(N);Ne=n(Ng,"LayoutLMv3FeatureExtractor"),Ng.forEach(o),Ie=n(_o," (for the image modality) and a "),v=r(_o,"A",{href:!0});var Ig=i(v);q=n(Ig,"LayoutLMv3Tokenizer"),Ig.forEach(o),Ye=n(_o,"/"),ne=r(_o,"A",{href:!0});var Og=i(ne);Xe=n(Og,"LayoutLMv3TokenizerFast"),Og.forEach(o),Je=n(_o," (for the text modality) to prepare all data for the model."),_o.forEach(o),Ta.forEach(o),hn.forEach(o),E=u(Io),ge=r(Io,"LI",{});var cr=i(ge);Ze=n(cr,"Regarding usage of "),We=r(cr,"A",{href:!0});var Sg=i(We);eo=n(Sg,"LayoutLMv3Processor"),Sg.forEach(o),oo=n(cr,", we refer to the "),D=r(cr,"A",{href:!0});var Dg=i(D);ee=n(Dg,"usage guide"),Dg.forEach(o),to=n(cr," of its predecessor."),cr.forEach(o),no=u(Io),U=r(Io,"LI",{});var Xl=i(U);so=n(Xl,"Demo notebooks for LayoutLMv3 can be found "),Oe=r(Xl,"A",{href:!0,rel:!0});var Rg=i(Oe);Se=n(Rg,"here"),Rg.forEach(o),ao=n(Xl,"."),Xl.forEach(o),de=u(Io),De=r(Io,"LI",{});var Jl=i(De);Id=n(Jl,"Demo scripts can be found "),En=r(Jl,"A",{href:!0,rel:!0});var Wg=i(En);Od=n(Wg,"here"),Wg.forEach(o),Sd=n(Jl,"."),Jl.forEach(o),Io.forEach(o),cl=u(s),kt=r(s,"IMG",{src:!0,alt:!0,width:!0}),pl=u(s),wt=r(s,"SMALL",{});var Zl=i(wt);Dd=n(Zl,"LayoutLMv3 architecture. Taken from the "),Ma=r(Zl,"A",{href:!0});var Bg=i(Ma);Rd=n(Bg,"original paper"),Bg.forEach(o),Wd=n(Zl,"."),Zl.forEach(o),ul=u(s),Ke=r(s,"P",{});var $o=i(Ke);Bd=n($o,"This model was contributed by "),zn=r($o,"A",{href:!0,rel:!0});var Ug=i(zn);Ud=n(Ug,"nielsr"),Ug.forEach(o),Qd=n($o,". The TensorFlow version of this model was added by "),Cn=r($o,"A",{href:!0,rel:!0});var Qg=i(Cn);Vd=n(Qg,"chriskoo"),Qg.forEach(o),Hd=n($o,", "),An=r($o,"A",{href:!0,rel:!0});var Vg=i(An);Kd=n(Vg,"tokec"),Vg.forEach(o),Gd=n($o,", and "),Pn=r($o,"A",{href:!0,rel:!0});var Hg=i(Pn);Yd=n(Hg,"lre"),Hg.forEach(o),Xd=n($o,". The original code can be found "),jn=r($o,"A",{href:!0,rel:!0});var Kg=i(jn);Jd=n(Kg,"here"),Kg.forEach(o),Zd=n($o,"."),$o.forEach(o),ml=u(s),Vo=r(s,"H2",{class:!0});var ed=i(Vo);Tt=r(ed,"A",{id:!0,class:!0,href:!0});var Gg=i(Tt);Mr=r(Gg,"SPAN",{});var Yg=i(Mr);k(Nn.$$.fragment,Yg),Yg.forEach(o),Gg.forEach(o),ec=u(ed),$r=r(ed,"SPAN",{});var Xg=i($r);oc=n(Xg,"Resources"),Xg.forEach(o),ed.forEach(o),hl=u(s),$a=r(s,"P",{});var Jg=i($a);tc=n(Jg,"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."),Jg.forEach(o),fl=u(s),k(xt.$$.fragment,s),gl=u(s),k(In.$$.fragment,s),_l=u(s),qa=r(s,"UL",{});var Zg=i(qa);Mt=r(Zg,"LI",{});var ll=i(Mt);Fa=r(ll,"A",{href:!0});var e_=i(Fa);nc=n(e_,"LayoutLMv2ForSequenceClassification"),e_.forEach(o),sc=n(ll," is supported by this "),On=r(ll,"A",{href:!0,rel:!0});var o_=i(On);ac=n(o_,"notebook"),o_.forEach(o),rc=n(ll,"."),ll.forEach(o),Zg.forEach(o),vl=u(s),k(Sn.$$.fragment,s),yl=u(s),Oo=r(s,"UL",{});var pr=i(Oo);So=r(pr,"LI",{});var xa=i(So);Ea=r(xa,"A",{href:!0});var t_=i(Ea);ic=n(t_,"LayoutLMv3ForTokenClassification"),t_.forEach(o),lc=n(xa," is supported by this "),Dn=r(xa,"A",{href:!0,rel:!0});var n_=i(Dn);dc=n(n_,"example script"),n_.forEach(o),cc=n(xa," and "),Rn=r(xa,"A",{href:!0,rel:!0});var s_=i(Rn);pc=n(s_,"notebook"),s_.forEach(o),uc=n(xa,"."),xa.forEach(o),mc=u(pr),lo=r(pr,"LI",{});var Ro=i(lo);hc=n(Ro,"A "),Wn=r(Ro,"A",{href:!0,rel:!0});var a_=i(Wn);fc=n(a_,"notebook"),a_.forEach(o),gc=n(Ro," for how to perform inference with "),za=r(Ro,"A",{href:!0});var r_=i(za);_c=n(r_,"LayoutLMv2ForTokenClassification"),r_.forEach(o),vc=n(Ro," and a "),Bn=r(Ro,"A",{href:!0,rel:!0});var i_=i(Bn);yc=n(i_,"notebook"),i_.forEach(o),bc=n(Ro," for how to perform inference when no labels are available with "),Ca=r(Ro,"A",{href:!0});var l_=i(Ca);Lc=n(l_,"LayoutLMv2ForTokenClassification"),l_.forEach(o),kc=n(Ro,"."),Ro.forEach(o),wc=u(pr),Ho=r(pr,"LI",{});var ur=i(Ho);Tc=n(ur,"A "),Un=r(ur,"A",{href:!0,rel:!0});var d_=i(Un);xc=n(d_,"notebook"),d_.forEach(o),Mc=n(ur," for how to finetune "),Aa=r(ur,"A",{href:!0});var c_=i(Aa);$c=n(c_,"LayoutLMv2ForTokenClassification"),c_.forEach(o),qc=n(ur," with the \u{1F917} Trainer."),ur.forEach(o),pr.forEach(o),bl=u(s),k(Qn.$$.fragment,s),Ll=u(s),Pa=r(s,"UL",{});var p_=i(Pa);$t=r(p_,"LI",{});var dl=i($t);ja=r(dl,"A",{href:!0});var u_=i(ja);Fc=n(u_,"LayoutLMv2ForQuestionAnswering"),u_.forEach(o),Ec=n(dl," is supported by this "),Vn=r(dl,"A",{href:!0,rel:!0});var m_=i(Vn);zc=n(m_,"notebook"),m_.forEach(o),Cc=n(dl,"."),dl.forEach(o),p_.forEach(o),kl=u(s),Ko=r(s,"H2",{class:!0});var od=i(Ko);qt=r(od,"A",{id:!0,class:!0,href:!0});var h_=i(qt);qr=r(h_,"SPAN",{});var f_=i(qr);k(Hn.$$.fragment,f_),f_.forEach(o),h_.forEach(o),Ac=u(od),Fr=r(od,"SPAN",{});var g_=i(Fr);Pc=n(g_,"LayoutLMv3Config"),g_.forEach(o),od.forEach(o),wl=u(s),co=r(s,"DIV",{class:!0});var fn=i(co);k(Kn.$$.fragment,fn),jc=u(fn),Go=r(fn,"P",{});var mr=i(Go);Nc=n(mr,"This is the configuration class to store the configuration of a "),Na=r(mr,"A",{href:!0});var __=i(Na);Ic=n(__,"LayoutLMv3Model"),__.forEach(o),Oc=n(mr,`. 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(mr,"A",{href:!0,rel:!0});var v_=i(Gn);Sc=n(v_,"microsoft/layoutlmv3-base"),v_.forEach(o),Dc=n(mr," architecture."),mr.forEach(o),Rc=u(fn),Yo=r(fn,"P",{});var hr=i(Yo);Wc=n(hr,"Configuration objects inherit from "),Ia=r(hr,"A",{href:!0});var y_=i(Ia);Bc=n(y_,"PretrainedConfig"),y_.forEach(o),Uc=n(hr,` and can be used to control the model outputs. Read the
documentation from `),Oa=r(hr,"A",{href:!0});var b_=i(Oa);Qc=n(b_,"PretrainedConfig"),b_.forEach(o),Vc=n(hr," for more information."),hr.forEach(o),Hc=u(fn),k(Ft.$$.fragment,fn),fn.forEach(o),Tl=u(s),Xo=r(s,"H2",{class:!0});var td=i(Xo);Et=r(td,"A",{id:!0,class:!0,href:!0});var L_=i(Et);Er=r(L_,"SPAN",{});var k_=i(Er);k(Yn.$$.fragment,k_),k_.forEach(o),L_.forEach(o),Kc=u(td),zr=r(td,"SPAN",{});var w_=i(zr);Gc=n(w_,"LayoutLMv3FeatureExtractor"),w_.forEach(o),td.forEach(o),xl=u(s),Jo=r(s,"DIV",{class:!0});var nd=i(Jo);k(Xn.$$.fragment,nd),Yc=u(nd),zt=r(nd,"DIV",{class:!0});var sd=i(zt);k(Jn.$$.fragment,sd),Xc=u(sd),Cr=r(sd,"P",{});var T_=i(Cr);Jc=n(T_,"Preprocess an image or a batch of images."),T_.forEach(o),sd.forEach(o),nd.forEach(o),Ml=u(s),Zo=r(s,"H2",{class:!0});var ad=i(Zo);Ct=r(ad,"A",{id:!0,class:!0,href:!0});var x_=i(Ct);Ar=r(x_,"SPAN",{});var M_=i(Ar);k(Zn.$$.fragment,M_),M_.forEach(o),x_.forEach(o),Zc=u(ad),Pr=r(ad,"SPAN",{});var $_=i(Pr);ep=n($_,"LayoutLMv3ImageProcessor"),$_.forEach(o),ad.forEach(o),$l=u(s),Co=r(s,"DIV",{class:!0});var fr=i(Co);k(es.$$.fragment,fr),op=u(fr),jr=r(fr,"P",{});var q_=i(jr);tp=n(q_,"Constructs a LayoutLMv3 image processor."),q_.forEach(o),np=u(fr),At=r(fr,"DIV",{class:!0});var rd=i(At);k(os.$$.fragment,rd),sp=u(rd),Nr=r(rd,"P",{});var F_=i(Nr);ap=n(F_,"Preprocess an image or batch of images."),F_.forEach(o),rd.forEach(o),fr.forEach(o),ql=u(s),et=r(s,"H2",{class:!0});var id=i(et);Pt=r(id,"A",{id:!0,class:!0,href:!0});var E_=i(Pt);Ir=r(E_,"SPAN",{});var z_=i(Ir);k(ts.$$.fragment,z_),z_.forEach(o),E_.forEach(o),rp=u(id),Or=r(id,"SPAN",{});var C_=i(Or);ip=n(C_,"LayoutLMv3Tokenizer"),C_.forEach(o),id.forEach(o),Fl=u(s),Be=r(s,"DIV",{class:!0});var qo=i(Be);k(ns.$$.fragment,qo),lp=u(qo),Re=r(qo,"P",{});var Ge=i(Re);dp=n(Ge,"Construct a LayoutLMv3 tokenizer. Based on "),Sr=r(Ge,"CODE",{});var A_=i(Sr);cp=n(A_,"RoBERTatokenizer"),A_.forEach(o),pp=n(Ge,` (Byte Pair Encoding or BPE).
`),Sa=r(Ge,"A",{href:!0});var P_=i(Sa);up=n(P_,"LayoutLMv3Tokenizer"),P_.forEach(o),mp=n(Ge,` can be used to turn words, word-level bounding boxes and optional word labels to
token-level `),Dr=r(Ge,"CODE",{});var j_=i(Dr);hp=n(j_,"input_ids"),j_.forEach(o),fp=n(Ge,", "),Rr=r(Ge,"CODE",{});var N_=i(Rr);gp=n(N_,"attention_mask"),N_.forEach(o),_p=n(Ge,", "),Wr=r(Ge,"CODE",{});var I_=i(Wr);vp=n(I_,"token_type_ids"),I_.forEach(o),yp=n(Ge,", "),Br=r(Ge,"CODE",{});var O_=i(Br);bp=n(O_,"bbox"),O_.forEach(o),Lp=n(Ge,", and optional "),Ur=r(Ge,"CODE",{});var S_=i(Ur);kp=n(S_,"labels"),S_.forEach(o),wp=n(Ge,` (for token
classification).`),Ge.forEach(o),Tp=u(qo),ss=r(qo,"P",{});var ld=i(ss);xp=n(ld,"This tokenizer inherits from "),Da=r(ld,"A",{href:!0});var D_=i(Da);Mp=n(D_,"PreTrainedTokenizer"),D_.forEach(o),$p=n(ld,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),ld.forEach(o),qp=u(qo),Ra=r(qo,"P",{});var qg=i(Ra);Wa=r(qg,"A",{href:!0});var R_=i(Wa);Fp=n(R_,"LayoutLMv3Tokenizer"),R_.forEach(o),Ep=n(qg,` runs end-to-end tokenization: punctuation splitting and wordpiece. It also turns the
word-level bounding boxes into token-level bounding boxes.`),qg.forEach(o),zp=u(qo),jt=r(qo,"DIV",{class:!0});var dd=i(jt);k(as.$$.fragment,dd),Cp=u(dd),Qr=r(dd,"P",{});var W_=i(Qr);Ap=n(W_,`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.`),W_.forEach(o),dd.forEach(o),Pp=u(qo),Ba=r(qo,"DIV",{class:!0});var B_=i(Ba);k(rs.$$.fragment,B_),B_.forEach(o),qo.forEach(o),El=u(s),ot=r(s,"H2",{class:!0});var cd=i(ot);Nt=r(cd,"A",{id:!0,class:!0,href:!0});var U_=i(Nt);Vr=r(U_,"SPAN",{});var Q_=i(Vr);k(is.$$.fragment,Q_),Q_.forEach(o),U_.forEach(o),jp=u(cd),Hr=r(cd,"SPAN",{});var V_=i(Hr);Np=n(V_,"LayoutLMv3TokenizerFast"),V_.forEach(o),cd.forEach(o),zl=u(s),po=r(s,"DIV",{class:!0});var gn=i(po);k(ls.$$.fragment,gn),Ip=u(gn),ds=r(gn,"P",{});var pd=i(ds);Op=n(pd,"Construct a \u201Cfast\u201D LayoutLMv3 tokenizer (backed by HuggingFace\u2019s "),Kr=r(pd,"EM",{});var H_=i(Kr);Sp=n(H_,"tokenizers"),H_.forEach(o),Dp=n(pd," library). Based on BPE."),pd.forEach(o),Rp=u(gn),cs=r(gn,"P",{});var ud=i(cs);Wp=n(ud,"This tokenizer inherits from "),Ua=r(ud,"A",{href:!0});var K_=i(Ua);Bp=n(K_,"PreTrainedTokenizerFast"),K_.forEach(o),Up=n(ud,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),ud.forEach(o),Qp=u(gn),It=r(gn,"DIV",{class:!0});var md=i(It);k(ps.$$.fragment,md),Vp=u(md),Gr=r(md,"P",{});var G_=i(Gr);Hp=n(G_,`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.`),G_.forEach(o),md.forEach(o),gn.forEach(o),Cl=u(s),tt=r(s,"H2",{class:!0});var hd=i(tt);Ot=r(hd,"A",{id:!0,class:!0,href:!0});var Y_=i(Ot);Yr=r(Y_,"SPAN",{});var X_=i(Yr);k(us.$$.fragment,X_),X_.forEach(o),Y_.forEach(o),Kp=u(hd),Xr=r(hd,"SPAN",{});var J_=i(Xr);Gp=n(J_,"LayoutLMv3Processor"),J_.forEach(o),hd.forEach(o),Al=u(s),ro=r(s,"DIV",{class:!0});var Wo=i(ro);k(ms.$$.fragment,Wo),Yp=u(Wo),Jr=r(Wo,"P",{});var Z_=i(Jr);Xp=n(Z_,`Constructs a LayoutLMv3 processor which combines a LayoutLMv3 image processor and a LayoutLMv3 tokenizer into a
single processor.`),Z_.forEach(o),Jp=u(Wo),Qa=r(Wo,"P",{});var Fg=i(Qa);Va=r(Fg,"A",{href:!0});var ev=i(Va);Zp=n(ev,"LayoutLMv3Processor"),ev.forEach(o),eu=n(Fg," offers all the functionalities you need to prepare data for the model."),Fg.forEach(o),ou=u(Wo),ce=r(Wo,"P",{});var ke=i(ce);tu=n(ke,"It first uses "),Ha=r(ke,"A",{href:!0});var ov=i(Ha);nu=n(ov,"LayoutLMv3ImageProcessor"),ov.forEach(o),su=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 tv=i(Ka);au=n(tv,"LayoutLMv3Tokenizer"),tv.forEach(o),ru=n(ke,` or
`),Ga=r(ke,"A",{href:!0});var nv=i(Ga);iu=n(nv,"LayoutLMv3TokenizerFast"),nv.forEach(o),lu=n(ke,", which turns the words and bounding boxes into token-level "),Zr=r(ke,"CODE",{});var sv=i(Zr);du=n(sv,"input_ids"),sv.forEach(o),cu=n(ke,`,
`),ei=r(ke,"CODE",{});var av=i(ei);pu=n(av,"attention_mask"),av.forEach(o),uu=n(ke,", "),oi=r(ke,"CODE",{});var rv=i(oi);mu=n(rv,"token_type_ids"),rv.forEach(o),hu=n(ke,", "),ti=r(ke,"CODE",{});var iv=i(ti);fu=n(iv,"bbox"),iv.forEach(o),gu=n(ke,". Optionally, one can provide integer "),ni=r(ke,"CODE",{});var lv=i(ni);_u=n(lv,"word_labels"),lv.forEach(o),vu=n(ke,`, which are turned
into token-level `),si=r(ke,"CODE",{});var dv=i(si);yu=n(dv,"labels"),dv.forEach(o),bu=n(ke," for token classification tasks (such as FUNSD, CORD)."),ke.forEach(o),Lu=u(Wo),Do=r(Wo,"DIV",{class:!0});var gr=i(Do);k(hs.$$.fragment,gr),ku=u(gr),S=r(gr,"P",{});var W=i(S);wu=n(W,"This method first forwards the "),ai=r(W,"CODE",{});var cv=i(ai);Tu=n(cv,"images"),cv.forEach(o),xu=n(W," argument to "),fs=r(W,"A",{href:!0});var Eg=i(fs);ri=r(Eg,"STRONG",{});var pv=i(ri);Mu=n(pv,"call"),pv.forEach(o),$u=n(Eg,"()"),Eg.forEach(o),qu=n(W,`. In case
`),Ya=r(W,"A",{href:!0});var uv=i(Ya);Fu=n(uv,"LayoutLMv3ImageProcessor"),uv.forEach(o),Eu=n(W," was initialized with "),ii=r(W,"CODE",{});var mv=i(ii);zu=n(mv,"apply_ocr"),mv.forEach(o),Cu=n(W," set to "),li=r(W,"CODE",{});var hv=i(li);Au=n(hv,"True"),hv.forEach(o),Pu=n(W,`, it passes the obtained words and
bounding boxes along with the additional arguments to `),gs=r(W,"A",{href:!0});var zg=i(gs);di=r(zg,"STRONG",{});var fv=i(di);ju=n(fv,"call"),fv.forEach(o),Nu=n(zg,"()"),zg.forEach(o),Iu=n(W,` and returns the output,
together with resized and normalized `),ci=r(W,"CODE",{});var gv=i(ci);Ou=n(gv,"pixel_values"),gv.forEach(o),Su=n(W,". In case "),Xa=r(W,"A",{href:!0});var _v=i(Xa);Du=n(_v,"LayoutLMv3ImageProcessor"),_v.forEach(o),Ru=n(W,` was initialized with
`),pi=r(W,"CODE",{});var vv=i(pi);Wu=n(vv,"apply_ocr"),vv.forEach(o),Bu=n(W," set to "),ui=r(W,"CODE",{});var yv=i(ui);Uu=n(yv,"False"),yv.forEach(o),Qu=n(W,", it passes the words ("),mi=r(W,"CODE",{});var bv=i(mi);Vu=n(bv,"text"),bv.forEach(o),Hu=n(W,"/`"),hi=r(W,"CODE",{});var Lv=i(hi);Ku=n(Lv,"text_pair"),Lv.forEach(o),Gu=n(W,") and "),fi=r(W,"CODE",{});var kv=i(fi);Yu=n(kv,"boxes"),kv.forEach(o),Xu=n(W,` specified by the user along
with the additional arguments to `),_s=r(W,"A",{href:!0});var Cg=i(_s);gi=r(Cg,"STRONG",{});var wv=i(gi);Ju=n(wv,"call"),wv.forEach(o),Zu=n(Cg,"()"),Cg.forEach(o),em=n(W,` and returns the output, together with
resized and normalized `),_i=r(W,"CODE",{});var Tv=i(_i);om=n(Tv,"pixel_values"),Tv.forEach(o),tm=n(W,"."),W.forEach(o),nm=u(gr),vi=r(gr,"P",{});var xv=i(vi);sm=n(xv,"Please refer to the docstring of the above two methods for more information."),xv.forEach(o),gr.forEach(o),Wo.forEach(o),Pl=u(s),nt=r(s,"H2",{class:!0});var fd=i(nt);St=r(fd,"A",{id:!0,class:!0,href:!0});var Mv=i(St);yi=r(Mv,"SPAN",{});var $v=i(yi);k(vs.$$.fragment,$v),$v.forEach(o),Mv.forEach(o),am=u(fd),bi=r(fd,"SPAN",{});var qv=i(bi);rm=n(qv,"LayoutLMv3Model"),qv.forEach(o),fd.forEach(o),jl=u(s),Ao=r(s,"DIV",{class:!0});var _r=i(Ao);k(ys.$$.fragment,_r),im=u(_r),bs=r(_r,"P",{});var gd=i(bs);lm=n(gd,`The bare LayoutLMv3 Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ls=r(gd,"A",{href:!0,rel:!0});var Fv=i(Ls);dm=n(Fv,"torch.nn.Module"),Fv.forEach(o),cm=n(gd,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),gd.forEach(o),pm=u(_r),yo=r(_r,"DIV",{class:!0});var _n=i(yo);k(ks.$$.fragment,_n),um=u(_n),st=r(_n,"P",{});var vr=i(st);mm=n(vr,"The "),Ja=r(vr,"A",{href:!0});var Ev=i(Ja);hm=n(Ev,"LayoutLMv3Model"),Ev.forEach(o),fm=n(vr," forward method, overrides the "),Li=r(vr,"CODE",{});var zv=i(Li);gm=n(zv,"__call__"),zv.forEach(o),_m=n(vr," special method."),vr.forEach(o),vm=u(_n),k(Dt.$$.fragment,_n),ym=u(_n),k(Rt.$$.fragment,_n),_n.forEach(o),_r.forEach(o),Nl=u(s),at=r(s,"H2",{class:!0});var _d=i(at);Wt=r(_d,"A",{id:!0,class:!0,href:!0});var Cv=i(Wt);ki=r(Cv,"SPAN",{});var Av=i(ki);k(ws.$$.fragment,Av),Av.forEach(o),Cv.forEach(o),bm=u(_d),wi=r(_d,"SPAN",{});var Pv=i(wi);Lm=n(Pv,"LayoutLMv3ForSequenceClassification"),Pv.forEach(o),_d.forEach(o),Il=u(s),uo=r(s,"DIV",{class:!0});var vn=i(uo);k(Ts.$$.fragment,vn),km=u(vn),xs=r(vn,"P",{});var vd=i(xs);wm=n(vd,`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(vd,"A",{href:!0,rel:!0});var jv=i(Ms);Tm=n(jv,"RVL-CDIP"),jv.forEach(o),xm=n(vd," dataset."),vd.forEach(o),Mm=u(vn),$s=r(vn,"P",{});var yd=i($s);$m=n(yd,"This model is a PyTorch "),qs=r(yd,"A",{href:!0,rel:!0});var Nv=i(qs);qm=n(Nv,"torch.nn.Module"),Nv.forEach(o),Fm=n(yd,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),yd.forEach(o),Em=u(vn),bo=r(vn,"DIV",{class:!0});var yn=i(bo);k(Fs.$$.fragment,yn),zm=u(yn),rt=r(yn,"P",{});var yr=i(rt);Cm=n(yr,"The "),Za=r(yr,"A",{href:!0});var Iv=i(Za);Am=n(Iv,"LayoutLMv3ForSequenceClassification"),Iv.forEach(o),Pm=n(yr," forward method, overrides the "),Ti=r(yr,"CODE",{});var Ov=i(Ti);jm=n(Ov,"__call__"),Ov.forEach(o),Nm=n(yr," special method."),yr.forEach(o),Im=u(yn),k(Bt.$$.fragment,yn),Om=u(yn),k(Ut.$$.fragment,yn),yn.forEach(o),vn.forEach(o),Ol=u(s),it=r(s,"H2",{class:!0});var bd=i(it);Qt=r(bd,"A",{id:!0,class:!0,href:!0});var Sv=i(Qt);xi=r(Sv,"SPAN",{});var Dv=i(xi);k(Es.$$.fragment,Dv),Dv.forEach(o),Sv.forEach(o),Sm=u(bd),Mi=r(bd,"SPAN",{});var Rv=i(Mi);Dm=n(Rv,"LayoutLMv3ForTokenClassification"),Rv.forEach(o),bd.forEach(o),Sl=u(s),mo=r(s,"DIV",{class:!0});var bn=i(mo);k(zs.$$.fragment,bn),Rm=u(bn),ho=r(bn,"P",{});var Bo=i(ho);Wm=n(Bo,`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(Bo,"A",{href:!0,rel:!0});var Wv=i(Cs);Bm=n(Wv,"FUNSD"),Wv.forEach(o),Um=n(Bo,`,
`),As=r(Bo,"A",{href:!0,rel:!0});var Bv=i(As);Qm=n(Bv,"SROIE"),Bv.forEach(o),Vm=n(Bo,", "),Ps=r(Bo,"A",{href:!0,rel:!0});var Uv=i(Ps);Hm=n(Uv,"CORD"),Uv.forEach(o),Km=n(Bo,` and
`),js=r(Bo,"A",{href:!0,rel:!0});var Qv=i(js);Gm=n(Qv,"Kleister-NDA"),Qv.forEach(o),Ym=n(Bo,"."),Bo.forEach(o),Xm=u(bn),Ns=r(bn,"P",{});var Ld=i(Ns);Jm=n(Ld,"This model is a PyTorch "),Is=r(Ld,"A",{href:!0,rel:!0});var Vv=i(Is);Zm=n(Vv,"torch.nn.Module"),Vv.forEach(o),eh=n(Ld,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ld.forEach(o),oh=u(bn),Lo=r(bn,"DIV",{class:!0});var Ln=i(Lo);k(Os.$$.fragment,Ln),th=u(Ln),lt=r(Ln,"P",{});var br=i(lt);nh=n(br,"The "),er=r(br,"A",{href:!0});var Hv=i(er);sh=n(Hv,"LayoutLMv3ForTokenClassification"),Hv.forEach(o),ah=n(br," forward method, overrides the "),$i=r(br,"CODE",{});var Kv=i($i);rh=n(Kv,"__call__"),Kv.forEach(o),ih=n(br," special method."),br.forEach(o),lh=u(Ln),k(Vt.$$.fragment,Ln),dh=u(Ln),k(Ht.$$.fragment,Ln),Ln.forEach(o),bn.forEach(o),Dl=u(s),dt=r(s,"H2",{class:!0});var kd=i(dt);Kt=r(kd,"A",{id:!0,class:!0,href:!0});var Gv=i(Kt);qi=r(Gv,"SPAN",{});var Yv=i(qi);k(Ss.$$.fragment,Yv),Yv.forEach(o),Gv.forEach(o),ch=u(kd),Fi=r(kd,"SPAN",{});var Xv=i(Fi);ph=n(Xv,"LayoutLMv3ForQuestionAnswering"),Xv.forEach(o),kd.forEach(o),Rl=u(s),fo=r(s,"DIV",{class:!0});var kn=i(fo);k(Ds.$$.fragment,kn),uh=u(kn),Po=r(kn,"P",{});var wn=i(Po);mh=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 Jv=i(Rs);hh=n(Jv,"DocVQA"),Jv.forEach(o),fh=n(wn,` (a linear layer on top of the text part of the hidden-states output to
compute `),Ei=r(wn,"CODE",{});var Zv=i(Ei);gh=n(Zv,"span start logits"),Zv.forEach(o),_h=n(wn," and "),zi=r(wn,"CODE",{});var ey=i(zi);vh=n(ey,"span end logits"),ey.forEach(o),yh=n(wn,")."),wn.forEach(o),bh=u(kn),Ws=r(kn,"P",{});var wd=i(Ws);Lh=n(wd,"This model is a PyTorch "),Bs=r(wd,"A",{href:!0,rel:!0});var oy=i(Bs);kh=n(oy,"torch.nn.Module"),oy.forEach(o),wh=n(wd,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),wd.forEach(o),Th=u(kn),ko=r(kn,"DIV",{class:!0});var Tn=i(ko);k(Us.$$.fragment,Tn),xh=u(Tn),ct=r(Tn,"P",{});var Lr=i(ct);Mh=n(Lr,"The "),or=r(Lr,"A",{href:!0});var ty=i(or);$h=n(ty,"LayoutLMv3ForQuestionAnswering"),ty.forEach(o),qh=n(Lr," forward method, overrides the "),Ci=r(Lr,"CODE",{});var ny=i(Ci);Fh=n(ny,"__call__"),ny.forEach(o),Eh=n(Lr," special method."),Lr.forEach(o),zh=u(Tn),k(Gt.$$.fragment,Tn),Ch=u(Tn),k(Yt.$$.fragment,Tn),Tn.forEach(o),kn.forEach(o),Wl=u(s),pt=r(s,"H2",{class:!0});var Td=i(pt);Xt=r(Td,"A",{id:!0,class:!0,href:!0});var sy=i(Xt);Ai=r(sy,"SPAN",{});var ay=i(Ai);k(Qs.$$.fragment,ay),ay.forEach(o),sy.forEach(o),Ah=u(Td),Pi=r(Td,"SPAN",{});var ry=i(Pi);Ph=n(ry,"TFLayoutLMv3Model"),ry.forEach(o),Td.forEach(o),Bl=u(s),io=r(s,"DIV",{class:!0});var Uo=i(io);k(Vs.$$.fragment,Uo),jh=u(Uo),Hs=r(Uo,"P",{});var xd=i(Hs);Nh=n(xd,`The bare LayoutLMv3 Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),tr=r(xd,"A",{href:!0});var iy=i(tr);Ih=n(iy,"TFPreTrainedModel"),iy.forEach(o),Oh=n(xd,`. 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.)`),xd.forEach(o),Sh=u(Uo),Ks=r(Uo,"P",{});var Md=i(Ks);Dh=n(Md,"This model is also a "),Gs=r(Md,"A",{href:!0,rel:!0});var ly=i(Gs);Rh=n(ly,"tf.keras.Model"),ly.forEach(o),Wh=n(Md,` 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.`),Md.forEach(o),Bh=u(Uo),k(Jt.$$.fragment,Uo),Uh=u(Uo),wo=r(Uo,"DIV",{class:!0});var xn=i(wo);k(Ys.$$.fragment,xn),Qh=u(xn),ut=r(xn,"P",{});var kr=i(ut);Vh=n(kr,"The "),nr=r(kr,"A",{href:!0});var dy=i(nr);Hh=n(dy,"TFLayoutLMv3Model"),dy.forEach(o),Kh=n(kr," forward method, overrides the "),ji=r(kr,"CODE",{});var cy=i(ji);Gh=n(cy,"__call__"),cy.forEach(o),Yh=n(kr," special method."),kr.forEach(o),Xh=u(xn),k(Zt.$$.fragment,xn),Jh=u(xn),k(en.$$.fragment,xn),xn.forEach(o),Uo.forEach(o),Ul=u(s),mt=r(s,"H2",{class:!0});var $d=i(mt);on=r($d,"A",{id:!0,class:!0,href:!0});var py=i(on);Ni=r(py,"SPAN",{});var uy=i(Ni);k(Xs.$$.fragment,uy),uy.forEach(o),py.forEach(o),Zh=u($d),Ii=r($d,"SPAN",{});var my=i(Ii);ef=n(my,"TFLayoutLMv3ForSequenceClassification"),my.forEach(o),$d.forEach(o),Ql=u(s),Ue=r(s,"DIV",{class:!0});var Fo=i(Ue);k(Js.$$.fragment,Fo),of=u(Fo),Zs=r(Fo,"P",{});var qd=i(Zs);tf=n(qd,`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(qd,"A",{href:!0,rel:!0});var hy=i(ea);nf=n(hy,"RVL-CDIP"),hy.forEach(o),sf=n(qd," dataset."),qd.forEach(o),af=u(Fo),oa=r(Fo,"P",{});var Fd=i(oa);rf=n(Fd,"This model inherits from "),sr=r(Fd,"A",{href:!0});var fy=i(sr);lf=n(fy,"TFPreTrainedModel"),fy.forEach(o),df=n(Fd,`. 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.)`),Fd.forEach(o),cf=u(Fo),ta=r(Fo,"P",{});var Ed=i(ta);pf=n(Ed,"This model is also a "),na=r(Ed,"A",{href:!0,rel:!0});var gy=i(na);uf=n(gy,"tf.keras.Model"),gy.forEach(o),mf=n(Ed,` 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.`),Ed.forEach(o),hf=u(Fo),k(tn.$$.fragment,Fo),ff=u(Fo),To=r(Fo,"DIV",{class:!0});var Mn=i(To);k(sa.$$.fragment,Mn),gf=u(Mn),ht=r(Mn,"P",{});var wr=i(ht);_f=n(wr,"The "),ar=r(wr,"A",{href:!0});var _y=i(ar);vf=n(_y,"TFLayoutLMv3ForSequenceClassification"),_y.forEach(o),yf=n(wr," forward method, overrides the "),Oi=r(wr,"CODE",{});var vy=i(Oi);bf=n(vy,"__call__"),vy.forEach(o),Lf=n(wr," special method."),wr.forEach(o),kf=u(Mn),k(nn.$$.fragment,Mn),wf=u(Mn),k(sn.$$.fragment,Mn),Mn.forEach(o),Fo.forEach(o),Vl=u(s),ft=r(s,"H2",{class:!0});var zd=i(ft);an=r(zd,"A",{id:!0,class:!0,href:!0});var yy=i(an);Si=r(yy,"SPAN",{});var by=i(Si);k(aa.$$.fragment,by),by.forEach(o),yy.forEach(o),Tf=u(zd),Di=r(zd,"SPAN",{});var Ly=i(Di);xf=n(Ly,"TFLayoutLMv3ForTokenClassification"),Ly.forEach(o),zd.forEach(o),Hl=u(s),Qe=r(s,"DIV",{class:!0});var Eo=i(Qe);k(ra.$$.fragment,Eo),Mf=u(Eo),go=r(Eo,"P",{});var Qo=i(go);$f=n(Qo,`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(Qo,"A",{href:!0,rel:!0});var ky=i(ia);qf=n(ky,"FUNSD"),ky.forEach(o),Ff=n(Qo,`,
`),la=r(Qo,"A",{href:!0,rel:!0});var wy=i(la);Ef=n(wy,"SROIE"),wy.forEach(o),zf=n(Qo,", "),da=r(Qo,"A",{href:!0,rel:!0});var Ty=i(da);Cf=n(Ty,"CORD"),Ty.forEach(o),Af=n(Qo,` and
`),ca=r(Qo,"A",{href:!0,rel:!0});var xy=i(ca);Pf=n(xy,"Kleister-NDA"),xy.forEach(o),jf=n(Qo,"."),Qo.forEach(o),Nf=u(Eo),pa=r(Eo,"P",{});var Cd=i(pa);If=n(Cd,"This model inherits from "),rr=r(Cd,"A",{href:!0});var My=i(rr);Of=n(My,"TFPreTrainedModel"),My.forEach(o),Sf=n(Cd,`. 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.)`),Cd.forEach(o),Df=u(Eo),ua=r(Eo,"P",{});var Ad=i(ua);Rf=n(Ad,"This model is also a "),ma=r(Ad,"A",{href:!0,rel:!0});var $y=i(ma);Wf=n($y,"tf.keras.Model"),$y.forEach(o),Bf=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),Uf=u(Eo),k(rn.$$.fragment,Eo),Qf=u(Eo),xo=r(Eo,"DIV",{class:!0});var $n=i(xo);k(ha.$$.fragment,$n),Vf=u($n),gt=r($n,"P",{});var Tr=i(gt);Hf=n(Tr,"The "),ir=r(Tr,"A",{href:!0});var qy=i(ir);Kf=n(qy,"TFLayoutLMv3ForTokenClassification"),qy.forEach(o),Gf=n(Tr," forward method, overrides the "),Ri=r(Tr,"CODE",{});var Fy=i(Ri);Yf=n(Fy,"__call__"),Fy.forEach(o),Xf=n(Tr," special method."),Tr.forEach(o),Jf=u($n),k(ln.$$.fragment,$n),Zf=u($n),k(dn.$$.fragment,$n),$n.forEach(o),Eo.forEach(o),Kl=u(s),_t=r(s,"H2",{class:!0});var Pd=i(_t);cn=r(Pd,"A",{id:!0,class:!0,href:!0});var Ey=i(cn);Wi=r(Ey,"SPAN",{});var zy=i(Wi);k(fa.$$.fragment,zy),zy.forEach(o),Ey.forEach(o),eg=u(Pd),Bi=r(Pd,"SPAN",{});var Cy=i(Bi);og=n(Cy,"TFLayoutLMv3ForQuestionAnswering"),Cy.forEach(o),Pd.forEach(o),Gl=u(s),Ve=r(s,"DIV",{class:!0});var zo=i(Ve);k(ga.$$.fragment,zo),tg=u(zo),jo=r(zo,"P",{});var qn=i(jo);ng=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 Ay=i(_a);sg=n(Ay,"DocVQA"),Ay.forEach(o),ag=n(qn,` (a linear layer on top of the text part of the hidden-states output to
compute `),Ui=r(qn,"CODE",{});var Py=i(Ui);rg=n(Py,"span start logits"),Py.forEach(o),ig=n(qn," and "),Qi=r(qn,"CODE",{});var jy=i(Qi);lg=n(jy,"span end logits"),jy.forEach(o),dg=n(qn,")."),qn.forEach(o),cg=u(zo),va=r(zo,"P",{});var jd=i(va);pg=n(jd,"This model inherits from "),lr=r(jd,"A",{href:!0});var Ny=i(lr);ug=n(Ny,"TFPreTrainedModel"),Ny.forEach(o),mg=n(jd,`. 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.)`),jd.forEach(o),hg=u(zo),ya=r(zo,"P",{});var Nd=i(ya);fg=n(Nd,"This model is also a "),ba=r(Nd,"A",{href:!0,rel:!0});var Iy=i(ba);gg=n(Iy,"tf.keras.Model"),Iy.forEach(o),_g=n(Nd,` 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.`),Nd.forEach(o),vg=u(zo),k(pn.$$.fragment,zo),yg=u(zo),Mo=r(zo,"DIV",{class:!0});var Fn=i(Mo);k(La.$$.fragment,Fn),bg=u(Fn),vt=r(Fn,"P",{});var xr=i(vt);Lg=n(xr,"The "),dr=r(xr,"A",{href:!0});var Oy=i(dr);kg=n(Oy,"TFLayoutLMv3ForQuestionAnswering"),Oy.forEach(o),wg=n(xr," forward method, overrides the "),Vi=r(xr,"CODE",{});var Sy=i(Vi);Tg=n(Sy,"__call__"),Sy.forEach(o),xg=n(xr," special method."),xr.forEach(o),Mg=u(Fn),k(un.$$.fragment,Fn),$g=u(Fn),k(mn.$$.fragment,Fn),Fn.forEach(o),zo.forEach(o),this.h()},h(){l(c,"name","hf:doc:metadata"),l(c,"content",JSON.stringify(fb)),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(he,"href","layoutlmv2"),l(te,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Processor"),l(N,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3FeatureExtractor"),l(v,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer"),l(ne,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3TokenizerFast"),l(We,"href","/docs/transformers/main/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"),Uy(kt.src,Pg="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/layoutlmv3_architecture.png")||l(kt,"src",Pg),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(An,"href","https://huggingface.co/tokec"),l(An,"rel","nofollow"),l(Pn,"href","https://huggingface.co/lre"),l(Pn,"rel","nofollow"),l(jn,"href","https://github.com/microsoft/unilm/tree/master/layoutlmv3"),l(jn,"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(Vo,"class","relative group"),l(Fa,"href","/docs/transformers/main/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/main/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/main/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/main/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(Aa,"href","/docs/transformers/main/en/model_doc/layoutlmv2#transformers.LayoutLMv2ForTokenClassification"),l(ja,"href","/docs/transformers/main/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(Ko,"class","relative group"),l(Na,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Model"),l(Gn,"href","https://huggingface.co/microsoft/layoutlmv3-base"),l(Gn,"rel","nofollow"),l(Ia,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l(Oa,"href","/docs/transformers/main/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.LayoutLMv3FeatureExtractor"),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.LayoutLMv3FeatureExtractor"),l(Xo,"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(Jo,"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(At,"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(Pt,"id","transformers.LayoutLMv3Tokenizer"),l(Pt,"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(Pt,"href","#transformers.LayoutLMv3Tokenizer"),l(et,"class","relative group"),l(Sa,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer"),l(Da,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Wa,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer"),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(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/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),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(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/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Processor"),l(Ha,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor"),l(Ka,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer"),l(Ga,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3TokenizerFast"),l(fs,"href","/docs/transformers/main/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__call__"),l(Ya,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor"),l(gs,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer.__call__"),l(Xa,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor"),l(_s,"href","/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer.__call__"),l(Do,"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/main/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/main/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(As,"href","https://rrc.cvc.uab.es/?ch=13"),l(As,"rel","nofollow"),l(Ps,"href","https://github.com/clovaai/cord"),l(Ps,"rel","nofollow"),l(js,"href","https://github.com/applicaai/kleister-nda"),l(js,"rel","nofollow"),l(Is,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Is,"rel","nofollow"),l(er,"href","/docs/transformers/main/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(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(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/main/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/main/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/main/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(mt,"class","relative group"),l(ea,"href","https://www.cs.cmu.edu/~aharley/rvl-cdip/"),l(ea,"rel","nofollow"),l(sr,"href","/docs/transformers/main/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/main/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/main/en/main_classes/model#transformers.TFPreTrainedModel"),l(ma,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(ma,"rel","nofollow"),l(ir,"href","/docs/transformers/main/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/main/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/main/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),h(s,b,f),h(s,g,f),e(g,_),e(_,y),w(d,y,null),e(g,m),e(g,F),e(F,we),h(s,_e,f),h(s,R,f),e(R,ae),e(ae,se),w($,se,null),e(R,Te),e(R,V),e(V,xe),h(s,ve,f),h(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),h(s,ye,f),h(s,oe,f),e(oe,C),h(s,P,f),h(s,me,f),e(me,H),e(H,Ee),h(s,be,f),h(s,Q,f),e(Q,ze),h(s,Le,f),h(s,z,f),e(z,re),e(re,J),e(re,he),e(he,Ce),e(re,Z),e(re,le),e(le,fe),e(fe,B),e(le,Ae),e(le,I),e(I,Pe),e(I,te),e(te,j),e(I,je),e(I,N),e(N,Ne),e(I,Ie),e(I,v),e(v,q),e(I,Ye),e(I,ne),e(ne,Xe),e(I,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,Id),e(De,En),e(En,Od),e(De,Sd),h(s,cl,f),h(s,kt,f),h(s,pl,f),h(s,wt,f),e(wt,Dd),e(wt,Ma),e(Ma,Rd),e(wt,Wd),h(s,ul,f),h(s,Ke,f),e(Ke,Bd),e(Ke,zn),e(zn,Ud),e(Ke,Qd),e(Ke,Cn),e(Cn,Vd),e(Ke,Hd),e(Ke,An),e(An,Kd),e(Ke,Gd),e(Ke,Pn),e(Pn,Yd),e(Ke,Xd),e(Ke,jn),e(jn,Jd),e(Ke,Zd),h(s,ml,f),h(s,Vo,f),e(Vo,Tt),e(Tt,Mr),w(Nn,Mr,null),e(Vo,ec),e(Vo,$r),e($r,oc),h(s,hl,f),h(s,$a,f),e($a,tc),h(s,fl,f),w(xt,s,f),h(s,gl,f),w(In,s,f),h(s,_l,f),h(s,qa,f),e(qa,Mt),e(Mt,Fa),e(Fa,nc),e(Mt,sc),e(Mt,On),e(On,ac),e(Mt,rc),h(s,vl,f),w(Sn,s,f),h(s,yl,f),h(s,Oo,f),e(Oo,So),e(So,Ea),e(Ea,ic),e(So,lc),e(So,Dn),e(Dn,dc),e(So,cc),e(So,Rn),e(Rn,pc),e(So,uc),e(Oo,mc),e(Oo,lo),e(lo,hc),e(lo,Wn),e(Wn,fc),e(lo,gc),e(lo,za),e(za,_c),e(lo,vc),e(lo,Bn),e(Bn,yc),e(lo,bc),e(lo,Ca),e(Ca,Lc),e(lo,kc),e(Oo,wc),e(Oo,Ho),e(Ho,Tc),e(Ho,Un),e(Un,xc),e(Ho,Mc),e(Ho,Aa),e(Aa,$c),e(Ho,qc),h(s,bl,f),w(Qn,s,f),h(s,Ll,f),h(s,Pa,f),e(Pa,$t),e($t,ja),e(ja,Fc),e($t,Ec),e($t,Vn),e(Vn,zc),e($t,Cc),h(s,kl,f),h(s,Ko,f),e(Ko,qt),e(qt,qr),w(Hn,qr,null),e(Ko,Ac),e(Ko,Fr),e(Fr,Pc),h(s,wl,f),h(s,co,f),w(Kn,co,null),e(co,jc),e(co,Go),e(Go,Nc),e(Go,Na),e(Na,Ic),e(Go,Oc),e(Go,Gn),e(Gn,Sc),e(Go,Dc),e(co,Rc),e(co,Yo),e(Yo,Wc),e(Yo,Ia),e(Ia,Bc),e(Yo,Uc),e(Yo,Oa),e(Oa,Qc),e(Yo,Vc),e(co,Hc),w(Ft,co,null),h(s,Tl,f),h(s,Xo,f),e(Xo,Et),e(Et,Er),w(Yn,Er,null),e(Xo,Kc),e(Xo,zr),e(zr,Gc),h(s,xl,f),h(s,Jo,f),w(Xn,Jo,null),e(Jo,Yc),e(Jo,zt),w(Jn,zt,null),e(zt,Xc),e(zt,Cr),e(Cr,Jc),h(s,Ml,f),h(s,Zo,f),e(Zo,Ct),e(Ct,Ar),w(Zn,Ar,null),e(Zo,Zc),e(Zo,Pr),e(Pr,ep),h(s,$l,f),h(s,Co,f),w(es,Co,null),e(Co,op),e(Co,jr),e(jr,tp),e(Co,np),e(Co,At),w(os,At,null),e(At,sp),e(At,Nr),e(Nr,ap),h(s,ql,f),h(s,et,f),e(et,Pt),e(Pt,Ir),w(ts,Ir,null),e(et,rp),e(et,Or),e(Or,ip),h(s,Fl,f),h(s,Be,f),w(ns,Be,null),e(Be,lp),e(Be,Re),e(Re,dp),e(Re,Sr),e(Sr,cp),e(Re,pp),e(Re,Sa),e(Sa,up),e(Re,mp),e(Re,Dr),e(Dr,hp),e(Re,fp),e(Re,Rr),e(Rr,gp),e(Re,_p),e(Re,Wr),e(Wr,vp),e(Re,yp),e(Re,Br),e(Br,bp),e(Re,Lp),e(Re,Ur),e(Ur,kp),e(Re,wp),e(Be,Tp),e(Be,ss),e(ss,xp),e(ss,Da),e(Da,Mp),e(ss,$p),e(Be,qp),e(Be,Ra),e(Ra,Wa),e(Wa,Fp),e(Ra,Ep),e(Be,zp),e(Be,jt),w(as,jt,null),e(jt,Cp),e(jt,Qr),e(Qr,Ap),e(Be,Pp),e(Be,Ba),w(rs,Ba,null),h(s,El,f),h(s,ot,f),e(ot,Nt),e(Nt,Vr),w(is,Vr,null),e(ot,jp),e(ot,Hr),e(Hr,Np),h(s,zl,f),h(s,po,f),w(ls,po,null),e(po,Ip),e(po,ds),e(ds,Op),e(ds,Kr),e(Kr,Sp),e(ds,Dp),e(po,Rp),e(po,cs),e(cs,Wp),e(cs,Ua),e(Ua,Bp),e(cs,Up),e(po,Qp),e(po,It),w(ps,It,null),e(It,Vp),e(It,Gr),e(Gr,Hp),h(s,Cl,f),h(s,tt,f),e(tt,Ot),e(Ot,Yr),w(us,Yr,null),e(tt,Kp),e(tt,Xr),e(Xr,Gp),h(s,Al,f),h(s,ro,f),w(ms,ro,null),e(ro,Yp),e(ro,Jr),e(Jr,Xp),e(ro,Jp),e(ro,Qa),e(Qa,Va),e(Va,Zp),e(Qa,eu),e(ro,ou),e(ro,ce),e(ce,tu),e(ce,Ha),e(Ha,nu),e(ce,su),e(ce,Ka),e(Ka,au),e(ce,ru),e(ce,Ga),e(Ga,iu),e(ce,lu),e(ce,Zr),e(Zr,du),e(ce,cu),e(ce,ei),e(ei,pu),e(ce,uu),e(ce,oi),e(oi,mu),e(ce,hu),e(ce,ti),e(ti,fu),e(ce,gu),e(ce,ni),e(ni,_u),e(ce,vu),e(ce,si),e(si,yu),e(ce,bu),e(ro,Lu),e(ro,Do),w(hs,Do,null),e(Do,ku),e(Do,S),e(S,wu),e(S,ai),e(ai,Tu),e(S,xu),e(S,fs),e(fs,ri),e(ri,Mu),e(fs,$u),e(S,qu),e(S,Ya),e(Ya,Fu),e(S,Eu),e(S,ii),e(ii,zu),e(S,Cu),e(S,li),e(li,Au),e(S,Pu),e(S,gs),e(gs,di),e(di,ju),e(gs,Nu),e(S,Iu),e(S,ci),e(ci,Ou),e(S,Su),e(S,Xa),e(Xa,Du),e(S,Ru),e(S,pi),e(pi,Wu),e(S,Bu),e(S,ui),e(ui,Uu),e(S,Qu),e(S,mi),e(mi,Vu),e(S,Hu),e(S,hi),e(hi,Ku),e(S,Gu),e(S,fi),e(fi,Yu),e(S,Xu),e(S,_s),e(_s,gi),e(gi,Ju),e(_s,Zu),e(S,em),e(S,_i),e(_i,om),e(S,tm),e(Do,nm),e(Do,vi),e(vi,sm),h(s,Pl,f),h(s,nt,f),e(nt,St),e(St,yi),w(vs,yi,null),e(nt,am),e(nt,bi),e(bi,rm),h(s,jl,f),h(s,Ao,f),w(ys,Ao,null),e(Ao,im),e(Ao,bs),e(bs,lm),e(bs,Ls),e(Ls,dm),e(bs,cm),e(Ao,pm),e(Ao,yo),w(ks,yo,null),e(yo,um),e(yo,st),e(st,mm),e(st,Ja),e(Ja,hm),e(st,fm),e(st,Li),e(Li,gm),e(st,_m),e(yo,vm),w(Dt,yo,null),e(yo,ym),w(Rt,yo,null),h(s,Nl,f),h(s,at,f),e(at,Wt),e(Wt,ki),w(ws,ki,null),e(at,bm),e(at,wi),e(wi,Lm),h(s,Il,f),h(s,uo,f),w(Ts,uo,null),e(uo,km),e(uo,xs),e(xs,wm),e(xs,Ms),e(Ms,Tm),e(xs,xm),e(uo,Mm),e(uo,$s),e($s,$m),e($s,qs),e(qs,qm),e($s,Fm),e(uo,Em),e(uo,bo),w(Fs,bo,null),e(bo,zm),e(bo,rt),e(rt,Cm),e(rt,Za),e(Za,Am),e(rt,Pm),e(rt,Ti),e(Ti,jm),e(rt,Nm),e(bo,Im),w(Bt,bo,null),e(bo,Om),w(Ut,bo,null),h(s,Ol,f),h(s,it,f),e(it,Qt),e(Qt,xi),w(Es,xi,null),e(it,Sm),e(it,Mi),e(Mi,Dm),h(s,Sl,f),h(s,mo,f),w(zs,mo,null),e(mo,Rm),e(mo,ho),e(ho,Wm),e(ho,Cs),e(Cs,Bm),e(ho,Um),e(ho,As),e(As,Qm),e(ho,Vm),e(ho,Ps),e(Ps,Hm),e(ho,Km),e(ho,js),e(js,Gm),e(ho,Ym),e(mo,Xm),e(mo,Ns),e(Ns,Jm),e(Ns,Is),e(Is,Zm),e(Ns,eh),e(mo,oh),e(mo,Lo),w(Os,Lo,null),e(Lo,th),e(Lo,lt),e(lt,nh),e(lt,er),e(er,sh),e(lt,ah),e(lt,$i),e($i,rh),e(lt,ih),e(Lo,lh),w(Vt,Lo,null),e(Lo,dh),w(Ht,Lo,null),h(s,Dl,f),h(s,dt,f),e(dt,Kt),e(Kt,qi),w(Ss,qi,null),e(dt,ch),e(dt,Fi),e(Fi,ph),h(s,Rl,f),h(s,fo,f),w(Ds,fo,null),e(fo,uh),e(fo,Po),e(Po,mh),e(Po,Rs),e(Rs,hh),e(Po,fh),e(Po,Ei),e(Ei,gh),e(Po,_h),e(Po,zi),e(zi,vh),e(Po,yh),e(fo,bh),e(fo,Ws),e(Ws,Lh),e(Ws,Bs),e(Bs,kh),e(Ws,wh),e(fo,Th),e(fo,ko),w(Us,ko,null),e(ko,xh),e(ko,ct),e(ct,Mh),e(ct,or),e(or,$h),e(ct,qh),e(ct,Ci),e(Ci,Fh),e(ct,Eh),e(ko,zh),w(Gt,ko,null),e(ko,Ch),w(Yt,ko,null),h(s,Wl,f),h(s,pt,f),e(pt,Xt),e(Xt,Ai),w(Qs,Ai,null),e(pt,Ah),e(pt,Pi),e(Pi,Ph),h(s,Bl,f),h(s,io,f),w(Vs,io,null),e(io,jh),e(io,Hs),e(Hs,Nh),e(Hs,tr),e(tr,Ih),e(Hs,Oh),e(io,Sh),e(io,Ks),e(Ks,Dh),e(Ks,Gs),e(Gs,Rh),e(Ks,Wh),e(io,Bh),w(Jt,io,null),e(io,Uh),e(io,wo),w(Ys,wo,null),e(wo,Qh),e(wo,ut),e(ut,Vh),e(ut,nr),e(nr,Hh),e(ut,Kh),e(ut,ji),e(ji,Gh),e(ut,Yh),e(wo,Xh),w(Zt,wo,null),e(wo,Jh),w(en,wo,null),h(s,Ul,f),h(s,mt,f),e(mt,on),e(on,Ni),w(Xs,Ni,null),e(mt,Zh),e(mt,Ii),e(Ii,ef),h(s,Ql,f),h(s,Ue,f),w(Js,Ue,null),e(Ue,of),e(Ue,Zs),e(Zs,tf),e(Zs,ea),e(ea,nf),e(Zs,sf),e(Ue,af),e(Ue,oa),e(oa,rf),e(oa,sr),e(sr,lf),e(oa,df),e(Ue,cf),e(Ue,ta),e(ta,pf),e(ta,na),e(na,uf),e(ta,mf),e(Ue,hf),w(tn,Ue,null),e(Ue,ff),e(Ue,To),w(sa,To,null),e(To,gf),e(To,ht),e(ht,_f),e(ht,ar),e(ar,vf),e(ht,yf),e(ht,Oi),e(Oi,bf),e(ht,Lf),e(To,kf),w(nn,To,null),e(To,wf),w(sn,To,null),h(s,Vl,f),h(s,ft,f),e(ft,an),e(an,Si),w(aa,Si,null),e(ft,Tf),e(ft,Di),e(Di,xf),h(s,Hl,f),h(s,Qe,f),w(ra,Qe,null),e(Qe,Mf),e(Qe,go),e(go,$f),e(go,ia),e(ia,qf),e(go,Ff),e(go,la),e(la,Ef),e(go,zf),e(go,da),e(da,Cf),e(go,Af),e(go,ca),e(ca,Pf),e(go,jf),e(Qe,Nf),e(Qe,pa),e(pa,If),e(pa,rr),e(rr,Of),e(pa,Sf),e(Qe,Df),e(Qe,ua),e(ua,Rf),e(ua,ma),e(ma,Wf),e(ua,Bf),e(Qe,Uf),w(rn,Qe,null),e(Qe,Qf),e(Qe,xo),w(ha,xo,null),e(xo,Vf),e(xo,gt),e(gt,Hf),e(gt,ir),e(ir,Kf),e(gt,Gf),e(gt,Ri),e(Ri,Yf),e(gt,Xf),e(xo,Jf),w(ln,xo,null),e(xo,Zf),w(dn,xo,null),h(s,Kl,f),h(s,_t,f),e(_t,cn),e(cn,Wi),w(fa,Wi,null),e(_t,eg),e(_t,Bi),e(Bi,og),h(s,Gl,f),h(s,Ve,f),w(ga,Ve,null),e(Ve,tg),e(Ve,jo),e(jo,ng),e(jo,_a),e(_a,sg),e(jo,ag),e(jo,Ui),e(Ui,rg),e(jo,ig),e(jo,Qi),e(Qi,lg),e(jo,dg),e(Ve,cg),e(Ve,va),e(va,pg),e(va,lr),e(lr,ug),e(va,mg),e(Ve,hg),e(Ve,ya),e(ya,fg),e(ya,ba),e(ba,gg),e(ya,_g),e(Ve,vg),w(pn,Ve,null),e(Ve,yg),e(Ve,Mo),w(La,Mo,null),e(Mo,bg),e(Mo,vt),e(vt,Lg),e(vt,dr),e(dr,kg),e(vt,wg),e(vt,Vi),e(Vi,Tg),e(vt,xg),e(Mo,Mg),w(un,Mo,null),e(Mo,$g),w(mn,Mo,null),Yl=!0},p(s,[f]){const ka={};f&2&&(ka.$$scope={dirty:f,ctx:s}),xt.$set(ka);const Hi={};f&2&&(Hi.$$scope={dirty:f,ctx:s}),Ft.$set(Hi);const Ki={};f&2&&(Ki.$$scope={dirty:f,ctx:s}),Dt.$set(Ki);const Gi={};f&2&&(Gi.$$scope={dirty:f,ctx:s}),Rt.$set(Gi);const wa={};f&2&&(wa.$$scope={dirty:f,ctx:s}),Bt.$set(wa);const Yi={};f&2&&(Yi.$$scope={dirty:f,ctx:s}),Ut.$set(Yi);const Xi={};f&2&&(Xi.$$scope={dirty:f,ctx:s}),Vt.$set(Xi);const Ji={};f&2&&(Ji.$$scope={dirty:f,ctx:s}),Ht.$set(Ji);const No={};f&2&&(No.$$scope={dirty:f,ctx:s}),Gt.$set(No);const Zi={};f&2&&(Zi.$$scope={dirty:f,ctx:s}),Yt.$set(Zi);const el={};f&2&&(el.$$scope={dirty:f,ctx:s}),Jt.$set(el);const ol={};f&2&&(ol.$$scope={dirty:f,ctx:s}),Zt.$set(ol);const tl={};f&2&&(tl.$$scope={dirty:f,ctx:s}),en.$set(tl);const nl={};f&2&&(nl.$$scope={dirty:f,ctx:s}),tn.$set(nl);const sl={};f&2&&(sl.$$scope={dirty:f,ctx:s}),nn.$set(sl);const al={};f&2&&(al.$$scope={dirty:f,ctx:s}),sn.$set(al);const Io={};f&2&&(Io.$$scope={dirty:f,ctx:s}),rn.$set(Io);const hn={};f&2&&(hn.$$scope={dirty:f,ctx:s}),ln.$set(hn);const rl={};f&2&&(rl.$$scope={dirty:f,ctx:s}),dn.$set(rl);const Ta={};f&2&&(Ta.$$scope={dirty:f,ctx:s}),pn.$set(Ta);const il={};f&2&&(il.$$scope={dirty:f,ctx:s}),un.$set(il);const _o={};f&2&&(_o.$$scope={dirty:f,ctx:s}),mn.$set(_o)},i(s){Yl||(T(d.$$.fragment,s),T($.$$.fragment,s),T(Nn.$$.fragment,s),T(xt.$$.fragment,s),T(In.$$.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(ms.$$.fragment,s),T(hs.$$.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(ha.$$.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(mn.$$.fragment,s),Yl=!0)},o(s){x(d.$$.fragment,s),x($.$$.fragment,s),x(Nn.$$.fragment,s),x(xt.$$.fragment,s),x(In.$$.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(ms.$$.fragment,s),x(hs.$$.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(ha.$$.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(mn.$$.fragment,s),Yl=!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(P),s&&o(me),s&&o(be),s&&o(Q),s&&o(Le),s&&o(z),s&&o(cl),s&&o(kt),s&&o(pl),s&&o(wt),s&&o(ul),s&&o(Ke),s&&o(ml),s&&o(Vo),M(Nn),s&&o(hl),s&&o($a),s&&o(fl),M(xt,s),s&&o(gl),M(In,s),s&&o(_l),s&&o(qa),s&&o(vl),M(Sn,s),s&&o(yl),s&&o(Oo),s&&o(bl),M(Qn,s),s&&o(Ll),s&&o(Pa),s&&o(kl),s&&o(Ko),M(Hn),s&&o(wl),s&&o(co),M(Kn),M(Ft),s&&o(Tl),s&&o(Xo),M(Yn),s&&o(xl),s&&o(Jo),M(Xn),M(Jn),s&&o(Ml),s&&o(Zo),M(Zn),s&&o($l),s&&o(Co),M(es),M(os),s&&o(ql),s&&o(et),M(ts),s&&o(Fl),s&&o(Be),M(ns),M(as),M(rs),s&&o(El),s&&o(ot),M(is),s&&o(zl),s&&o(po),M(ls),M(ps),s&&o(Cl),s&&o(tt),M(us),s&&o(Al),s&&o(ro),M(ms),M(hs),s&&o(Pl),s&&o(nt),M(vs),s&&o(jl),s&&o(Ao),M(ys),M(ks),M(Dt),M(Rt),s&&o(Nl),s&&o(at),M(ws),s&&o(Il),s&&o(uo),M(Ts),M(Fs),M(Bt),M(Ut),s&&o(Ol),s&&o(it),M(Es),s&&o(Sl),s&&o(mo),M(zs),M(Os),M(Vt),M(Ht),s&&o(Dl),s&&o(dt),M(Ss),s&&o(Rl),s&&o(fo),M(Ds),M(Us),M(Gt),M(Yt),s&&o(Wl),s&&o(pt),M(Qs),s&&o(Bl),s&&o(io),M(Vs),M(Jt),M(Ys),M(Zt),M(en),s&&o(Ul),s&&o(mt),M(Xs),s&&o(Ql),s&&o(Ue),M(Js),M(tn),M(sa),M(nn),M(sn),s&&o(Vl),s&&o(ft),M(aa),s&&o(Hl),s&&o(Qe),M(ra),M(rn),M(ha),M(ln),M(dn),s&&o(Kl),s&&o(_t),M(fa),s&&o(Gl),s&&o(Ve),M(ga),M(pn),M(La),M(un),M(mn)}}}const fb={local:"layoutlmv3",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.LayoutLMv3Config",title:"LayoutLMv3Config"},{local:"transformers.LayoutLMv3FeatureExtractor",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 gb(A){return Qy(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Tb extends Dy{constructor(c){super();Ry(this,c,gb,hb,Wy,{})}}export{Tb as default,fb as metadata};
