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

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

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

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

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