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