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 k,o as w,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 V}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Tt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Oe}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 kb(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.32.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 wb(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||(k(_.$$.fragment,d),y=!0)},o(d){w(_.$$.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||(k(_.$$.fragment,d),y=!0)},o(d){w(_.$$.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||(k(_.$$.fragment,d),y=!0)},o(d){w(_.$$.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||(k(_.$$.fragment,d),y=!0)},o(d){w(_.$$.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||(k(_.$$.fragment,d),y=!0)},o(d){w(_.$$.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,S,ae,se,F,ke,D,we,ve,A,xe,ie,X,Fe,pe,Q,$e,ue,Y,Ee,ye,oe,C,j,he,O,ze,be,G,qe,Te,q,re,H,me,Ce,K,le,fe,B,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(),S=a("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),se=c(),F=a("p"),ke=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"),we=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 "),O=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(),B=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),S=r(ne,"LI",{});var He=i(S);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);ke=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);we=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 We=i(X);Fe=n(We,"fit()"),We.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 "),O=r(ee,"CODE",{});var to=i(O);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 Z=i(q);re=n(Z,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=r(Z,"CODE",{});var so=i(H);me=n(so,"model([input_ids, attention_mask])"),so.forEach(o),Ce=n(Z," or "),K=r(Z,"CODE",{});var Ae=i(K);le=n(Ae,"model([input_ids, attention_mask, token_type_ids])"),Ae.forEach(o),Z.forEach(o),fe=p(R),B=r(R,"LI",{});var Pe=i(B);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,S),e(S,ae),m(v,se,$),m(v,F,$),e(F,ke),e(F,D),e(D,we),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,O),e(O,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,B),e(B,Ne),e(B,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||(k(_.$$.fragment,d),y=!0)},o(d){w(_.$$.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,S,ae,se,F,ke,D,we,ve,A,xe,ie,X,Fe,pe,Q,$e,ue,Y,Ee,ye,oe,C,j,he,O,ze,be,G,qe,Te,q,re,H,me,Ce,K,le,fe,B,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(),S=a("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),se=c(),F=a("p"),ke=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"),we=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 "),O=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(),B=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),S=r(ne,"LI",{});var He=i(S);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);ke=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);we=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 We=i(X);Fe=n(We,"fit()"),We.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 "),O=r(ee,"CODE",{});var to=i(O);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 Z=i(q);re=n(Z,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=r(Z,"CODE",{});var so=i(H);me=n(so,"model([input_ids, attention_mask])"),so.forEach(o),Ce=n(Z," or "),K=r(Z,"CODE",{});var Ae=i(K);le=n(Ae,"model([input_ids, attention_mask, token_type_ids])"),Ae.forEach(o),Z.forEach(o),fe=p(R),B=r(R,"LI",{});var Pe=i(B);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,S),e(S,ae),m(v,se,$),m(v,F,$),e(F,ke),e(F,D),e(D,we),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,O),e(O,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,B),e(B,Ne),e(B,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||(k(_.$$.fragment,d),y=!0)},o(d){w(_.$$.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,S,ae,se,F,ke,D,we,ve,A,xe,ie,X,Fe,pe,Q,$e,ue,Y,Ee,ye,oe,C,j,he,O,ze,be,G,qe,Te,q,re,H,me,Ce,K,le,fe,B,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(),S=a("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),se=c(),F=a("p"),ke=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"),we=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 "),O=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(),B=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),S=r(ne,"LI",{});var He=i(S);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);ke=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);we=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 We=i(X);Fe=n(We,"fit()"),We.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 "),O=r(ee,"CODE",{});var to=i(O);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 Z=i(q);re=n(Z,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=r(Z,"CODE",{});var so=i(H);me=n(so,"model([input_ids, attention_mask])"),so.forEach(o),Ce=n(Z," or "),K=r(Z,"CODE",{});var Ae=i(K);le=n(Ae,"model([input_ids, attention_mask, token_type_ids])"),Ae.forEach(o),Z.forEach(o),fe=p(R),B=r(R,"LI",{});var Pe=i(B);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,S),e(S,ae),m(v,se,$),m(v,F,$),e(F,ke),e(F,D),e(D,we),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,O),e(O,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,B),e(B,Ne),e(B,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 Sb(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 Wb(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||(k(_.$$.fragment,d),y=!0)},o(d){w(_.$$.fragment,d),y=!1},d(d){d&&o(u),d&&o(g),x(_,d)}}}function Bb(N){let u,b,g,_,y,d,h,E,Me,_e,S,ae,se,F,ke,D,we,ve,A,xe,ie,X,Fe,pe,Q,$e,ue,Y,Ee,ye,oe,C,j,he,O,ze,be,G,qe,Te,q,re,H,me,Ce,K,le,fe,B,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(),S=a("li"),ae=t("having all inputs as a list, tuple or dict in the first positional argument."),se=c(),F=a("p"),ke=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"),we=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 "),O=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(),B=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),S=r(ne,"LI",{});var He=i(S);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);ke=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);we=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 We=i(X);Fe=n(We,"fit()"),We.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 "),O=r(ee,"CODE",{});var to=i(O);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 Z=i(q);re=n(Z,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=r(Z,"CODE",{});var so=i(H);me=n(so,"model([input_ids, attention_mask])"),so.forEach(o),Ce=n(Z," or "),K=r(Z,"CODE",{});var Ae=i(K);le=n(Ae,"model([input_ids, attention_mask, token_type_ids])"),Ae.forEach(o),Z.forEach(o),fe=p(R),B=r(R,"LI",{});var Pe=i(B);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,S),e(S,ae),m(v,se,$),m(v,F,$),e(F,ke),e(F,D),e(D,we),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,O),e(O,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,B),e(B,Ne),e(B,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 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 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||(k(_.$$.fragment,d),y=!0)},o(d){w(_.$$.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,S,ae,se,F,ke,D,we,ve,A,xe,ie,X,Fe,pe,Q,$e,ue,Y,Ee,ye,oe,C,j,he,O,ze,be,G,qe,Te,q,re,H,me,Ce,K,le,fe,B,Ne,U,je,te,I,Ie,J,Je,Ue,v,$,Qe,ne,Ye,He,z,ge,Ke,We,eo,oo,R,ee,to,no,Z,so,Ae,Pe,ao,de,Re,Hd,Nn,Kd,ec,Tl,Lt,n_,Ll,Mt,oc,Ea,tc,nc,Ml,Ve,sc,jn,ac,rc,In,ic,lc,Jn,dc,cc,Un,pc,uc,An,hc,mc,kl,Do,kt,Cr,Pn,fc,Nr,gc,wl,za,_c,xl,wt,Fl,Rn,$l,xt,Ft,qa,vc,yc,Sn,bc,Tc,Lc,jr,Ca,Mc,El,Wn,zl,yo,Po,Na,kc,wc,Bn,xc,Fc,Zn,$c,Ec,zc,lo,qc,Gn,Cc,Nc,ja,jc,Ic,Dn,Jc,Uc,Ia,Ac,Pc,Rc,Oo,Sc,On,Wc,Bc,Ja,Zc,Gc,Dc,Ir,Ua,Oc,ql,Vn,Cl,$t,Et,Aa,Vc,Xc,Xn,Qc,Yc,Hc,Jr,Pa,Kc,Nl,Ra,Ur,ep,jl,Sa,Ar,Wa,op,Il,Vo,zt,Pr,Qn,tp,Rr,np,Jl,co,Yn,sp,Xo,ap,Ba,rp,ip,Hn,lp,dp,cp,Qo,pp,Za,up,hp,Ga,mp,fp,gp,qt,Ul,Yo,Ct,Sr,Kn,_p,Wr,vp,Al,Ho,es,yp,Nt,os,bp,Br,Tp,Pl,Ko,jt,Zr,ts,Lp,Gr,Mp,Rl,No,ns,kp,Dr,wp,xp,It,ss,Fp,Or,$p,Sl,et,Jt,Vr,as,Ep,Xr,zp,Wl,Be,rs,qp,Se,Cp,Qr,Np,jp,Da,Ip,Jp,Yr,Up,Ap,Hr,Pp,Rp,Kr,Sp,Wp,ei,Bp,Zp,oi,Gp,Dp,Op,is,Vp,Oa,Xp,Qp,Yp,Va,Xa,Hp,Kp,eu,Ut,ls,ou,ti,tu,nu,Qa,ds,Bl,ot,At,ni,cs,su,si,au,Zl,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,ku,ce,wu,er,xu,Fu,or,$u,Eu,tr,zu,qu,ci,Cu,Nu,pi,ju,Iu,ui,Ju,Uu,hi,Au,Pu,mi,Ru,Su,fi,Wu,Bu,Zu,Ro,_s,Gu,P,Du,gi,Ou,Vu,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,ki,fh,gh,wi,_h,vh,xi,yh,bh,bs,Fi,Th,Lh,Mh,$i,kh,wh,xh,Ei,Fh,Ol,nt,St,zi,Ts,$h,qi,Eh,Vl,jo,Ls,zh,Ms,qh,ks,Ch,Nh,jh,bo,ws,Ih,st,Jh,ar,Uh,Ah,Ci,Ph,Rh,Sh,Wt,Wh,Bt,Xl,at,Zt,Ni,xs,Bh,ji,Zh,Ql,uo,Fs,Gh,$s,Dh,Es,Oh,Vh,Xh,zs,Qh,qs,Yh,Hh,Kh,To,Cs,em,rt,om,rr,tm,nm,Ii,sm,am,rm,Gt,im,Dt,Yl,it,Ot,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,km,Lo,Ss,wm,lt,xm,ir,Fm,$m,Ai,Em,zm,qm,Vt,Cm,Xt,Kl,dt,Qt,Pi,Ws,Nm,Ri,jm,ed,fo,Bs,Im,Io,Jm,Zs,Um,Am,Si,Pm,Rm,Wi,Sm,Wm,Bm,Gs,Zm,Ds,Gm,Dm,Om,Mo,Os,Vm,ct,Xm,lr,Qm,Ym,Bi,Hm,Km,ef,Yt,of,Ht,od,pt,Kt,Zi,Vs,tf,Gi,nf,td,io,Xs,sf,Qs,af,dr,rf,lf,df,Ys,cf,Hs,pf,uf,hf,en,mf,ko,Ks,ff,ut,gf,cr,_f,vf,Di,yf,bf,Tf,on,Lf,tn,nd,ht,nn,Oi,ea,Mf,Vi,kf,sd,Ze,oa,wf,ta,xf,na,Ff,$f,Ef,sa,zf,pr,qf,Cf,Nf,aa,jf,ra,If,Jf,Uf,sn,Af,wo,ia,Pf,mt,Rf,ur,Sf,Wf,Xi,Bf,Zf,Gf,an,Df,rn,ad,ft,ln,Qi,la,Of,Yi,Vf,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,kg,ld,De,ya,wg,Jo,xg,ba,Fg,$g,ol,Eg,zg,tl,qg,Cg,Ng,Ta,jg,fr,Ig,Jg,Ug,La,Ag,Ma,Pg,Rg,Sg,hn,Wg,Fo,ka,Bg,vt,Zg,gr,Gg,Dg,nl,Og,Vg,Xg,mn,Qg,fn,dd;return d=new Oe({}),F=new Oe({}),Pn=new Oe({}),wt=new vo({props:{$$slots:{default:[kb]},$$scope:{ctx:N}}}),Rn=new t_({props:{pipeline:"text-classification"}}),Wn=new t_({props:{pipeline:"token-classification"}}),Vn=new t_({props:{pipeline:"question-answering"}}),Qn=new Oe({}),Yn=new V({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.32.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.32.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.32.0/src/transformers/models/layoutlmv3/configuration_layoutlmv3.py#L40"}}),qt=new yt({props:{anchor:"transformers.LayoutLMv3Config.example",$$slots:{default:[wb]},$$scope:{ctx:N}}}),Kn=new Oe({}),es=new V({props:{name:"class transformers.LayoutLMv3FeatureExtractor",anchor:"transformers.LayoutLMv3FeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/layoutlmv3/feature_extraction_layoutlmv3.py#L28"}}),os=new V({props:{name:"__call__",anchor:"transformers.LayoutLMv3FeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/image_processing_utils.py#L544"}}),ts=new Oe({}),ns=new V({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.32.0/src/transformers/models/layoutlmv3/image_processing_layoutlmv3.py#L94"}}),ss=new V({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:"input_data_format",val:": typing.Union[transformers.image_utils.ChannelDimension, str, NoneType] = None"},{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"},{anchor:"transformers.LayoutLMv3ImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/layoutlmv3/image_processing_layoutlmv3.py#L215"}}),as=new Oe({}),rs=new V({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.32.0/src/transformers/models/layoutlmv3/tokenization_layoutlmv3.py#L200"}}),ls=new V({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.32.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.32.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.32.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.32.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.32.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.32.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.32.0/src/transformers/models/layoutlmv3/tokenization_layoutlmv3.py#L547"}}),ds=new V({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.32.0/src/transformers/models/layoutlmv3/tokenization_layoutlmv3.py#L428"}}),cs=new Oe({}),ps=new V({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.32.0/src/transformers/models/layoutlmv3/tokenization_layoutlmv3_fast.py#L65"}}),ms=new V({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.32.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.32.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.32.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.32.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.32.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.32.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.32.0/src/transformers/models/layoutlmv3/tokenization_layoutlmv3_fast.py#L224"}}),fs=new Oe({}),gs=new V({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.32.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.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer">LayoutLMv3Tokenizer</a> or <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/layoutlmv3/processing_layoutlmv3.py#L27"}}),_s=new V({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.32.0/src/transformers/models/layoutlmv3/processing_layoutlmv3.py#L68"}}),Ts=new Oe({}),Ls=new V({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.32.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.32.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.32.0/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L754"}}),ws=new V({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.LayoutLMv3Model.forward.bbox",description:`<strong>bbox</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, token_sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.LayoutLMv3Model.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.LayoutLMv3Model.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, token_sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.LayoutLMv3Model.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, token_sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.LayoutLMv3Model.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, token_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.LayoutLMv3Model.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.LayoutLMv3Model.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, token_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.LayoutLMv3Model.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.LayoutLMv3Model.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.LayoutLMv3Model.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L843",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Wt=new vo({props:{$$slots:{default:[xb]},$$scope:{ctx:N}}}),Bt=new yt({props:{anchor:"transformers.LayoutLMv3Model.forward.example",$$slots:{default:[Fb]},$$scope:{ctx:N}}}),xs=new Oe({}),Fs=new V({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.32.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.32.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.32.0/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1282"}}),Cs=new V({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.bbox",description:`<strong>bbox</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.`,name:"bbox"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.LayoutLMv3ForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1292",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.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 Oe({}),js=new V({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.32.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.32.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.32.0/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1040"}}),Ss=new V({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.bbox",description:`<strong>bbox</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.`,name:"bbox"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1054",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vt=new vo({props:{$$slots:{default:[zb]},$$scope:{ctx:N}}}),Xt=new yt({props:{anchor:"transformers.LayoutLMv3ForTokenClassification.forward.example",$$slots:{default:[qb]},$$scope:{ctx:N}}}),Ws=new Oe({}),Bs=new V({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.32.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.32.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.32.0/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1152"}}),Os=new V({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.bbox",description:`<strong>bbox</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.`,name:"bbox"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.LayoutLMv3ForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/layoutlmv3/modeling_layoutlmv3.py#L1162",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.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}}}),Vs=new Oe({}),Xs=new V({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.32.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.32.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.32.0/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1111"}}),en=new vo({props:{$$slots:{default:[jb]},$$scope:{ctx:N}}}),Ks=new V({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFLayoutLMv3Model.call.bbox",description:`<strong>bbox</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.TFLayoutLMv3Model.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.TFLayoutLMv3Model.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFLayoutLMv3Model.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFLayoutLMv3Model.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFLayoutLMv3Model.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFLayoutLMv3Model.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFLayoutLMv3Model.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFLayoutLMv3Model.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFLayoutLMv3Model.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1119",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.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 Oe({}),oa=new V({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.32.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.32.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.32.0/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1226"}}),sn=new vo({props:{$$slots:{default:[Ub]},$$scope:{ctx:N}}}),ia=new V({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.bbox",description:`<strong>bbox</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFLayoutLMv3ForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1236",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.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 Oe({}),da=new V({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.32.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.32.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.32.0/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1330"}}),dn=new vo({props:{$$slots:{default:[Rb]},$$scope:{ctx:N}}}),_a=new V({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.bbox",description:`<strong>bbox</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1349",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.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:[Sb]},$$scope:{ctx:N}}}),pn=new yt({props:{anchor:"transformers.TFLayoutLMv3ForTokenClassification.call.example",$$slots:{default:[Wb]},$$scope:{ctx:N}}}),va=new Oe({}),ya=new V({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.32.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.32.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.32.0/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1452"}}),hn=new vo({props:{$$slots:{default:[Bb]},$$scope:{ctx:N}}}),ka=new V({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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.bbox",description:`<strong>bbox</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, 4)</code>, <em>optional</em>) &#x2014;
Bounding boxes of each input sequence tokens. Selected in the range <code>[0, config.max_2d_position_embeddings-1]</code>. Each bounding box should be a normalized version in (x0, y0, x1, y1)
format, where (x0, y0) corresponds to the position of the upper left corner in the bounding box, and (x1,
y1) represents the position of the lower right corner.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.`,name:"bbox"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Batch of document images. Each image is divided into patches of shape <code>(num_channels, config.patch_size, config.patch_size)</code> and the total number of patches (=<code>patch_sequence_length</code>) equals to <code>((height / config.patch_size) * (width / config.patch_size))</code>.`,name:"pixel_values"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p>Note that <code>sequence_length = token_sequence_length + patch_sequence_length + 1</code> where <code>1</code> is for [CLS]
token. See <code>pixel_values</code> for <code>patch_sequence_length</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFLayoutLMv3ForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py#L1464",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.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:[Zb]},$$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(),S=a("h2"),ae=a("a"),se=a("span"),T(F.$$.fragment),ke=c(),D=a("span"),we=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"),O=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"),B=t("images need to be resized and normalized with channels in regular RGB format. LayoutLMv2 on the other hand normalizes the images internally and expects the channels in BGR format."),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 "),We=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(),Z=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(),Ve=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("."),kl=c(),Do=a("h2"),kt=a("a"),Cr=a("span"),T(Pn.$$.fragment),fc=c(),Nr=a("span"),gc=t("Resources"),wl=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(wt.$$.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 "),Sn=a("a"),bc=t("notebook"),Tc=t("."),Lc=c(),jr=a("li"),Ca=a("a"),Mc=t("Text classification task guide"),El=c(),T(Wn.$$.fragment),zl=c(),yo=a("ul"),Po=a("li"),Na=a("a"),kc=t("LayoutLMv3ForTokenClassification"),wc=t(" is supported by this "),Bn=a("a"),xc=t("example script"),Fc=t(" and "),Zn=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(),Oo=a("li"),Sc=t("A "),On=a("a"),Wc=t("notebook"),Bc=t(" for how to finetune "),Ja=a("a"),Zc=t("LayoutLMv2ForTokenClassification"),Gc=t(" with the \u{1F917} Trainer."),Dc=c(),Ir=a("li"),Ua=a("a"),Oc=t("Token classification task guide"),ql=c(),T(Vn.$$.fragment),Cl=c(),$t=a("ul"),Et=a("li"),Aa=a("a"),Vc=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(),Sa=a("ul"),Ar=a("li"),Wa=a("a"),op=t("Document question answering task guide"),Il=c(),Vo=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 "),Ba=a("a"),rp=t("LayoutLMv3Model"),ip=t(`. It is used to instantiate an
LayoutLMv3 model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the LayoutLMv3
`),Hn=a("a"),lp=t("microsoft/layoutlmv3-base"),dp=t(" architecture."),cp=c(),Qo=a("p"),pp=t("Configuration objects inherit from "),Za=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"),Sr=a("span"),T(Kn.$$.fragment),_p=c(),Wr=a("span"),vp=t("LayoutLMv3FeatureExtractor"),Al=c(),Ho=a("div"),T(es.$$.fragment),yp=c(),Nt=a("div"),T(os.$$.fragment),bp=c(),Br=a("p"),Tp=t("Preprocess an image or a batch of images."),Pl=c(),Ko=a("h2"),jt=a("a"),Zr=a("span"),T(ts.$$.fragment),Lp=c(),Gr=a("span"),Mp=t("LayoutLMv3ImageProcessor"),Rl=c(),No=a("div"),T(ns.$$.fragment),kp=c(),Dr=a("p"),wp=t("Constructs a LayoutLMv3 image processor."),xp=c(),It=a("div"),T(ss.$$.fragment),Fp=c(),Or=a("p"),$p=t("Preprocess an image or batch of images."),Sl=c(),et=a("h2"),Jt=a("a"),Vr=a("span"),T(as.$$.fragment),Ep=c(),Xr=a("span"),zp=t("LayoutLMv3Tokenizer"),Wl=c(),Be=a("div"),T(rs.$$.fragment),qp=c(),Se=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"),Sp=t("token_type_ids"),Wp=t(", "),ei=a("code"),Bp=t("bbox"),Zp=t(", and optional "),oi=a("code"),Gp=t("labels"),Dp=t(` (for token
classification).`),Op=c(),is=a("p"),Vp=t("This tokenizer inherits from "),Oa=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(),Va=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),Bl=c(),ot=a("h2"),At=a("a"),ni=a("span"),T(cs.$$.fragment),su=c(),si=a("span"),au=t("LayoutLMv3TokenizerFast"),Zl=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."),ku=c(),ce=a("p"),wu=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"),Su=t(`, which are turned
into token-level `),fi=a("code"),Wu=t("labels"),Bu=t(" for token classification tasks (such as FUNSD, CORD)."),Zu=c(),Ro=a("div"),T(_s.$$.fragment),Gu=c(),P=a("p"),Du=t("This method first forwards the "),gi=a("code"),Ou=t("images"),Vu=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 ("),ki=a("code"),fh=t("text"),gh=t("/`"),wi=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"),kh=t("pixel_values"),wh=t("."),xh=c(),Ei=a("p"),Fh=t("Please refer to the docstring of the above two methods for more information."),Ol=c(),nt=a("h2"),St=a("a"),zi=a("span"),T(Ts.$$.fragment),$h=c(),qi=a("span"),Eh=t("LayoutLMv3Model"),Vl=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 `),ks=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(ws.$$.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."),Sh=c(),T(Wt.$$.fragment),Wh=c(),T(Bt.$$.fragment),Xl=c(),at=a("h2"),Zt=a("a"),Ni=a("span"),T(xs.$$.fragment),Bh=c(),ji=a("span"),Zh=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"),Oh=t("RVL-CDIP"),Vh=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"),Ot=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.`),km=c(),Lo=a("div"),T(Ss.$$.fragment),wm=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(Vt.$$.fragment),Cm=c(),T(Xt.$$.fragment),Kl=c(),dt=a("h2"),Qt=a("a"),Pi=a("span"),T(Ws.$$.fragment),Nm=c(),Ri=a("span"),jm=t("LayoutLMv3ForQuestionAnswering"),ed=c(),fo=a("div"),T(Bs.$$.fragment),Im=c(),Io=a("p"),Jm=t(`LayoutLMv3 Model with a span classification head on top for extractive question-answering tasks such as
`),Zs=a("a"),Um=t("DocVQA"),Am=t(` (a linear layer on top of the text part of the hidden-states output to
compute `),Si=a("code"),Pm=t("span start logits"),Rm=t(" and "),Wi=a("code"),Sm=t("span end logits"),Wm=t(")."),Bm=c(),Gs=a("p"),Zm=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.`),Om=c(),Mo=a("div"),T(Os.$$.fragment),Vm=c(),ct=a("p"),Xm=t("The "),lr=a("a"),Qm=t("LayoutLMv3ForQuestionAnswering"),Ym=t(" forward method, overrides the "),Bi=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"),Zi=a("span"),T(Vs.$$.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(),ko=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"),Oi=a("span"),T(ea.$$.fragment),Mf=c(),Vi=a("span"),kf=t("TFLayoutLMv3ForSequenceClassification"),sd=c(),Ze=a("div"),T(oa.$$.fragment),wf=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(),wo=a("div"),T(ia.$$.fragment),Pf=c(),mt=a("p"),Rf=t("The "),ur=a("a"),Sf=t("TFLayoutLMv3ForSequenceClassification"),Wf=t(" forward method, overrides the "),Xi=a("code"),Bf=t("__call__"),Zf=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),Of=c(),Yi=a("span"),Vf=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"),kg=t("TFLayoutLMv3ForQuestionAnswering"),ld=c(),De=a("div"),T(ya.$$.fragment),wg=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.`),Sg=c(),T(hn.$$.fragment),Wg=c(),Fo=a("div"),T(ka.$$.fragment),Bg=c(),vt=a("p"),Zg=t("The "),gr=a("a"),Gg=t("TFLayoutLMv3ForQuestionAnswering"),Dg=t(" forward method, overrides the "),nl=a("code"),Og=t("__call__"),Vg=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 wa=i(g);_=r(wa,"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(wa),E=r(wa,"SPAN",{});var rl=i(E);Me=n(rl,"LayoutLMv3"),rl.forEach(o),wa.forEach(o),_e=p(s),S=r(s,"H2",{class:!0});var xa=i(S);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),ke=p(xa),D=r(xa,"SPAN",{});var dl=i(D);we=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);O=r(ml,"EM",{});var fl=i(O);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);B=n(vl,"images need to be resized and normalized with channels in regular RGB format. LayoutLMv2 on the other hand normalizes the images internally and expects the channels in BGR format."),vl.forEach(o),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 "),We=r(_r,"A",{href:!0});var l_=i(We);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),Z=r(Ao,"LI",{});var cd=i(Z);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),Ve=r(s,"P",{});var $o=i(Ve);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),kl=p(s),Do=r(s,"H2",{class:!0});var hd=i(Do);kt=r(hd,"A",{id:!0,class:!0,href:!0});var v_=i(kt);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),wl=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(wt.$$.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 "),Sn=r(yl,"A",{href:!0,rel:!0});var M_=i(Sn);bc=n(M_,"notebook"),M_.forEach(o),Tc=n(yl,"."),yl.forEach(o),Lc=p(md),jr=r(md,"LI",{});var k_=i(jr);Ca=r(k_,"A",{href:!0});var w_=i(Ca);Mc=n(w_,"Text classification task guide"),w_.forEach(o),k_.forEach(o),md.forEach(o),El=p(s),L(Wn.$$.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);kc=n(x_,"LayoutLMv3ForTokenClassification"),x_.forEach(o),wc=n($a," is supported by this "),Bn=r($a,"A",{href:!0,rel:!0});var F_=i(Bn);xc=n(F_,"example script"),F_.forEach(o),Fc=n($a," and "),Zn=r($a,"A",{href:!0,rel:!0});var $_=i(Zn);$c=n($_,"notebook"),$_.forEach(o),Ec=n($a,"."),$a.forEach(o),zc=p(_n),lo=r(_n,"LI",{});var So=i(lo);qc=n(So,"A "),Gn=r(So,"A",{href:!0,rel:!0});var E_=i(Gn);Cc=n(E_,"notebook"),E_.forEach(o),Nc=n(So," for how to perform inference with "),ja=r(So,"A",{href:!0});var z_=i(ja);jc=n(z_,"LayoutLMv2ForTokenClassification"),z_.forEach(o),Ic=n(So," and a "),Dn=r(So,"A",{href:!0,rel:!0});var q_=i(Dn);Jc=n(q_,"notebook"),q_.forEach(o),Uc=n(So," for how to perform inference when no labels are available with "),Ia=r(So,"A",{href:!0});var C_=i(Ia);Ac=n(C_,"LayoutLMv2ForTokenClassification"),C_.forEach(o),Pc=n(So,"."),So.forEach(o),Rc=p(_n),Oo=r(_n,"LI",{});var vr=i(Oo);Sc=n(vr,"A "),On=r(vr,"A",{href:!0,rel:!0});var N_=i(On);Wc=n(N_,"notebook"),N_.forEach(o),Bc=n(vr," for how to finetune "),Ja=r(vr,"A",{href:!0});var j_=i(Ja);Zc=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);Oc=n(J_,"Token classification task guide"),J_.forEach(o),I_.forEach(o),_n.forEach(o),ql=p(s),L(Vn.$$.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);Vc=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 S_=i(Ra);Ur=r(S_,"STRONG",{});var W_=i(Ur);ep=n(W_,"Document question answering"),W_.forEach(o),S_.forEach(o),jl=p(s),Sa=r(s,"UL",{});var B_=i(Sa);Ar=r(B_,"LI",{});var Z_=i(Ar);Wa=r(Z_,"A",{href:!0});var G_=i(Wa);op=n(G_,"Document question answering task guide"),G_.forEach(o),Z_.forEach(o),B_.forEach(o),Il=p(s),Vo=r(s,"H2",{class:!0});var gd=i(Vo);zt=r(gd,"A",{id:!0,class:!0,href:!0});var D_=i(zt);Pr=r(D_,"SPAN",{});var O_=i(Pr);L(Qn.$$.fragment,O_),O_.forEach(o),D_.forEach(o),tp=p(gd),Rr=r(gd,"SPAN",{});var V_=i(Rr);np=n(V_,"LayoutLMv3Config"),V_.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 "),Ba=r(yr,"A",{href:!0});var X_=i(Ba);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 "),Za=r(br,"A",{href:!0});var Y_=i(Za);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);Sr=r(K_,"SPAN",{});var ev=i(Sr);L(Kn.$$.fragment,ev),ev.forEach(o),K_.forEach(o),_p=p(_d),Wr=r(_d,"SPAN",{});var ov=i(Wr);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),Br=r(yd,"P",{});var tv=i(Br);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);Zr=r(nv,"SPAN",{});var sv=i(Zr);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),kp=p(Tr),Dr=r(Tr,"P",{});var rv=i(Dr);wp=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),Or=r(Td,"P",{});var iv=i(Or);$p=n(iv,"Preprocess an image or batch of images."),iv.forEach(o),Td.forEach(o),Tr.forEach(o),Sl=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);Vr=r(lv,"SPAN",{});var dv=i(Vr);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),Wl=p(s),Be=r(s,"DIV",{class:!0});var Eo=i(Be);L(rs.$$.fragment,Eo),qp=p(Eo),Se=r(Eo,"P",{});var Xe=i(Se);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);Sp=n(fv,"token_type_ids"),fv.forEach(o),Wp=n(Xe,", "),ei=r(Xe,"CODE",{});var gv=i(ei);Bp=n(gv,"bbox"),gv.forEach(o),Zp=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),Op=p(Eo),is=r(Eo,"P",{});var Md=i(is);Vp=n(Md,"This tokenizer inherits from "),Oa=r(Md,"A",{href:!0});var vv=i(Oa);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),Va=r(Eo,"P",{});var Yg=i(Va);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 kd=i(Ut);L(ls.$$.fragment,kd),ou=p(kd),ti=r(kd,"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),kd.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),Bl=p(s),ot=r(s,"H2",{class:!0});var wd=i(ot);At=r(wd,"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(wd),si=r(wd,"SPAN",{});var kv=i(si);au=n(kv,"LayoutLMv3TokenizerFast"),kv.forEach(o),wd.forEach(o),Zl=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 wv=i(ai);lu=n(wv,"tokenizers"),wv.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 Wo=i(ro);L(gs.$$.fragment,Wo),yu=p(Wo),di=r(Wo,"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(Wo),Ha=r(Wo,"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),ku=p(Wo),ce=r(Wo,"P",{});var Le=i(ce);wu=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),Su=n(Le,`, which are turned
into token-level `),fi=r(Le,"CODE",{});var Sv=i(fi);Wu=n(Sv,"labels"),Sv.forEach(o),Bu=n(Le," for token classification tasks (such as FUNSD, CORD)."),Le.forEach(o),Zu=p(Wo),Ro=r(Wo,"DIV",{class:!0});var Lr=i(Ro);L(_s.$$.fragment,Lr),Gu=p(Lr),P=r(Lr,"P",{});var W=i(P);Du=n(W,"This method first forwards the "),gi=r(W,"CODE",{});var Wv=i(gi);Ou=n(Wv,"images"),Wv.forEach(o),Vu=n(W," argument to "),vs=r(W,"A",{href:!0});var Kg=i(vs);_i=r(Kg,"STRONG",{});var Bv=i(_i);Xu=n(Bv,"call"),Bv.forEach(o),Qu=n(Kg,"()"),Kg.forEach(o),Yu=n(W,`. In case
`),nr=r(W,"A",{href:!0});var Zv=i(nr);Hu=n(Zv,"LayoutLMv3ImageProcessor"),Zv.forEach(o),Ku=n(W," was initialized with "),vi=r(W,"CODE",{});var Gv=i(vi);eh=n(Gv,"apply_ocr"),Gv.forEach(o),oh=n(W," set to "),yi=r(W,"CODE",{});var Dv=i(yi);th=n(Dv,"True"),Dv.forEach(o),nh=n(W,`, it passes the obtained words and
bounding boxes along with the additional arguments to `),ys=r(W,"A",{href:!0});var e_=i(ys);bi=r(e_,"STRONG",{});var Ov=i(bi);sh=n(Ov,"call"),Ov.forEach(o),ah=n(e_,"()"),e_.forEach(o),rh=n(W,` and returns the output,
together with resized and normalized `),Ti=r(W,"CODE",{});var Vv=i(Ti);ih=n(Vv,"pixel_values"),Vv.forEach(o),lh=n(W,". In case "),sr=r(W,"A",{href:!0});var Xv=i(sr);dh=n(Xv,"LayoutLMv3ImageProcessor"),Xv.forEach(o),ch=n(W,` was initialized with
`),Li=r(W,"CODE",{});var Qv=i(Li);ph=n(Qv,"apply_ocr"),Qv.forEach(o),uh=n(W," set to "),Mi=r(W,"CODE",{});var Yv=i(Mi);hh=n(Yv,"False"),Yv.forEach(o),mh=n(W,", it passes the words ("),ki=r(W,"CODE",{});var Hv=i(ki);fh=n(Hv,"text"),Hv.forEach(o),gh=n(W,"/`"),wi=r(W,"CODE",{});var Kv=i(wi);_h=n(Kv,"text_pair"),Kv.forEach(o),vh=n(W,") and "),xi=r(W,"CODE",{});var ey=i(xi);yh=n(ey,"boxes"),ey.forEach(o),bh=n(W,` specified by the user along
with the additional arguments to `),bs=r(W,"A",{href:!0});var o_=i(bs);Fi=r(o_,"STRONG",{});var oy=i(Fi);Th=n(oy,"call"),oy.forEach(o),Lh=n(o_,"()"),o_.forEach(o),Mh=n(W,` and returns the output, together with
resized and normalized `),$i=r(W,"CODE",{});var ty=i($i);kh=n(ty,"pixel_values"),ty.forEach(o),wh=n(W,"."),W.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),Wo.forEach(o),Ol=p(s),nt=r(s,"H2",{class:!0});var zd=i(nt);St=r(zd,"A",{id:!0,class:!0,href:!0});var sy=i(St);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),Vl=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 `),ks=r(qd,"A",{href:!0,rel:!0});var iy=i(ks);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(ws.$$.fragment,bn),Ih=p(bn),st=r(bn,"P",{});var kr=i(st);Jh=n(kr,"The "),ar=r(kr,"A",{href:!0});var ly=i(ar);Uh=n(ly,"LayoutLMv3Model"),ly.forEach(o),Ah=n(kr," forward method, overrides the "),Ci=r(kr,"CODE",{});var dy=i(Ci);Ph=n(dy,"__call__"),dy.forEach(o),Rh=n(kr," special method."),kr.forEach(o),Sh=p(bn),L(Wt.$$.fragment,bn),Wh=p(bn),L(Bt.$$.fragment,bn),bn.forEach(o),Mr.forEach(o),Xl=p(s),at=r(s,"H2",{class:!0});var Cd=i(at);Zt=r(Cd,"A",{id:!0,class:!0,href:!0});var cy=i(Zt);Ni=r(cy,"SPAN",{});var py=i(Ni);L(xs.$$.fragment,py),py.forEach(o),cy.forEach(o),Bh=p(Cd),ji=r(Cd,"SPAN",{});var uy=i(ji);Zh=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);Oh=n(hy,"RVL-CDIP"),hy.forEach(o),Vh=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 wr=i(rt);om=n(wr,"The "),rr=r(wr,"A",{href:!0});var fy=i(rr);tm=n(fy,"LayoutLMv3ForSequenceClassification"),fy.forEach(o),nm=n(wr," forward method, overrides the "),Ii=r(wr,"CODE",{});var gy=i(Ii);sm=n(gy,"__call__"),gy.forEach(o),am=n(wr," special method."),wr.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);Ot=r(Id,"A",{id:!0,class:!0,href:!0});var _y=i(Ot);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 Bo=i(mo);pm=n(Bo,`LayoutLMv3 Model with a token classification head on top (a linear layer on top of the final hidden states) e.g.
for sequence labeling (information extraction) tasks such as `),Is=r(Bo,"A",{href:!0,rel:!0});var by=i(Is);um=n(by,"FUNSD"),by.forEach(o),hm=n(Bo,`,
`),Js=r(Bo,"A",{href:!0,rel:!0});var Ty=i(Js);mm=n(Ty,"SROIE"),Ty.forEach(o),fm=n(Bo,", "),Us=r(Bo,"A",{href:!0,rel:!0});var Ly=i(Us);gm=n(Ly,"CORD"),Ly.forEach(o),_m=n(Bo,` and
`),As=r(Bo,"A",{href:!0,rel:!0});var My=i(As);vm=n(My,"Kleister-NDA"),My.forEach(o),ym=n(Bo,"."),Bo.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 ky=i(Rs);Lm=n(ky,"torch.nn.Module"),ky.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),km=p(Mn),Lo=r(Mn,"DIV",{class:!0});var kn=i(Lo);L(Ss.$$.fragment,kn),wm=p(kn),lt=r(kn,"P",{});var xr=i(lt);xm=n(xr,"The "),ir=r(xr,"A",{href:!0});var wy=i(ir);Fm=n(wy,"LayoutLMv3ForTokenClassification"),wy.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(kn),L(Vt.$$.fragment,kn),Cm=p(kn),L(Xt.$$.fragment,kn),kn.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(Ws.$$.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 wn=i(fo);L(Bs.$$.fragment,wn),Im=p(wn),Io=r(wn,"P",{});var xn=i(Io);Jm=n(xn,`LayoutLMv3 Model with a span classification head on top for extractive question-answering tasks such as
`),Zs=r(xn,"A",{href:!0,rel:!0});var zy=i(Zs);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 `),Si=r(xn,"CODE",{});var qy=i(Si);Pm=n(qy,"span start logits"),qy.forEach(o),Rm=n(xn," and "),Wi=r(xn,"CODE",{});var Cy=i(Wi);Sm=n(Cy,"span end logits"),Cy.forEach(o),Wm=n(xn,")."),xn.forEach(o),Bm=p(wn),Gs=r(wn,"P",{});var Ad=i(Gs);Zm=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),Om=p(wn),Mo=r(wn,"DIV",{class:!0});var Fn=i(Mo);L(Os.$$.fragment,Fn),Vm=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 "),Bi=r(Fr,"CODE",{});var Iy=i(Bi);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),wn.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);Zi=r(Jy,"SPAN",{});var Uy=i(Zi);L(Vs.$$.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 Zo=i(io);L(Xs.$$.fragment,Zo),sf=p(Zo),Qs=r(Zo,"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(Zo),Ys=r(Zo,"P",{});var Sd=i(Ys);cf=n(Sd,"This model is also a "),Hs=r(Sd,"A",{href:!0,rel:!0});var Ry=i(Hs);pf=n(Ry,"tf.keras.Model"),Ry.forEach(o),uf=n(Sd,` 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.`),Sd.forEach(o),hf=p(Zo),L(en.$$.fragment,Zo),mf=p(Zo),ko=r(Zo,"DIV",{class:!0});var $n=i(ko);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 Sy=i(cr);_f=n(Sy,"TFLayoutLMv3Model"),Sy.forEach(o),vf=n($r," forward method, overrides the "),Di=r($r,"CODE",{});var Wy=i(Di);yf=n(Wy,"__call__"),Wy.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),Zo.forEach(o),nd=p(s),ht=r(s,"H2",{class:!0});var Wd=i(ht);nn=r(Wd,"A",{id:!0,class:!0,href:!0});var By=i(nn);Oi=r(By,"SPAN",{});var Zy=i(Oi);L(ea.$$.fragment,Zy),Zy.forEach(o),By.forEach(o),Mf=p(Wd),Vi=r(Wd,"SPAN",{});var Gy=i(Vi);kf=n(Gy,"TFLayoutLMv3ForSequenceClassification"),Gy.forEach(o),Wd.forEach(o),sd=p(s),Ze=r(s,"DIV",{class:!0});var zo=i(Ze);L(oa.$$.fragment,zo),wf=p(zo),ta=r(zo,"P",{});var Bd=i(ta);xf=n(Bd,`LayoutLMv3 Model with a sequence classification head on top (a linear layer on top of the final hidden state of the
[CLS] token) e.g. for document image classification tasks such as the
`),na=r(Bd,"A",{href:!0,rel:!0});var Dy=i(na);Ff=n(Dy,"RVL-CDIP"),Dy.forEach(o),$f=n(Bd," dataset."),Bd.forEach(o),Ef=p(zo),sa=r(zo,"P",{});var Zd=i(sa);zf=n(Zd,"This model inherits from "),pr=r(Zd,"A",{href:!0});var Oy=i(pr);qf=n(Oy,"TFPreTrainedModel"),Oy.forEach(o),Cf=n(Zd,`. 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.)`),Zd.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 Vy=i(ra);If=n(Vy,"tf.keras.Model"),Vy.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),wo=r(zo,"DIV",{class:!0});var En=i(wo);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);Sf=n(Xy,"TFLayoutLMv3ForSequenceClassification"),Xy.forEach(o),Wf=n(Er," forward method, overrides the "),Xi=r(Er,"CODE",{});var Qy=i(Xi);Bf=n(Qy,"__call__"),Qy.forEach(o),Zf=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),Of=p(Dd),Yi=r(Dd,"SPAN",{});var Ky=i(Yi);Vf=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 Od=i(ma);rg=n(Od,"This model inherits from "),hr=r(Od,"A",{href:!0});var sb=i(hr);ig=n(sb,"TFPreTrainedModel"),sb.forEach(o),lg=n(Od,`. 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.)`),Od.forEach(o),dg=p(qo),fa=r(qo,"P",{});var Vd=i(fa);cg=n(Vd,"This model is also a "),ga=r(Vd,"A",{href:!0,rel:!0});var ab=i(ga);pg=n(ab,"tf.keras.Model"),ab.forEach(o),ug=n(Vd,` 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.`),Vd.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);kg=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),wg=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),Sg=p(Co),L(hn.$$.fragment,Co),Wg=p(Co),Fo=r(Co,"DIV",{class:!0});var Cn=i(Fo);L(ka.$$.fragment,Cn),Bg=p(Cn),vt=r(Cn,"P",{});var qr=i(vt);Zg=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);Og=n(_b,"__call__"),_b.forEach(o),Vg=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(Ob)),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(S,"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.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3Processor"),l(J,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor"),l(v,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer"),l(ne,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3TokenizerFast"),l(We,"href","/docs/transformers/v4.32.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(kt,"id","resources"),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","#resources"),l(Do,"class","relative group"),l(qa,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv2#transformers.LayoutLMv2ForSequenceClassification"),l(Sn,"href","https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv2/RVL-CDIP/Fine_tuning_LayoutLMv2ForSequenceClassification_on_RVL_CDIP.ipynb"),l(Sn,"rel","nofollow"),l(Ca,"href","../tasks/sequence_classification"),l(Na,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3ForTokenClassification"),l(Bn,"href","https://github.com/huggingface/transformers/tree/main/examples/research_projects/layoutlmv3"),l(Bn,"rel","nofollow"),l(Zn,"href","https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv3/Fine_tune_LayoutLMv3_on_FUNSD_(HuggingFace_Trainer).ipynb"),l(Zn,"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.32.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.32.0/en/model_doc/layoutlmv2#transformers.LayoutLMv2ForTokenClassification"),l(On,"href","https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/LayoutLMv2/FUNSD/Fine_tuning_LayoutLMv2ForTokenClassification_on_FUNSD_using_HuggingFace_Trainer.ipynb"),l(On,"rel","nofollow"),l(Ja,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv2#transformers.LayoutLMv2ForTokenClassification"),l(Ua,"href","../tasks/token_classification"),l(Aa,"href","/docs/transformers/v4.32.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(Wa,"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(Vo,"class","relative group"),l(Ba,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3Model"),l(Hn,"href","https://huggingface.co/microsoft/layoutlmv3-base"),l(Hn,"rel","nofollow"),l(Za,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(Ga,"href","/docs/transformers/v4.32.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.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer"),l(Oa,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Xa,"href","/docs/transformers/v4.32.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(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(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.32.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.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3Processor"),l(er,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor"),l(or,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer"),l(tr,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3TokenizerFast"),l(vs,"href","/docs/transformers/v4.32.0/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__"),l(nr,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor"),l(ys,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3Tokenizer.__call__"),l(sr,"href","/docs/transformers/v4.32.0/en/model_doc/layoutlmv3#transformers.LayoutLMv3ImageProcessor"),l(bs,"href","/docs/transformers/v4.32.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(St,"id","transformers.LayoutLMv3Model"),l(St,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(St,"href","#transformers.LayoutLMv3Model"),l(nt,"class","relative group"),l(ks,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(ks,"rel","nofollow"),l(ar,"href","/docs/transformers/v4.32.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(Zt,"id","transformers.LayoutLMv3ForSequenceClassification"),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.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.32.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(Ot,"id","transformers.LayoutLMv3ForTokenClassification"),l(Ot,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Ot,"href","#transformers.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.32.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(Zs,"href","https://rrc.cvc.uab.es/?ch=17"),l(Zs,"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.32.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.32.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.32.0/en/model_doc/layoutlmv3#transformers.TFLayoutLMv3Model"),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(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.32.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.32.0/en/model_doc/layoutlmv3#transformers.TFLayoutLMv3ForSequenceClassification"),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(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(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.32.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.32.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.32.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.32.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,S,f),e(S,ae),e(ae,se),M(F,se,null),e(S,ke),e(S,D),e(D,we),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,O),e(O,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,B),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,We),e(We,eo),e(ge,oo),e(ge,R),e(R,ee),e(ge,to),e(q,no),e(q,Z),e(Z,so),e(Z,Ae),e(Ae,Pe),e(Z,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,Ve,f),e(Ve,sc),e(Ve,jn),e(jn,ac),e(Ve,rc),e(Ve,In),e(In,ic),e(Ve,lc),e(Ve,Jn),e(Jn,dc),e(Ve,cc),e(Ve,Un),e(Un,pc),e(Ve,uc),e(Ve,An),e(An,hc),e(Ve,mc),m(s,kl,f),m(s,Do,f),e(Do,kt),e(kt,Cr),M(Pn,Cr,null),e(Do,fc),e(Do,Nr),e(Nr,gc),m(s,wl,f),m(s,za,f),e(za,_c),m(s,xl,f),M(wt,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,Sn),e(Sn,bc),e(Ft,Tc),e(xt,Lc),e(xt,jr),e(jr,Ca),e(Ca,Mc),m(s,El,f),M(Wn,s,f),m(s,zl,f),m(s,yo,f),e(yo,Po),e(Po,Na),e(Na,kc),e(Po,wc),e(Po,Bn),e(Bn,xc),e(Po,Fc),e(Po,Zn),e(Zn,$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,Oo),e(Oo,Sc),e(Oo,On),e(On,Wc),e(Oo,Bc),e(Oo,Ja),e(Ja,Zc),e(Oo,Gc),e(yo,Dc),e(yo,Ir),e(Ir,Ua),e(Ua,Oc),m(s,ql,f),M(Vn,s,f),m(s,Cl,f),m(s,$t,f),e($t,Et),e(Et,Aa),e(Aa,Vc),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,Sa,f),e(Sa,Ar),e(Ar,Wa),e(Wa,op),m(s,Il,f),m(s,Vo,f),e(Vo,zt),e(zt,Pr),M(Qn,Pr,null),e(Vo,tp),e(Vo,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,Ba),e(Ba,rp),e(Xo,ip),e(Xo,Hn),e(Hn,lp),e(Xo,dp),e(co,cp),e(co,Qo),e(Qo,pp),e(Qo,Za),e(Za,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,Sr),M(Kn,Sr,null),e(Yo,_p),e(Yo,Wr),e(Wr,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,Br),e(Br,Tp),m(s,Pl,f),m(s,Ko,f),e(Ko,jt),e(jt,Zr),M(ts,Zr,null),e(Ko,Lp),e(Ko,Gr),e(Gr,Mp),m(s,Rl,f),m(s,No,f),M(ns,No,null),e(No,kp),e(No,Dr),e(Dr,wp),e(No,xp),e(No,It),M(ss,It,null),e(It,Fp),e(It,Or),e(Or,$p),m(s,Sl,f),m(s,et,f),e(et,Jt),e(Jt,Vr),M(as,Vr,null),e(et,Ep),e(et,Xr),e(Xr,zp),m(s,Wl,f),m(s,Be,f),M(rs,Be,null),e(Be,qp),e(Be,Se),e(Se,Cp),e(Se,Qr),e(Qr,Np),e(Se,jp),e(Se,Da),e(Da,Ip),e(Se,Jp),e(Se,Yr),e(Yr,Up),e(Se,Ap),e(Se,Hr),e(Hr,Pp),e(Se,Rp),e(Se,Kr),e(Kr,Sp),e(Se,Wp),e(Se,ei),e(ei,Bp),e(Se,Zp),e(Se,oi),e(oi,Gp),e(Se,Dp),e(Be,Op),e(Be,is),e(is,Vp),e(is,Oa),e(Oa,Xp),e(is,Qp),e(Be,Yp),e(Be,Va),e(Va,Xa),e(Xa,Hp),e(Va,Kp),e(Be,eu),e(Be,Ut),M(ls,Ut,null),e(Ut,ou),e(Ut,ti),e(ti,tu),e(Be,nu),e(Be,Qa),M(ds,Qa,null),m(s,Bl,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,Zl,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,ku),e(ro,ce),e(ce,wu),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,Su),e(ce,fi),e(fi,Wu),e(ce,Bu),e(ro,Zu),e(ro,Ro),M(_s,Ro,null),e(Ro,Gu),e(Ro,P),e(P,Du),e(P,gi),e(gi,Ou),e(P,Vu),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,ki),e(ki,fh),e(P,gh),e(P,wi),e(wi,_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,kh),e(P,wh),e(Ro,xh),e(Ro,Ei),e(Ei,Fh),m(s,Ol,f),m(s,nt,f),e(nt,St),e(St,zi),M(Ts,zi,null),e(nt,$h),e(nt,qi),e(qi,Eh),m(s,Vl,f),m(s,jo,f),M(Ls,jo,null),e(jo,zh),e(jo,Ms),e(Ms,qh),e(Ms,ks),e(ks,Ch),e(Ms,Nh),e(jo,jh),e(jo,bo),M(ws,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,Sh),M(Wt,bo,null),e(bo,Wh),M(Bt,bo,null),m(s,Xl,f),m(s,at,f),e(at,Zt),e(Zt,Ni),M(xs,Ni,null),e(at,Bh),e(at,ji),e(ji,Zh),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,Oh),e($s,Vh),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,Ot),e(Ot,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,km),e(ho,Lo),M(Ss,Lo,null),e(Lo,wm),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(Vt,Lo,null),e(Lo,Cm),M(Xt,Lo,null),m(s,Kl,f),m(s,dt,f),e(dt,Qt),e(Qt,Pi),M(Ws,Pi,null),e(dt,Nm),e(dt,Ri),e(Ri,jm),m(s,ed,f),m(s,fo,f),M(Bs,fo,null),e(fo,Im),e(fo,Io),e(Io,Jm),e(Io,Zs),e(Zs,Um),e(Io,Am),e(Io,Si),e(Si,Pm),e(Io,Rm),e(Io,Wi),e(Wi,Sm),e(Io,Wm),e(fo,Bm),e(fo,Gs),e(Gs,Zm),e(Gs,Ds),e(Ds,Gm),e(Gs,Dm),e(fo,Om),e(fo,Mo),M(Os,Mo,null),e(Mo,Vm),e(Mo,ct),e(ct,Xm),e(ct,lr),e(lr,Qm),e(ct,Ym),e(ct,Bi),e(Bi,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,Zi),M(Vs,Zi,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,ko),M(Ks,ko,null),e(ko,ff),e(ko,ut),e(ut,gf),e(ut,cr),e(cr,_f),e(ut,vf),e(ut,Di),e(Di,yf),e(ut,bf),e(ko,Tf),M(on,ko,null),e(ko,Lf),M(tn,ko,null),m(s,nd,f),m(s,ht,f),e(ht,nn),e(nn,Oi),M(ea,Oi,null),e(ht,Mf),e(ht,Vi),e(Vi,kf),m(s,sd,f),m(s,Ze,f),M(oa,Ze,null),e(Ze,wf),e(Ze,ta),e(ta,xf),e(ta,na),e(na,Ff),e(ta,$f),e(Ze,Ef),e(Ze,sa),e(sa,zf),e(sa,pr),e(pr,qf),e(sa,Cf),e(Ze,Nf),e(Ze,aa),e(aa,jf),e(aa,ra),e(ra,If),e(aa,Jf),e(Ze,Uf),M(sn,Ze,null),e(Ze,Af),e(Ze,wo),M(ia,wo,null),e(wo,Pf),e(wo,mt),e(mt,Rf),e(mt,ur),e(ur,Sf),e(mt,Wf),e(mt,Xi),e(Xi,Bf),e(mt,Zf),e(wo,Gf),M(an,wo,null),e(wo,Df),M(rn,wo,null),m(s,ad,f),m(s,ft,f),e(ft,ln),e(ln,Qi),M(la,Qi,null),e(ft,Of),e(ft,Yi),e(Yi,Vf),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,kg),m(s,ld,f),m(s,De,f),M(ya,De,null),e(De,wg),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,Sg),M(hn,De,null),e(De,Wg),e(De,Fo),M(ka,Fo,null),e(Fo,Bg),e(Fo,vt),e(vt,Zg),e(vt,gr),e(gr,Gg),e(vt,Dg),e(vt,nl),e(nl,Og),e(vt,Vg),e(Fo,Xg),M(mn,Fo,null),e(Fo,Qg),M(fn,Fo,null),dd=!0},p(s,[f]){const wa={};f&2&&(wa.$$scope={dirty:f,ctx:s}),wt.$set(wa);const sl={};f&2&&(sl.$$scope={dirty:f,ctx:s}),qt.$set(sl);const al={};f&2&&(al.$$scope={dirty:f,ctx:s}),Wt.$set(al);const rl={};f&2&&(rl.$$scope={dirty:f,ctx:s}),Bt.$set(rl);const 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}),Vt.$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||(k(d.$$.fragment,s),k(F.$$.fragment,s),k(Pn.$$.fragment,s),k(wt.$$.fragment,s),k(Rn.$$.fragment,s),k(Wn.$$.fragment,s),k(Vn.$$.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(ws.$$.fragment,s),k(Wt.$$.fragment,s),k(Bt.$$.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(Ss.$$.fragment,s),k(Vt.$$.fragment,s),k(Xt.$$.fragment,s),k(Ws.$$.fragment,s),k(Bs.$$.fragment,s),k(Os.$$.fragment,s),k(Yt.$$.fragment,s),k(Ht.$$.fragment,s),k(Vs.$$.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(ka.$$.fragment,s),k(mn.$$.fragment,s),k(fn.$$.fragment,s),dd=!0)},o(s){w(d.$$.fragment,s),w(F.$$.fragment,s),w(Pn.$$.fragment,s),w(wt.$$.fragment,s),w(Rn.$$.fragment,s),w(Wn.$$.fragment,s),w(Vn.$$.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(ws.$$.fragment,s),w(Wt.$$.fragment,s),w(Bt.$$.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(Ss.$$.fragment,s),w(Vt.$$.fragment,s),w(Xt.$$.fragment,s),w(Ws.$$.fragment,s),w(Bs.$$.fragment,s),w(Os.$$.fragment,s),w(Yt.$$.fragment,s),w(Ht.$$.fragment,s),w(Vs.$$.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(ka.$$.fragment,s),w(mn.$$.fragment,s),w(fn.$$.fragment,s),dd=!1},d(s){o(u),s&&o(b),s&&o(g),x(d),s&&o(_e),s&&o(S),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(Ve),s&&o(kl),s&&o(Do),x(Pn),s&&o(wl),s&&o(za),s&&o(xl),x(wt,s),s&&o(Fl),x(Rn,s),s&&o($l),s&&o(xt),s&&o(El),x(Wn,s),s&&o(zl),s&&o(yo),s&&o(ql),x(Vn,s),s&&o(Cl),s&&o($t),s&&o(Nl),s&&o(Ra),s&&o(jl),s&&o(Sa),s&&o(Il),s&&o(Vo),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(Sl),s&&o(et),x(as),s&&o(Wl),s&&o(Be),x(rs),x(ls),x(ds),s&&o(Bl),s&&o(ot),x(cs),s&&o(Zl),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(Ol),s&&o(nt),x(Ts),s&&o(Vl),s&&o(jo),x(Ls),x(ws),x(Wt),x(Bt),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(Ss),x(Vt),x(Xt),s&&o(Kl),s&&o(dt),x(Ws),s&&o(ed),s&&o(fo),x(Bs),x(Os),x(Yt),x(Ht),s&&o(od),s&&o(pt),x(Vs),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(Ze),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(ka),x(mn),x(fn)}}}const Ob={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 Vb(N){return Mb(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class tT extends vb{constructor(u){super();yb(this,u,Vb,Db,bb,{})}}export{tT as default,Ob as metadata};
