import{s as Da,f as Ya,o as Qa,n as Z}from"../chunks/scheduler.9bc65507.js";import{S as Oa,i as Ka,g as r,s as a,u,A as el,h as n,f as t,c as l,j as p,v as _,y as h,k as m,o,a as c,w as b,d as v,t as y,x as T}from"../chunks/index.78c82d43.js";import{T as Vo}from"../chunks/Tip.87d55b76.js";import{D as F}from"../chunks/Docstring.4e7352e2.js";import{C as Qt}from"../chunks/CodeBlock.73e038be.js";import{I as C}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Yt}from"../chunks/ExampleCodeBlock.872b014d.js";import{P as tl}from"../chunks/PipelineTag.75b0f707.js";function ol(M){let i,S="Example:",f,g,w;return g=new Qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNlZ2Zvcm1lck1vZGVsJTJDJTIwU2VnZm9ybWVyQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFNlZ0Zvcm1lciUyMG52aWRpYSUyRnNlZ2Zvcm1lci1iMC1maW5ldHVuZWQtYWRlLTUxMi01MTIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwU2VnZm9ybWVyQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjBmcm9tJTIwdGhlJTIwbnZpZGlhJTJGc2VnZm9ybWVyLWIwLWZpbmV0dW5lZC1hZGUtNTEyLTUxMiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwU2VnZm9ybWVyTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SegformerModel, SegformerConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a SegFormer nvidia/segformer-b0-finetuned-ade-512-512 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = SegformerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the nvidia/segformer-b0-finetuned-ade-512-512 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SegformerModel(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`,wrap:!1}}),{c(){i=r("p"),i.textContent=S,f=a(),u(g.$$.fragment)},l(d){i=n(d,"P",{"data-svelte-h":!0}),h(i)!=="svelte-11lpom8"&&(i.textContent=S),f=l(d),_(g.$$.fragment,d)},m(d,$){c(d,i,$),c(d,f,$),b(g,d,$),w=!0},p:Z,i(d){w||(v(g.$$.fragment,d),w=!0)},o(d){y(g.$$.fragment,d),w=!1},d(d){d&&(t(i),t(f)),T(g,d)}}}function rl(M){let i,S=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){i=r("p"),i.innerHTML=S},l(f){i=n(f,"P",{"data-svelte-h":!0}),h(i)!=="svelte-fincs2"&&(i.innerHTML=S)},m(f,g){c(f,i,g)},p:Z,d(f){f&&t(i)}}}function nl(M){let i,S="Example:",f,g,w;return g=new Qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFNlZ2Zvcm1lck1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZtaXQtYjAlMjIpJTBBbW9kZWwlMjAlM0QlMjBTZWdmb3JtZXJNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybnZpZGlhJTJGbWl0LWIwJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBbGlzdChsYXN0X2hpZGRlbl9zdGF0ZXMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, SegformerModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<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>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/mit-b0&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SegformerModel.from_pretrained(<span class="hljs-string">&quot;nvidia/mit-b0&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">256</span>, <span class="hljs-number">16</span>, <span class="hljs-number">16</span>]`,wrap:!1}}),{c(){i=r("p"),i.textContent=S,f=a(),u(g.$$.fragment)},l(d){i=n(d,"P",{"data-svelte-h":!0}),h(i)!=="svelte-11lpom8"&&(i.textContent=S),f=l(d),_(g.$$.fragment,d)},m(d,$){c(d,i,$),c(d,f,$),b(g,d,$),w=!0},p:Z,i(d){w||(v(g.$$.fragment,d),w=!0)},o(d){y(g.$$.fragment,d),w=!1},d(d){d&&(t(i),t(f)),T(g,d)}}}function sl(M){let i,S=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){i=r("p"),i.innerHTML=S},l(f){i=n(f,"P",{"data-svelte-h":!0}),h(i)!=="svelte-fincs2"&&(i.innerHTML=S)},m(f,g){c(f,i,g)},p:Z,d(f){f&&t(i)}}}function al(M){let i,S="Example:",f,g,w;return g=new Qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFNlZ2Zvcm1lckZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRm1pdC1iMCUyMiklMEFtb2RlbCUyMCUzRCUyMFNlZ2Zvcm1lckZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRm1pdC1iMCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpLml0ZW0oKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, SegformerForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<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>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/mit-b0&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SegformerForImageClassification.from_pretrained(<span class="hljs-string">&quot;nvidia/mit-b0&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`,wrap:!1}}),{c(){i=r("p"),i.textContent=S,f=a(),u(g.$$.fragment)},l(d){i=n(d,"P",{"data-svelte-h":!0}),h(i)!=="svelte-11lpom8"&&(i.textContent=S),f=l(d),_(g.$$.fragment,d)},m(d,$){c(d,i,$),c(d,f,$),b(g,d,$),w=!0},p:Z,i(d){w||(v(g.$$.fragment,d),w=!0)},o(d){y(g.$$.fragment,d),w=!1},d(d){d&&(t(i),t(f)),T(g,d)}}}function ll(M){let i,S=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){i=r("p"),i.innerHTML=S},l(f){i=n(f,"P",{"data-svelte-h":!0}),h(i)!=="svelte-fincs2"&&(i.innerHTML=S)},m(f,g){c(f,i,g)},p:Z,d(f){f&&t(i)}}}function il(M){let i,S="Examples:",f,g,w;return g=new Qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFNlZ2Zvcm1lckZvclNlbWFudGljU2VnbWVudGF0aW9uJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRnNlZ2Zvcm1lci1iMC1maW5ldHVuZWQtYWRlLTUxMi01MTIlMjIpJTBBbW9kZWwlMjAlM0QlMjBTZWdmb3JtZXJGb3JTZW1hbnRpY1NlZ21lbnRhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIybnZpZGlhJTJGc2VnZm9ybWVyLWIwLWZpbmV0dW5lZC1hZGUtNTEyLTUxMiUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlMjAlMjAlMjMlMjBzaGFwZSUyMChiYXRjaF9zaXplJTJDJTIwbnVtX2xhYmVscyUyQyUyMGhlaWdodCUyRjQlMkMlMjB3aWR0aCUyRjQpJTBBbGlzdChsb2dpdHMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, SegformerForSemanticSegmentation
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/segformer-b0-finetuned-ade-512-512&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SegformerForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;nvidia/segformer-b0-finetuned-ade-512-512&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits  <span class="hljs-comment"># shape (batch_size, num_labels, height/4, width/4)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">150</span>, <span class="hljs-number">128</span>, <span class="hljs-number">128</span>]`,wrap:!1}}),{c(){i=r("p"),i.textContent=S,f=a(),u(g.$$.fragment)},l(d){i=n(d,"P",{"data-svelte-h":!0}),h(i)!=="svelte-kvfsh7"&&(i.textContent=S),f=l(d),_(g.$$.fragment,d)},m(d,$){c(d,i,$),c(d,f,$),b(g,d,$),w=!0},p:Z,i(d){w||(v(g.$$.fragment,d),w=!0)},o(d){y(g.$$.fragment,d),w=!1},d(d){d&&(t(i),t(f)),T(g,d)}}}function dl(M){let i,S=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){i=r("p"),i.innerHTML=S},l(f){i=n(f,"P",{"data-svelte-h":!0}),h(i)!=="svelte-fincs2"&&(i.innerHTML=S)},m(f,g){c(f,i,g)},p:Z,d(f){f&&t(i)}}}function cl(M){let i,S="Example:",f,g,w;return g=new Qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGU2VnZm9ybWVyTW9kZWwlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZtaXQtYjAlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlNlZ2Zvcm1lck1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZtaXQtYjAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFSegformerModel
<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>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/mit-b0&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFSegformerModel.from_pretrained(<span class="hljs-string">&quot;nvidia/mit-b0&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">256</span>, <span class="hljs-number">16</span>, <span class="hljs-number">16</span>]`,wrap:!1}}),{c(){i=r("p"),i.textContent=S,f=a(),u(g.$$.fragment)},l(d){i=n(d,"P",{"data-svelte-h":!0}),h(i)!=="svelte-11lpom8"&&(i.textContent=S),f=l(d),_(g.$$.fragment,d)},m(d,$){c(d,i,$),c(d,f,$),b(g,d,$),w=!0},p:Z,i(d){w||(v(g.$$.fragment,d),w=!0)},o(d){y(g.$$.fragment,d),w=!1},d(d){d&&(t(i),t(f)),T(g,d)}}}function ml(M){let i,S=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){i=r("p"),i.innerHTML=S},l(f){i=n(f,"P",{"data-svelte-h":!0}),h(i)!=="svelte-fincs2"&&(i.innerHTML=S)},m(f,g){c(f,i,g)},p:Z,d(f){f&&t(i)}}}function fl(M){let i,S="Example:",f,g,w;return g=new Qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGU2VnZm9ybWVyRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybnZpZGlhJTJGbWl0LWIwJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZTZWdmb3JtZXJGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZtaXQtYjAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFSegformerForImageClassification
<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><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/mit-b0&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFSegformerForImageClassification.from_pretrained(<span class="hljs-string">&quot;nvidia/mit-b0&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`,wrap:!1}}),{c(){i=r("p"),i.textContent=S,f=a(),u(g.$$.fragment)},l(d){i=n(d,"P",{"data-svelte-h":!0}),h(i)!=="svelte-11lpom8"&&(i.textContent=S),f=l(d),_(g.$$.fragment,d)},m(d,$){c(d,i,$),c(d,f,$),b(g,d,$),w=!0},p:Z,i(d){w||(v(g.$$.fragment,d),w=!0)},o(d){y(g.$$.fragment,d),w=!1},d(d){d&&(t(i),t(f)),T(g,d)}}}function gl(M){let i,S=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){i=r("p"),i.innerHTML=S},l(f){i=n(f,"P",{"data-svelte-h":!0}),h(i)!=="svelte-fincs2"&&(i.innerHTML=S)},m(f,g){c(f,i,g)},p:Z,d(f){f&&t(i)}}}function pl(M){let i,S="Examples:",f,g,w;return g=new Qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGU2VnZm9ybWVyRm9yU2VtYW50aWNTZWdtZW50YXRpb24lMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm52aWRpYSUyRnNlZ2Zvcm1lci1iMC1maW5ldHVuZWQtYWRlLTUxMi01MTIlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlNlZ2Zvcm1lckZvclNlbWFudGljU2VnbWVudGF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJudmlkaWElMkZzZWdmb3JtZXItYjAtZmluZXR1bmVkLWFkZS01MTItNTEyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwdHJhaW5pbmclM0RGYWxzZSklMEElMjMlMjBsb2dpdHMlMjBhcmUlMjBvZiUyMHNoYXBlJTIwKGJhdGNoX3NpemUlMkMlMjBudW1fbGFiZWxzJTJDJTIwaGVpZ2h0JTJGNCUyQyUyMHdpZHRoJTJGNCklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyUwQWxpc3QobG9naXRzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFSegformerForSemanticSegmentation
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;nvidia/segformer-b0-finetuned-ade-512-512&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFSegformerForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;nvidia/segformer-b0-finetuned-ade-512-512&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, training=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># logits are of shape (batch_size, num_labels, height/4, width/4)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">150</span>, <span class="hljs-number">128</span>, <span class="hljs-number">128</span>]`,wrap:!1}}),{c(){i=r("p"),i.textContent=S,f=a(),u(g.$$.fragment)},l(d){i=n(d,"P",{"data-svelte-h":!0}),h(i)!=="svelte-kvfsh7"&&(i.textContent=S),f=l(d),_(g.$$.fragment,d)},m(d,$){c(d,i,$),c(d,f,$),b(g,d,$),w=!0},p:Z,i(d){w||(v(g.$$.fragment,d),w=!0)},o(d){y(g.$$.fragment,d),w=!1},d(d){d&&(t(i),t(f)),T(g,d)}}}function hl(M){let i,S,f,g,w,d,$,qe,_n,Ot,xs="SegFormer",gr,q,ie,Ao,Xe,bn,Kt,Cs="Overview",pr,De,Is=`The SegFormer model was proposed in <a href="https://arxiv.org/abs/2105.15203" rel="nofollow">SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers</a> by Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, Ping
Luo. The model consists of a hierarchical Transformer encoder and a lightweight all-MLP decode head to achieve great
results on image segmentation benchmarks such as ADE20K and Cityscapes.`,hr,Ye,js="The abstract from the paper is the following:",ur,Qe,ks=`<em>We present SegFormer, a simple, efficient yet powerful semantic segmentation framework which unifies Transformers with
lightweight multilayer perception (MLP) decoders. SegFormer has two appealing features: 1) SegFormer comprises a novel
hierarchically structured Transformer encoder which outputs multiscale features. It does not need positional encoding,
thereby avoiding the interpolation of positional codes which leads to decreased performance when the testing resolution
differs from training. 2) SegFormer avoids complex decoders. The proposed MLP decoder aggregates information from
different layers, and thus combining both local attention and global attention to render powerful representations. We
show that this simple and lightweight design is the key to efficient segmentation on Transformers. We scale our
approach up to obtain a series of models from SegFormer-B0 to SegFormer-B5, reaching significantly better performance
and efficiency than previous counterparts. For example, SegFormer-B4 achieves 50.3% mIoU on ADE20K with 64M parameters,
being 5x smaller and 2.2% better than the previous best method. Our best model, SegFormer-B5, achieves 84.0% mIoU on
Cityscapes validation set and shows excellent zero-shot robustness on Cityscapes-C.</em>`,_r,Oe,Js='The figure below illustrates the architecture of SegFormer. Taken from the <a href="https://arxiv.org/abs/2105.15203" rel="nofollow">original paper</a>.',br,Ke,Ws,vr,et,Zs=`This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>. The TensorFlow version
of the model was contributed by <a href="https://huggingface.co/sayakpaul" rel="nofollow">sayakpaul</a>. The original code can be found <a href="https://github.com/NVlabs/SegFormer" rel="nofollow">here</a>.`,yr,tt,zs="Tips:",Tr,ot,Us=`<li>SegFormer consists of a hierarchical Transformer encoder, and a lightweight all-MLP decoder head.
<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerModel">SegformerModel</a> is the hierarchical Transformer encoder (which in the paper is also referred to
as Mix Transformer or MiT). <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerForSemanticSegmentation">SegformerForSemanticSegmentation</a> adds the all-MLP decoder head on
top to perform semantic segmentation of images. In addition, there’s
<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerForImageClassification">SegformerForImageClassification</a> which can be used to - you guessed it - classify images. The
authors of SegFormer first pre-trained the Transformer encoder on ImageNet-1k to classify images. Next, they throw
away the classification head, and replace it by the all-MLP decode head. Next, they fine-tune the model altogether on
ADE20K, Cityscapes and COCO-stuff, which are important benchmarks for semantic segmentation. All checkpoints can be
found on the <a href="https://huggingface.co/models?other=segformer" rel="nofollow">hub</a>.</li> <li>The quickest way to get started with SegFormer is by checking the <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/SegFormer" rel="nofollow">example notebooks</a> (which showcase both inference and
fine-tuning on custom data). One can also check out the <a href="https://huggingface.co/blog/fine-tune-segformer" rel="nofollow">blog post</a> introducing SegFormer and illustrating how it can be fine-tuned on custom data.</li> <li>TensorFlow users should refer to <a href="https://github.com/deep-diver/segformer-tf-transformers" rel="nofollow">this repository</a> that shows off-the-shelf inference and fine-tuning.</li> <li>One can also check out <a href="https://huggingface.co/spaces/chansung/segformer-tf-transformers" rel="nofollow">this interactive demo on Hugging Face Spaces</a>
to try out a SegFormer model on custom images.</li> <li>SegFormer works on any input size, as it pads the input to be divisible by <code>config.patch_sizes</code>.</li> <li>One can use <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerImageProcessor">SegformerImageProcessor</a> to prepare images and corresponding segmentation maps
for the model. Note that this image processor is fairly basic and does not include all data augmentations used in
the original paper. The original preprocessing pipelines (for the ADE20k dataset for instance) can be found <a href="https://github.com/NVlabs/SegFormer/blob/master/local_configs/_base_/datasets/ade20k_repeat.py" rel="nofollow">here</a>. The most
important preprocessing step is that images and segmentation maps are randomly cropped and padded to the same size,
such as 512x512 or 640x640, after which they are normalized.</li> <li>One additional thing to keep in mind is that one can initialize <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerImageProcessor">SegformerImageProcessor</a> with
<code>reduce_labels</code> set to <code>True</code> or <code>False</code>. In some datasets (like ADE20k), the 0 index is used in the annotated
segmentation maps for background. However, ADE20k doesn’t include the “background” class in its 150 labels.
Therefore, <code>reduce_labels</code> is used to reduce all labels by 1, and to make sure no loss is computed for the
background class (i.e. it replaces 0 in the annotated maps by 255, which is the <em>ignore_index</em> of the loss function
used by <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerForSemanticSegmentation">SegformerForSemanticSegmentation</a>). However, other datasets use the 0 index as
background class and include this class as part of all labels. In that case, <code>reduce_labels</code> should be set to
<code>False</code>, as loss should also be computed for the background class.</li> <li>As most models, SegFormer comes in different sizes, the details of which can be found in the table below
(taken from Table 7 of the <a href="https://arxiv.org/abs/2105.15203" rel="nofollow">original paper</a>).</li>`,wr,rt,Ns='<thead><tr><th align="center"><strong>Model variant</strong></th> <th><strong>Depths</strong></th> <th><strong>Hidden sizes</strong></th> <th align="center"><strong>Decoder hidden size</strong></th> <th align="center"><strong>Params (M)</strong></th> <th align="center"><strong>ImageNet-1k Top 1</strong></th></tr></thead> <tbody><tr><td align="center">MiT-b0</td> <td>[2, 2, 2, 2]</td> <td>[32, 64, 160, 256]</td> <td align="center">256</td> <td align="center">3.7</td> <td align="center">70.5</td></tr> <tr><td align="center">MiT-b1</td> <td>[2, 2, 2, 2]</td> <td>[64, 128, 320, 512]</td> <td align="center">256</td> <td align="center">14.0</td> <td align="center">78.7</td></tr> <tr><td align="center">MiT-b2</td> <td>[3, 4, 6, 3]</td> <td>[64, 128, 320, 512]</td> <td align="center">768</td> <td align="center">25.4</td> <td align="center">81.6</td></tr> <tr><td align="center">MiT-b3</td> <td>[3, 4, 18, 3]</td> <td>[64, 128, 320, 512]</td> <td align="center">768</td> <td align="center">45.2</td> <td align="center">83.1</td></tr> <tr><td align="center">MiT-b4</td> <td>[3, 8, 27, 3]</td> <td>[64, 128, 320, 512]</td> <td align="center">768</td> <td align="center">62.6</td> <td align="center">83.6</td></tr> <tr><td align="center">MiT-b5</td> <td>[3, 6, 40, 3]</td> <td>[64, 128, 320, 512]</td> <td align="center">768</td> <td align="center">82.0</td> <td align="center">83.8</td></tr></tbody>',Sr,nt,Es=`Note that MiT in the above table refers to the Mix Transformer encoder backbone introduced in SegFormer. For
SegFormer’s results on the segmentation datasets like ADE20k, refer to the <a href="https://arxiv.org/abs/2105.15203" rel="nofollow">paper</a>.`,$r,X,de,Go,st,vn,eo,Ps="Resources",Mr,at,Ls="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with SegFormer.",Fr,lt,xr,it,Hs='<li><a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerForImageClassification">SegformerForImageClassification</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification" rel="nofollow">example script</a> and <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb" rel="nofollow">notebook</a>.</li> <li><a href="../tasks/image_classification">Image classification task guide</a></li>',Cr,dt,Rs="Semantic segmentation:",Ir,ct,Bs='<li><a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerForSemanticSegmentation">SegformerForSemanticSegmentation</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/semantic-segmentation" rel="nofollow">example script</a>.</li> <li>A blog on fine-tuning SegFormer on a custom dataset can be found <a href="https://huggingface.co/blog/fine-tune-segformer" rel="nofollow">here</a>.</li> <li>More demo notebooks on SegFormer (both inference + fine-tuning on a custom dataset) can be found <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/SegFormer" rel="nofollow">here</a>.</li> <li><a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.TFSegformerForSemanticSegmentation">TFSegformerForSemanticSegmentation</a> is supported by this <a href="https://github.com/huggingface/notebooks/blob/main/examples/semantic_segmentation-tf.ipynb" rel="nofollow">example notebook</a>.</li> <li><a href="../tasks/semantic_segmentation">Semantic segmentation task guide</a></li>',jr,mt,Vs="If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",kr,D,ce,qo,ft,yn,to,As="SegformerConfig",Jr,I,gt,Tn,oo,Gs=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerModel">SegformerModel</a>. It is used to instantiate an
SegFormer 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 SegFormer
<a href="https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512" rel="nofollow">nvidia/segformer-b0-finetuned-ade-512-512</a>
architecture.`,wn,ro,qs=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Sn,me,Wr,Y,fe,Xo,pt,$n,no,Xs="SegformerFeatureExtractor",Zr,H,ht,Mn,A,ut,Fn,so,Ds="Preprocesses a batch of images and optionally segmentation maps.",xn,ao,Ys=`Overrides the <code>__call__</code> method of the <code>Preprocessor</code> class so that both images and segmentation maps can be
passed in as positional arguments.`,Cn,ge,_t,In,lo,Qs=`Converts the output of <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerForSemanticSegmentation">SegformerForSemanticSegmentation</a> into semantic segmentation maps. Only supports
PyTorch.`,zr,Q,pe,Do,bt,jn,io,Os="SegformerImageProcessor",Ur,j,vt,kn,co,Ks="Constructs a Segformer image processor.",Jn,he,yt,Wn,mo,ea="Preprocess an image or batch of images.",Zn,ue,Tt,zn,fo,ta=`Converts the output of <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerForSemanticSegmentation">SegformerForSemanticSegmentation</a> into semantic segmentation maps. Only supports
PyTorch.`,Nr,O,_e,Yo,wt,Un,go,oa="SegformerModel",Er,R,St,Nn,po,ra=`The bare SegFormer encoder (Mix-Transformer) outputting raw hidden-states without any specific head on top.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,En,z,$t,Pn,ho,na='The <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerModel">SegformerModel</a> forward method, overrides the <code>__call__</code> special method.',Ln,be,Hn,ve,Pr,K,ye,Qo,Mt,Rn,uo,sa="SegformerDecodeHead",Lr,ee,Ft,Bn,_o,xt,Hr,te,Te,Oo,Ct,Vn,bo,aa="SegformerForImageClassification",Rr,k,It,An,vo,la=`SegFormer Model transformer with an image classification head on top (a linear layer on top of the final hidden
states) e.g. for ImageNet.`,Gn,yo,ia=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,qn,U,jt,Xn,To,da='The <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerForImageClassification">SegformerForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Dn,we,Yn,Se,Br,oe,$e,Ko,kt,Qn,wo,ca="SegformerForSemanticSegmentation",Vr,B,Jt,On,So,ma=`SegFormer Model transformer with an all-MLP decode head on top e.g. for ADE20k, CityScapes.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Kn,N,Wt,es,$o,fa='The <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerForSemanticSegmentation">SegformerForSemanticSegmentation</a> forward method, overrides the <code>__call__</code> special method.',ts,Me,os,Fe,Ar,re,xe,er,Zt,rs,Mo,ga="TFSegformerDecodeHead",Gr,ne,zt,ns,Fo,Ut,qr,se,Ce,tr,Nt,ss,xo,pa="TFSegformerModel",Xr,J,Et,as,Co,ha=`The bare SegFormer encoder (Mix-Transformer) outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,ls,Io,ua=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.keras.Model</a> 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.`,is,E,Pt,ds,jo,_a='The <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.TFSegformerModel">TFSegformerModel</a> forward method, overrides the <code>__call__</code> special method.',cs,Ie,ms,je,Dr,ae,ke,or,Lt,fs,ko,ba="TFSegformerForImageClassification",Yr,x,Ht,gs,Jo,va=`SegFormer Model transformer with an image classification head on top (a linear layer on top of the final hidden
states) e.g. for ImageNet.`,ps,Wo,ya=`This model inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,hs,Zo,Ta=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.keras.Model</a> 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.`,us,P,Rt,_s,zo,wa='The <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.TFSegformerForImageClassification">TFSegformerForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',bs,Je,vs,We,Qr,le,Ze,rr,Bt,ys,Uo,Sa="TFSegformerForSemanticSegmentation",Or,W,Vt,Ts,No,$a=`SegFormer Model transformer with an all-MLP decode head on top e.g. for ADE20k, CityScapes.
This model inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,ws,Eo,Ma=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.keras.Model</a> 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.`,Ss,L,At,$s,Po,Fa='The <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.TFSegformerForSemanticSegmentation">TFSegformerForSemanticSegmentation</a> forward method, overrides the <code>__call__</code> special method.',Ms,ze,Fs,Ue,Kr,nr,en;return qe=new C({}),Xe=new C({}),st=new C({}),lt=new tl({props:{pipeline:"image-classification"}}),ft=new C({}),gt=new F({props:{name:"class transformers.SegformerConfig",anchor:"transformers.SegformerConfig",parameters:[{name:"num_channels",val:" = 3"},{name:"num_encoder_blocks",val:" = 4"},{name:"depths",val:" = [2, 2, 2, 2]"},{name:"sr_ratios",val:" = [8, 4, 2, 1]"},{name:"hidden_sizes",val:" = [32, 64, 160, 256]"},{name:"patch_sizes",val:" = [7, 3, 3, 3]"},{name:"strides",val:" = [4, 2, 2, 2]"},{name:"num_attention_heads",val:" = [1, 2, 5, 8]"},{name:"mlp_ratios",val:" = [4, 4, 4, 4]"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"classifier_dropout_prob",val:" = 0.1"},{name:"initializer_range",val:" = 0.02"},{name:"drop_path_rate",val:" = 0.1"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"decoder_hidden_size",val:" = 256"},{name:"semantic_loss_ignore_index",val:" = 255"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SegformerConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.SegformerConfig.num_encoder_blocks",description:`<strong>num_encoder_blocks</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of encoder blocks (i.e. stages in the Mix Transformer encoder).`,name:"num_encoder_blocks"},{anchor:"transformers.SegformerConfig.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [2, 2, 2, 2]) &#x2014;
The number of layers in each encoder block.`,name:"depths"},{anchor:"transformers.SegformerConfig.sr_ratios",description:`<strong>sr_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [8, 4, 2, 1]) &#x2014;
Sequence reduction ratios in each encoder block.`,name:"sr_ratios"},{anchor:"transformers.SegformerConfig.hidden_sizes",description:`<strong>hidden_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [32, 64, 160, 256]) &#x2014;
Dimension of each of the encoder blocks.`,name:"hidden_sizes"},{anchor:"transformers.SegformerConfig.patch_sizes",description:`<strong>patch_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [7, 3, 3, 3]) &#x2014;
Patch size before each encoder block.`,name:"patch_sizes"},{anchor:"transformers.SegformerConfig.strides",description:`<strong>strides</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [4, 2, 2, 2]) &#x2014;
Stride before each encoder block.`,name:"strides"},{anchor:"transformers.SegformerConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [1, 2, 5, 8]) &#x2014;
Number of attention heads for each attention layer in each block of the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.SegformerConfig.mlp_ratios",description:`<strong>mlp_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [4, 4, 4, 4]) &#x2014;
Ratio of the size of the hidden layer compared to the size of the input layer of the Mix FFNs in the
encoder blocks.`,name:"mlp_ratios"},{anchor:"transformers.SegformerConfig.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.SegformerConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.SegformerConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.SegformerConfig.classifier_dropout_prob",description:`<strong>classifier_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability before the classification head.`,name:"classifier_dropout_prob"},{anchor:"transformers.SegformerConfig.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.SegformerConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for stochastic depth, used in the blocks of the Transformer encoder.`,name:"drop_path_rate"},{anchor:"transformers.SegformerConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-6) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.SegformerConfig.decoder_hidden_size",description:`<strong>decoder_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
The dimension of the all-MLP decode head.`,name:"decoder_hidden_size"},{anchor:"transformers.SegformerConfig.semantic_loss_ignore_index",description:`<strong>semantic_loss_ignore_index</strong> (<code>int</code>, <em>optional</em>, defaults to 255) &#x2014;
The index that is ignored by the loss function of the semantic segmentation model.`,name:"semantic_loss_ignore_index"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/configuration_segformer.py#L38"}}),me=new Yt({props:{anchor:"transformers.SegformerConfig.example",$$slots:{default:[ol]},$$scope:{ctx:M}}}),pt=new C({}),ht=new F({props:{name:"class transformers.SegformerFeatureExtractor",anchor:"transformers.SegformerFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/feature_extraction_segformer.py#L26"}}),ut=new F({props:{name:"__call__",anchor:"transformers.SegformerFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"segmentation_maps",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/image_processing_segformer.py#L296"}}),_t=new F({props:{name:"post_process_semantic_segmentation",anchor:"transformers.SegformerFeatureExtractor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple] = None"}],parametersDescription:[{anchor:"transformers.SegformerFeatureExtractor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerForSemanticSegmentation">SegformerForSemanticSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.SegformerFeatureExtractor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code> of length <code>batch_size</code>, <em>optional</em>) &#x2014;
List of tuples corresponding to the requested final size (height, width) of each prediction. If unset,
predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/image_processing_segformer.py#L441",returnDescription:`
<p><code>List[torch.Tensor]</code> of length <code>batch_size</code>, where each item is a semantic
segmentation map of shape (height, width) corresponding to the target_sizes entry (if <code>target_sizes</code> is
specified). Each entry of each <code>torch.Tensor</code> correspond to a semantic class id.</p>
`,returnType:`
<p>semantic_segmentation</p>
`}}),bt=new C({}),vt=new F({props:{name:"class transformers.SegformerImageProcessor",anchor:"transformers.SegformerImageProcessor",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_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_reduce_labels",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SegformerImageProcessor.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 the specified <code>(size[&quot;height&quot;], size[&quot;width&quot;])</code>. Can be overridden by the <code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.SegformerImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;height&quot; -- 512, &quot;width&quot;: 512}</code>):
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.SegformerImageProcessor.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 the <code>resample</code> parameter in the
<code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.SegformerImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.SegformerImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"rescale_factor"},{anchor:"transformers.SegformerImageProcessor.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.SegformerImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[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.SegformerImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[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.SegformerImageProcessor.do_reduce_labels",description:`<strong>do_reduce_labels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to reduce all label values of segmentation maps by 1. Usually used for datasets where 0 is
used for background, and background itself is not included in all classes of a dataset (e.g. ADE20k). The
background label will be replaced by 255. Can be overridden by the <code>do_reduce_labels</code> parameter in the
<code>preprocess</code> method.`,name:"do_reduce_labels"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/image_processing_segformer.py#L49"}}),yt=new F({props:{name:"preprocess",anchor:"transformers.SegformerImageProcessor.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:"segmentation_maps",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')], NoneType] = None"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_reduce_labels",val:": typing.Optional[bool] = 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[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SegformerImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.SegformerImageProcessor.preprocess.segmentation_maps",description:`<strong>segmentation_maps</strong> (<code>ImageInput</code>, <em>optional</em>) &#x2014;
Segmentation map to preprocess.`,name:"segmentation_maps"},{anchor:"transformers.SegformerImageProcessor.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.SegformerImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after <code>resize</code> is applied.`,name:"size"},{anchor:"transformers.SegformerImageProcessor.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 enum <code>PILImageResampling</code>, Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.SegformerImageProcessor.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 values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.SegformerImageProcessor.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 rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.SegformerImageProcessor.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.SegformerImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean.`,name:"image_mean"},{anchor:"transformers.SegformerImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation.`,name:"image_std"},{anchor:"transformers.SegformerImageProcessor.preprocess.do_reduce_labels",description:`<strong>do_reduce_labels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_reduce_labels</code>) &#x2014;
Whether or not to reduce all label values of segmentation maps by 1. Usually used for datasets where 0
is used for background, and background itself is not included in all classes of a dataset (e.g.
ADE20k). The background label will be replaced by 255.`,name:"do_reduce_labels"},{anchor:"transformers.SegformerImageProcessor.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.SegformerImageProcessor.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.SegformerImageProcessor.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.34.0/src/transformers/models/segformer/image_processing_segformer.py#L305"}}),Tt=new F({props:{name:"post_process_semantic_segmentation",anchor:"transformers.SegformerImageProcessor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple] = None"}],parametersDescription:[{anchor:"transformers.SegformerImageProcessor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerForSemanticSegmentation">SegformerForSemanticSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.SegformerImageProcessor.post_process_semantic_segmentation.target_sizes",description:`<strong>target_sizes</strong> (<code>List[Tuple]</code> of length <code>batch_size</code>, <em>optional</em>) &#x2014;
List of tuples corresponding to the requested final size (height, width) of each prediction. If unset,
predictions will not be resized.`,name:"target_sizes"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/image_processing_segformer.py#L441",returnDescription:`
<p><code>List[torch.Tensor]</code> of length <code>batch_size</code>, where each item is a semantic
segmentation map of shape (height, width) corresponding to the target_sizes entry (if <code>target_sizes</code> is
specified). Each entry of each <code>torch.Tensor</code> correspond to a semantic class id.</p>
`,returnType:`
<p>semantic_segmentation</p>
`}}),wt=new C({}),St=new F({props:{name:"class transformers.SegformerModel",anchor:"transformers.SegformerModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SegformerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerConfig">SegformerConfig</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.34.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.34.0/src/transformers/models/segformer/modeling_segformer.py#L510"}}),$t=new F({props:{name:"forward",anchor:"transformers.SegformerModel.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{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.SegformerModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerFeatureExtractor.__call__">SegformerImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.SegformerModel.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.SegformerModel.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.SegformerModel.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.34.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.34.0/src/transformers/models/segformer/modeling_segformer.py#L529",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.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.34.0/en/model_doc/segformer#transformers.SegformerConfig"
>SegformerConfig</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>) — 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>) — 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>) — 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.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),be=new Vo({props:{$$slots:{default:[rl]},$$scope:{ctx:M}}}),ve=new Yt({props:{anchor:"transformers.SegformerModel.forward.example",$$slots:{default:[nl]},$$scope:{ctx:M}}}),Mt=new C({}),Ft=new F({props:{name:"class transformers.SegformerDecodeHead",anchor:"transformers.SegformerDecodeHead",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/modeling_segformer.py#L681"}}),xt=new F({props:{name:"forward",anchor:"transformers.SegformerDecodeHead.forward",parameters:[{name:"encoder_hidden_states",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/modeling_segformer.py#L706"}}),Ct=new C({}),It=new F({props:{name:"class transformers.SegformerForImageClassification",anchor:"transformers.SegformerForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SegformerForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerConfig">SegformerConfig</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.34.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.34.0/src/transformers/models/segformer/modeling_segformer.py#L575"}}),jt=new F({props:{name:"forward",anchor:"transformers.SegformerForImageClassification.forward",parameters:[{name:"pixel_values",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"}],parametersDescription:[{anchor:"transformers.SegformerForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerFeatureExtractor.__call__">SegformerImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.SegformerForImageClassification.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.SegformerForImageClassification.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.SegformerForImageClassification.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.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SegformerForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/modeling_segformer.py#L588",returnDescription:`
<p>A <code>transformers.models.segformer.modeling_segformer.SegFormerImageClassifierOutput</code> 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.34.0/en/model_doc/segformer#transformers.SegformerConfig"
>SegformerConfig</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) — 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>) — 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>) — 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 stage) of shape <code>(batch_size, num_channels, height, width)</code>. Hidden-states (also
called feature maps) of the model at the output of each stage.</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>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, 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><code>transformers.models.segformer.modeling_segformer.SegFormerImageClassifierOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),we=new Vo({props:{$$slots:{default:[sl]},$$scope:{ctx:M}}}),Se=new Yt({props:{anchor:"transformers.SegformerForImageClassification.forward.example",$$slots:{default:[al]},$$scope:{ctx:M}}}),kt=new C({}),Jt=new F({props:{name:"class transformers.SegformerForSemanticSegmentation",anchor:"transformers.SegformerForSemanticSegmentation",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.SegformerForSemanticSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerConfig">SegformerConfig</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.34.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.34.0/src/transformers/models/segformer/modeling_segformer.py#L743"}}),Wt=new F({props:{name:"forward",anchor:"transformers.SegformerForSemanticSegmentation.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{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"}],parametersDescription:[{anchor:"transformers.SegformerForSemanticSegmentation.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerFeatureExtractor.__call__">SegformerImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.SegformerForSemanticSegmentation.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.SegformerForSemanticSegmentation.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.SegformerForSemanticSegmentation.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.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SegformerForSemanticSegmentation.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Ground truth semantic segmentation maps for computing the loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels &gt; 1</code>, a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/modeling_segformer.py#L752",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</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.34.0/en/model_doc/segformer#transformers.SegformerConfig"
>SegformerConfig</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) — 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, logits_height, logits_width)</code>) — Classification scores for each pixel.</p>
<Tip warning={true}>
<p>The logits returned do not necessarily have the same size as the <code>pixel_values</code> passed as inputs. This is
to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
original image size as post-processing. You should always check your logits shape and resize as needed.</p>
</Tip>
</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>) — 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, patch_size, 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>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, 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.34.0/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Me=new Vo({props:{$$slots:{default:[ll]},$$scope:{ctx:M}}}),Fe=new Yt({props:{anchor:"transformers.SegformerForSemanticSegmentation.forward.example",$$slots:{default:[il]},$$scope:{ctx:M}}}),Zt=new C({}),zt=new F({props:{name:"class transformers.TFSegformerDecodeHead",anchor:"transformers.TFSegformerDecodeHead",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/modeling_tf_segformer.py#L690"}}),Ut=new F({props:{name:"call",anchor:"transformers.TFSegformerDecodeHead.call",parameters:[{name:"encoder_hidden_states",val:": tf.Tensor"},{name:"training",val:": bool = False"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/modeling_tf_segformer.py#L712"}}),Nt=new C({}),Et=new F({props:{name:"class transformers.TFSegformerModel",anchor:"transformers.TFSegformerModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFSegformerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerConfig">SegformerConfig</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.34.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.34.0/src/transformers/models/segformer/modeling_tf_segformer.py#L574"}}),Pt=new F({props:{name:"call",anchor:"transformers.TFSegformerModel.call",parameters:[{name:"pixel_values",val:": tf.Tensor"},{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.TFSegformerModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerFeatureExtractor.__call__">SegformerImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFSegformerModel.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFSegformerModel.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFSegformerModel.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.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFSegformerModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/modeling_tf_segformer.py#L582",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.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.34.0/en/model_doc/segformer#transformers.SegformerConfig"
>SegformerConfig</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>) — 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>) — 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>) — 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.34.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ie=new Vo({props:{$$slots:{default:[dl]},$$scope:{ctx:M}}}),je=new Yt({props:{anchor:"transformers.TFSegformerModel.call.example",$$slots:{default:[cl]},$$scope:{ctx:M}}}),Lt=new C({}),Ht=new F({props:{name:"class transformers.TFSegformerForImageClassification",anchor:"transformers.TFSegformerForImageClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFSegformerForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerConfig">SegformerConfig</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.34.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.34.0/src/transformers/models/segformer/modeling_tf_segformer.py#L616"}}),Rt=new F({props:{name:"call",anchor:"transformers.TFSegformerForImageClassification.call",parameters:[{name:"pixel_values",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"}],parametersDescription:[{anchor:"transformers.TFSegformerForImageClassification.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerFeatureExtractor.__call__">SegformerImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFSegformerForImageClassification.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFSegformerForImageClassification.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFSegformerForImageClassification.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.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFSegformerForImageClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/modeling_tf_segformer.py#L626",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.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.34.0/en/model_doc/segformer#transformers.SegformerConfig"
>SegformerConfig</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) — 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>) — 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>) — 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>) — 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.34.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Je=new Vo({props:{$$slots:{default:[ml]},$$scope:{ctx:M}}}),We=new Yt({props:{anchor:"transformers.TFSegformerForImageClassification.call.example",$$slots:{default:[fl]},$$scope:{ctx:M}}}),Bt=new C({}),Vt=new F({props:{name:"class transformers.TFSegformerForSemanticSegmentation",anchor:"transformers.TFSegformerForSemanticSegmentation",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFSegformerForSemanticSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerConfig">SegformerConfig</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.34.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.34.0/src/transformers/models/segformer/modeling_tf_segformer.py#L749"}}),At=new F({props:{name:"call",anchor:"transformers.TFSegformerForSemanticSegmentation.call",parameters:[{name:"pixel_values",val:": tf.Tensor"},{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"}],parametersDescription:[{anchor:"transformers.TFSegformerForSemanticSegmentation.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.34.0/en/model_doc/segformer#transformers.SegformerFeatureExtractor.__call__">SegformerImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFSegformerForSemanticSegmentation.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFSegformerForSemanticSegmentation.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFSegformerForSemanticSegmentation.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.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFSegformerForSemanticSegmentation.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFSegformerForSemanticSegmentation.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, height, width)</code>, <em>optional</em>) &#x2014;
Ground truth semantic segmentation maps for computing the loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels &gt; 1</code>, a (per-pixel) classification loss is computed
(Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/segformer/modeling_tf_segformer.py#L775",returnDescription:`
<p>A <code>transformers.modeling_tf_outputs.TFSemanticSegmenterOutput</code> 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.34.0/en/model_doc/segformer#transformers.SegformerConfig"
>SegformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — 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, logits_height, logits_width)</code>) — Classification scores for each pixel.</p>
<Tip warning={true}>
<p>The logits returned do not necessarily have the same size as the <code>pixel_values</code> passed as inputs. This is
to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
original image size as post-processing. You should always check your logits shape and resize as needed.</p>
</Tip>
</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>) — Tuple of <code>tf.Tensor</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, patch_size, 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(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, 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><code>transformers.modeling_tf_outputs.TFSemanticSegmenterOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),ze=new Vo({props:{$$slots:{default:[gl]},$$scope:{ctx:M}}}),Ue=new Yt({props:{anchor:"transformers.TFSegformerForSemanticSegmentation.call.example",$$slots:{default:[pl]},$$scope:{ctx:M}}}),{c(){i=r("meta"),S=a(),f=r("p"),g=a(),w=r("h1"),d=r("a"),$=r("span"),u(qe.$$.fragment),_n=a(),Ot=r("span"),Ot.textContent=xs,gr=a(),q=r("h2"),ie=r("a"),Ao=r("span"),u(Xe.$$.fragment),bn=a(),Kt=r("span"),Kt.textContent=Cs,pr=a(),De=r("p"),De.innerHTML=Is,hr=a(),Ye=r("p"),Ye.textContent=js,ur=a(),Qe=r("p"),Qe.innerHTML=ks,_r=a(),Oe=r("p"),Oe.innerHTML=Js,br=a(),Ke=r("img"),vr=a(),et=r("p"),et.innerHTML=Zs,yr=a(),tt=r("p"),tt.textContent=zs,Tr=a(),ot=r("ul"),ot.innerHTML=Us,wr=a(),rt=r("table"),rt.innerHTML=Ns,Sr=a(),nt=r("p"),nt.innerHTML=Es,$r=a(),X=r("h2"),de=r("a"),Go=r("span"),u(st.$$.fragment),vn=a(),eo=r("span"),eo.textContent=Ps,Mr=a(),at=r("p"),at.textContent=Ls,Fr=a(),u(lt.$$.fragment),xr=a(),it=r("ul"),it.innerHTML=Hs,Cr=a(),dt=r("p"),dt.textContent=Rs,Ir=a(),ct=r("ul"),ct.innerHTML=Bs,jr=a(),mt=r("p"),mt.textContent=Vs,kr=a(),D=r("h2"),ce=r("a"),qo=r("span"),u(ft.$$.fragment),yn=a(),to=r("span"),to.textContent=As,Jr=a(),I=r("div"),u(gt.$$.fragment),Tn=a(),oo=r("p"),oo.innerHTML=Gs,wn=a(),ro=r("p"),ro.innerHTML=qs,Sn=a(),u(me.$$.fragment),Wr=a(),Y=r("h2"),fe=r("a"),Xo=r("span"),u(pt.$$.fragment),$n=a(),no=r("span"),no.textContent=Xs,Zr=a(),H=r("div"),u(ht.$$.fragment),Mn=a(),A=r("div"),u(ut.$$.fragment),Fn=a(),so=r("p"),so.textContent=Ds,xn=a(),ao=r("p"),ao.innerHTML=Ys,Cn=a(),ge=r("div"),u(_t.$$.fragment),In=a(),lo=r("p"),lo.innerHTML=Qs,zr=a(),Q=r("h2"),pe=r("a"),Do=r("span"),u(bt.$$.fragment),jn=a(),io=r("span"),io.textContent=Os,Ur=a(),j=r("div"),u(vt.$$.fragment),kn=a(),co=r("p"),co.textContent=Ks,Jn=a(),he=r("div"),u(yt.$$.fragment),Wn=a(),mo=r("p"),mo.textContent=ea,Zn=a(),ue=r("div"),u(Tt.$$.fragment),zn=a(),fo=r("p"),fo.innerHTML=ta,Nr=a(),O=r("h2"),_e=r("a"),Yo=r("span"),u(wt.$$.fragment),Un=a(),go=r("span"),go.textContent=oa,Er=a(),R=r("div"),u(St.$$.fragment),Nn=a(),po=r("p"),po.innerHTML=ra,En=a(),z=r("div"),u($t.$$.fragment),Pn=a(),ho=r("p"),ho.innerHTML=na,Ln=a(),u(be.$$.fragment),Hn=a(),u(ve.$$.fragment),Pr=a(),K=r("h2"),ye=r("a"),Qo=r("span"),u(Mt.$$.fragment),Rn=a(),uo=r("span"),uo.textContent=sa,Lr=a(),ee=r("div"),u(Ft.$$.fragment),Bn=a(),_o=r("div"),u(xt.$$.fragment),Hr=a(),te=r("h2"),Te=r("a"),Oo=r("span"),u(Ct.$$.fragment),Vn=a(),bo=r("span"),bo.textContent=aa,Rr=a(),k=r("div"),u(It.$$.fragment),An=a(),vo=r("p"),vo.textContent=la,Gn=a(),yo=r("p"),yo.innerHTML=ia,qn=a(),U=r("div"),u(jt.$$.fragment),Xn=a(),To=r("p"),To.innerHTML=da,Dn=a(),u(we.$$.fragment),Yn=a(),u(Se.$$.fragment),Br=a(),oe=r("h2"),$e=r("a"),Ko=r("span"),u(kt.$$.fragment),Qn=a(),wo=r("span"),wo.textContent=ca,Vr=a(),B=r("div"),u(Jt.$$.fragment),On=a(),So=r("p"),So.innerHTML=ma,Kn=a(),N=r("div"),u(Wt.$$.fragment),es=a(),$o=r("p"),$o.innerHTML=fa,ts=a(),u(Me.$$.fragment),os=a(),u(Fe.$$.fragment),Ar=a(),re=r("h2"),xe=r("a"),er=r("span"),u(Zt.$$.fragment),rs=a(),Mo=r("span"),Mo.textContent=ga,Gr=a(),ne=r("div"),u(zt.$$.fragment),ns=a(),Fo=r("div"),u(Ut.$$.fragment),qr=a(),se=r("h2"),Ce=r("a"),tr=r("span"),u(Nt.$$.fragment),ss=a(),xo=r("span"),xo.textContent=pa,Xr=a(),J=r("div"),u(Et.$$.fragment),as=a(),Co=r("p"),Co.innerHTML=ha,ls=a(),Io=r("p"),Io.innerHTML=ua,is=a(),E=r("div"),u(Pt.$$.fragment),ds=a(),jo=r("p"),jo.innerHTML=_a,cs=a(),u(Ie.$$.fragment),ms=a(),u(je.$$.fragment),Dr=a(),ae=r("h2"),ke=r("a"),or=r("span"),u(Lt.$$.fragment),fs=a(),ko=r("span"),ko.textContent=ba,Yr=a(),x=r("div"),u(Ht.$$.fragment),gs=a(),Jo=r("p"),Jo.textContent=va,ps=a(),Wo=r("p"),Wo.innerHTML=ya,hs=a(),Zo=r("p"),Zo.innerHTML=Ta,us=a(),P=r("div"),u(Rt.$$.fragment),_s=a(),zo=r("p"),zo.innerHTML=wa,bs=a(),u(Je.$$.fragment),vs=a(),u(We.$$.fragment),Qr=a(),le=r("h2"),Ze=r("a"),rr=r("span"),u(Bt.$$.fragment),ys=a(),Uo=r("span"),Uo.textContent=Sa,Or=a(),W=r("div"),u(Vt.$$.fragment),Ts=a(),No=r("p"),No.innerHTML=$a,ws=a(),Eo=r("p"),Eo.innerHTML=Ma,Ss=a(),L=r("div"),u(At.$$.fragment),$s=a(),Po=r("p"),Po.innerHTML=Fa,Ms=a(),u(ze.$$.fragment),Fs=a(),u(Ue.$$.fragment),Kr=a(),nr=r("p"),this.h()},l(e){const s=el("svelte-1phssyn",document.head);i=n(s,"META",{name:!0,content:!0}),s.forEach(t),S=l(e),f=n(e,"P",{}),p(f).forEach(t),g=l(e),w=n(e,"H1",{class:!0});var Gt=p(w);d=n(Gt,"A",{id:!0,class:!0,href:!0});var sr=p(d);$=n(sr,"SPAN",{});var ar=p($);_(qe.$$.fragment,ar),ar.forEach(t),sr.forEach(t),_n=l(Gt),Ot=n(Gt,"SPAN",{"data-svelte-h":!0}),h(Ot)!=="svelte-fbboo3"&&(Ot.textContent=xs),Gt.forEach(t),gr=l(e),q=n(e,"H2",{class:!0});var qt=p(q);ie=n(qt,"A",{id:!0,class:!0,href:!0});var lr=p(ie);Ao=n(lr,"SPAN",{});var ir=p(Ao);_(Xe.$$.fragment,ir),ir.forEach(t),lr.forEach(t),bn=l(qt),Kt=n(qt,"SPAN",{"data-svelte-h":!0}),h(Kt)!=="svelte-1jsw1pg"&&(Kt.textContent=Cs),qt.forEach(t),pr=l(e),De=n(e,"P",{"data-svelte-h":!0}),h(De)!=="svelte-1rmm4pp"&&(De.innerHTML=Is),hr=l(e),Ye=n(e,"P",{"data-svelte-h":!0}),h(Ye)!=="svelte-vfdo9a"&&(Ye.textContent=js),ur=l(e),Qe=n(e,"P",{"data-svelte-h":!0}),h(Qe)!=="svelte-1abqxvb"&&(Qe.innerHTML=ks),_r=l(e),Oe=n(e,"P",{"data-svelte-h":!0}),h(Oe)!=="svelte-1xgqs41"&&(Oe.innerHTML=Js),br=l(e),Ke=n(e,"IMG",{width:!0,src:!0}),vr=l(e),et=n(e,"P",{"data-svelte-h":!0}),h(et)!=="svelte-1794tdg"&&(et.innerHTML=Zs),yr=l(e),tt=n(e,"P",{"data-svelte-h":!0}),h(tt)!=="svelte-axv494"&&(tt.textContent=zs),Tr=l(e),ot=n(e,"UL",{"data-svelte-h":!0}),h(ot)!=="svelte-thcicl"&&(ot.innerHTML=Us),wr=l(e),rt=n(e,"TABLE",{"data-svelte-h":!0}),h(rt)!=="svelte-1u5dqy3"&&(rt.innerHTML=Ns),Sr=l(e),nt=n(e,"P",{"data-svelte-h":!0}),h(nt)!=="svelte-1srzf2y"&&(nt.innerHTML=Es),$r=l(e),X=n(e,"H2",{class:!0});var Xt=p(X);de=n(Xt,"A",{id:!0,class:!0,href:!0});var dr=p(de);Go=n(dr,"SPAN",{});var cr=p(Go);_(st.$$.fragment,cr),cr.forEach(t),dr.forEach(t),vn=l(Xt),eo=n(Xt,"SPAN",{"data-svelte-h":!0}),h(eo)!=="svelte-w4zzv6"&&(eo.textContent=Ps),Xt.forEach(t),Mr=l(e),at=n(e,"P",{"data-svelte-h":!0}),h(at)!=="svelte-ka71ur"&&(at.textContent=Ls),Fr=l(e),_(lt.$$.fragment,e),xr=l(e),it=n(e,"UL",{"data-svelte-h":!0}),h(it)!=="svelte-ccgvw9"&&(it.innerHTML=Hs),Cr=l(e),dt=n(e,"P",{"data-svelte-h":!0}),h(dt)!=="svelte-15vx5o0"&&(dt.textContent=Rs),Ir=l(e),ct=n(e,"UL",{"data-svelte-h":!0}),h(ct)!=="svelte-1q4xcu7"&&(ct.innerHTML=Bs),jr=l(e),mt=n(e,"P",{"data-svelte-h":!0}),h(mt)!=="svelte-1xesile"&&(mt.textContent=Vs),kr=l(e),D=n(e,"H2",{class:!0});var Dt=p(D);ce=n(Dt,"A",{id:!0,class:!0,href:!0});var mr=p(ce);qo=n(mr,"SPAN",{});var fr=p(qo);_(ft.$$.fragment,fr),fr.forEach(t),mr.forEach(t),yn=l(Dt),to=n(Dt,"SPAN",{"data-svelte-h":!0}),h(to)!=="svelte-1vbsi0d"&&(to.textContent=As),Dt.forEach(t),Jr=l(e),I=n(e,"DIV",{class:!0});var V=p(I);_(gt.$$.fragment,V),Tn=l(V),oo=n(V,"P",{"data-svelte-h":!0}),h(oo)!=="svelte-1fcwc07"&&(oo.innerHTML=Gs),wn=l(V),ro=n(V,"P",{"data-svelte-h":!0}),h(ro)!=="svelte-10kqkkl"&&(ro.innerHTML=qs),Sn=l(V),_(me.$$.fragment,V),V.forEach(t),Wr=l(e),Y=n(e,"H2",{class:!0});var tn=p(Y);fe=n(tn,"A",{id:!0,class:!0,href:!0});var xa=p(fe);Xo=n(xa,"SPAN",{});var Ca=p(Xo);_(pt.$$.fragment,Ca),Ca.forEach(t),xa.forEach(t),$n=l(tn),no=n(tn,"SPAN",{"data-svelte-h":!0}),h(no)!=="svelte-15katld"&&(no.textContent=Xs),tn.forEach(t),Zr=l(e),H=n(e,"DIV",{class:!0});var Lo=p(H);_(ht.$$.fragment,Lo),Mn=l(Lo),A=n(Lo,"DIV",{class:!0});var Ho=p(A);_(ut.$$.fragment,Ho),Fn=l(Ho),so=n(Ho,"P",{"data-svelte-h":!0}),h(so)!=="svelte-4612b7"&&(so.textContent=Ds),xn=l(Ho),ao=n(Ho,"P",{"data-svelte-h":!0}),h(ao)!=="svelte-b84uvg"&&(ao.innerHTML=Ys),Ho.forEach(t),Cn=l(Lo),ge=n(Lo,"DIV",{class:!0});var on=p(ge);_(_t.$$.fragment,on),In=l(on),lo=n(on,"P",{"data-svelte-h":!0}),h(lo)!=="svelte-w0ta3g"&&(lo.innerHTML=Qs),on.forEach(t),Lo.forEach(t),zr=l(e),Q=n(e,"H2",{class:!0});var rn=p(Q);pe=n(rn,"A",{id:!0,class:!0,href:!0});var Ia=p(pe);Do=n(Ia,"SPAN",{});var ja=p(Do);_(bt.$$.fragment,ja),ja.forEach(t),Ia.forEach(t),jn=l(rn),io=n(rn,"SPAN",{"data-svelte-h":!0}),h(io)!=="svelte-1jgzze4"&&(io.textContent=Os),rn.forEach(t),Ur=l(e),j=n(e,"DIV",{class:!0});var Ne=p(j);_(vt.$$.fragment,Ne),kn=l(Ne),co=n(Ne,"P",{"data-svelte-h":!0}),h(co)!=="svelte-ijd3ni"&&(co.textContent=Ks),Jn=l(Ne),he=n(Ne,"DIV",{class:!0});var nn=p(he);_(yt.$$.fragment,nn),Wn=l(nn),mo=n(nn,"P",{"data-svelte-h":!0}),h(mo)!=="svelte-1x3yxsa"&&(mo.textContent=ea),nn.forEach(t),Zn=l(Ne),ue=n(Ne,"DIV",{class:!0});var sn=p(ue);_(Tt.$$.fragment,sn),zn=l(sn),fo=n(sn,"P",{"data-svelte-h":!0}),h(fo)!=="svelte-w0ta3g"&&(fo.innerHTML=ta),sn.forEach(t),Ne.forEach(t),Nr=l(e),O=n(e,"H2",{class:!0});var an=p(O);_e=n(an,"A",{id:!0,class:!0,href:!0});var ka=p(_e);Yo=n(ka,"SPAN",{});var Ja=p(Yo);_(wt.$$.fragment,Ja),Ja.forEach(t),ka.forEach(t),Un=l(an),go=n(an,"SPAN",{"data-svelte-h":!0}),h(go)!=="svelte-nvv3ba"&&(go.textContent=oa),an.forEach(t),Er=l(e),R=n(e,"DIV",{class:!0});var Ro=p(R);_(St.$$.fragment,Ro),Nn=l(Ro),po=n(Ro,"P",{"data-svelte-h":!0}),h(po)!=="svelte-1eq9zl9"&&(po.innerHTML=ra),En=l(Ro),z=n(Ro,"DIV",{class:!0});var Ee=p(z);_($t.$$.fragment,Ee),Pn=l(Ee),ho=n(Ee,"P",{"data-svelte-h":!0}),h(ho)!=="svelte-1t2p04r"&&(ho.innerHTML=na),Ln=l(Ee),_(be.$$.fragment,Ee),Hn=l(Ee),_(ve.$$.fragment,Ee),Ee.forEach(t),Ro.forEach(t),Pr=l(e),K=n(e,"H2",{class:!0});var ln=p(K);ye=n(ln,"A",{id:!0,class:!0,href:!0});var Wa=p(ye);Qo=n(Wa,"SPAN",{});var Za=p(Qo);_(Mt.$$.fragment,Za),Za.forEach(t),Wa.forEach(t),Rn=l(ln),uo=n(ln,"SPAN",{"data-svelte-h":!0}),h(uo)!=="svelte-ypzbm3"&&(uo.textContent=sa),ln.forEach(t),Lr=l(e),ee=n(e,"DIV",{class:!0});var dn=p(ee);_(Ft.$$.fragment,dn),Bn=l(dn),_o=n(dn,"DIV",{class:!0});var za=p(_o);_(xt.$$.fragment,za),za.forEach(t),dn.forEach(t),Hr=l(e),te=n(e,"H2",{class:!0});var cn=p(te);Te=n(cn,"A",{id:!0,class:!0,href:!0});var Ua=p(Te);Oo=n(Ua,"SPAN",{});var Na=p(Oo);_(Ct.$$.fragment,Na),Na.forEach(t),Ua.forEach(t),Vn=l(cn),bo=n(cn,"SPAN",{"data-svelte-h":!0}),h(bo)!=="svelte-l9xxyb"&&(bo.textContent=aa),cn.forEach(t),Rr=l(e),k=n(e,"DIV",{class:!0});var Pe=p(k);_(It.$$.fragment,Pe),An=l(Pe),vo=n(Pe,"P",{"data-svelte-h":!0}),h(vo)!=="svelte-m32qg1"&&(vo.textContent=la),Gn=l(Pe),yo=n(Pe,"P",{"data-svelte-h":!0}),h(yo)!=="svelte-68lg8f"&&(yo.innerHTML=ia),qn=l(Pe),U=n(Pe,"DIV",{class:!0});var Le=p(U);_(jt.$$.fragment,Le),Xn=l(Le),To=n(Le,"P",{"data-svelte-h":!0}),h(To)!=="svelte-1rfirpp"&&(To.innerHTML=da),Dn=l(Le),_(we.$$.fragment,Le),Yn=l(Le),_(Se.$$.fragment,Le),Le.forEach(t),Pe.forEach(t),Br=l(e),oe=n(e,"H2",{class:!0});var mn=p(oe);$e=n(mn,"A",{id:!0,class:!0,href:!0});var Ea=p($e);Ko=n(Ea,"SPAN",{});var Pa=p(Ko);_(kt.$$.fragment,Pa),Pa.forEach(t),Ea.forEach(t),Qn=l(mn),wo=n(mn,"SPAN",{"data-svelte-h":!0}),h(wo)!=="svelte-onf246"&&(wo.textContent=ca),mn.forEach(t),Vr=l(e),B=n(e,"DIV",{class:!0});var Bo=p(B);_(Jt.$$.fragment,Bo),On=l(Bo),So=n(Bo,"P",{"data-svelte-h":!0}),h(So)!=="svelte-x9btf5"&&(So.innerHTML=ma),Kn=l(Bo),N=n(Bo,"DIV",{class:!0});var He=p(N);_(Wt.$$.fragment,He),es=l(He),$o=n(He,"P",{"data-svelte-h":!0}),h($o)!=="svelte-1ttvjpr"&&($o.innerHTML=fa),ts=l(He),_(Me.$$.fragment,He),os=l(He),_(Fe.$$.fragment,He),He.forEach(t),Bo.forEach(t),Ar=l(e),re=n(e,"H2",{class:!0});var fn=p(re);xe=n(fn,"A",{id:!0,class:!0,href:!0});var La=p(xe);er=n(La,"SPAN",{});var Ha=p(er);_(Zt.$$.fragment,Ha),Ha.forEach(t),La.forEach(t),rs=l(fn),Mo=n(fn,"SPAN",{"data-svelte-h":!0}),h(Mo)!=="svelte-15l6385"&&(Mo.textContent=ga),fn.forEach(t),Gr=l(e),ne=n(e,"DIV",{class:!0});var gn=p(ne);_(zt.$$.fragment,gn),ns=l(gn),Fo=n(gn,"DIV",{class:!0});var Ra=p(Fo);_(Ut.$$.fragment,Ra),Ra.forEach(t),gn.forEach(t),qr=l(e),se=n(e,"H2",{class:!0});var pn=p(se);Ce=n(pn,"A",{id:!0,class:!0,href:!0});var Ba=p(Ce);tr=n(Ba,"SPAN",{});var Va=p(tr);_(Nt.$$.fragment,Va),Va.forEach(t),Ba.forEach(t),ss=l(pn),xo=n(pn,"SPAN",{"data-svelte-h":!0}),h(xo)!=="svelte-1qfyl8o"&&(xo.textContent=pa),pn.forEach(t),Xr=l(e),J=n(e,"DIV",{class:!0});var Re=p(J);_(Et.$$.fragment,Re),as=l(Re),Co=n(Re,"P",{"data-svelte-h":!0}),h(Co)!=="svelte-6mvaj2"&&(Co.innerHTML=ha),ls=l(Re),Io=n(Re,"P",{"data-svelte-h":!0}),h(Io)!=="svelte-1ivrf8m"&&(Io.innerHTML=ua),is=l(Re),E=n(Re,"DIV",{class:!0});var Be=p(E);_(Pt.$$.fragment,Be),ds=l(Be),jo=n(Be,"P",{"data-svelte-h":!0}),h(jo)!=="svelte-v7rbxj"&&(jo.innerHTML=_a),cs=l(Be),_(Ie.$$.fragment,Be),ms=l(Be),_(je.$$.fragment,Be),Be.forEach(t),Re.forEach(t),Dr=l(e),ae=n(e,"H2",{class:!0});var hn=p(ae);ke=n(hn,"A",{id:!0,class:!0,href:!0});var Aa=p(ke);or=n(Aa,"SPAN",{});var Ga=p(or);_(Lt.$$.fragment,Ga),Ga.forEach(t),Aa.forEach(t),fs=l(hn),ko=n(hn,"SPAN",{"data-svelte-h":!0}),h(ko)!=="svelte-1nrfnql"&&(ko.textContent=ba),hn.forEach(t),Yr=l(e),x=n(e,"DIV",{class:!0});var G=p(x);_(Ht.$$.fragment,G),gs=l(G),Jo=n(G,"P",{"data-svelte-h":!0}),h(Jo)!=="svelte-m32qg1"&&(Jo.textContent=va),ps=l(G),Wo=n(G,"P",{"data-svelte-h":!0}),h(Wo)!=="svelte-1i0vt4o"&&(Wo.innerHTML=ya),hs=l(G),Zo=n(G,"P",{"data-svelte-h":!0}),h(Zo)!=="svelte-1ivrf8m"&&(Zo.innerHTML=Ta),us=l(G),P=n(G,"DIV",{class:!0});var Ve=p(P);_(Rt.$$.fragment,Ve),_s=l(Ve),zo=n(Ve,"P",{"data-svelte-h":!0}),h(zo)!=="svelte-wiyjq1"&&(zo.innerHTML=wa),bs=l(Ve),_(Je.$$.fragment,Ve),vs=l(Ve),_(We.$$.fragment,Ve),Ve.forEach(t),G.forEach(t),Qr=l(e),le=n(e,"H2",{class:!0});var un=p(le);Ze=n(un,"A",{id:!0,class:!0,href:!0});var qa=p(Ze);rr=n(qa,"SPAN",{});var Xa=p(rr);_(Bt.$$.fragment,Xa),Xa.forEach(t),qa.forEach(t),ys=l(un),Uo=n(un,"SPAN",{"data-svelte-h":!0}),h(Uo)!=="svelte-kqrko"&&(Uo.textContent=Sa),un.forEach(t),Or=l(e),W=n(e,"DIV",{class:!0});var Ae=p(W);_(Vt.$$.fragment,Ae),Ts=l(Ae),No=n(Ae,"P",{"data-svelte-h":!0}),h(No)!=="svelte-16xz1nu"&&(No.innerHTML=$a),ws=l(Ae),Eo=n(Ae,"P",{"data-svelte-h":!0}),h(Eo)!=="svelte-1ivrf8m"&&(Eo.innerHTML=Ma),Ss=l(Ae),L=n(Ae,"DIV",{class:!0});var Ge=p(L);_(At.$$.fragment,Ge),$s=l(Ge),Po=n(Ge,"P",{"data-svelte-h":!0}),h(Po)!=="svelte-x5e4wz"&&(Po.innerHTML=Fa),Ms=l(Ge),_(ze.$$.fragment,Ge),Fs=l(Ge),_(Ue.$$.fragment,Ge),Ge.forEach(t),Ae.forEach(t),Kr=l(e),nr=n(e,"P",{}),p(nr).forEach(t),this.h()},h(){m(i,"name","hf:doc:metadata"),m(i,"content",JSON.stringify(ul)),m(d,"id","segformer"),m(d,"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"),m(d,"href","#segformer"),m(w,"class","relative group"),m(ie,"id","overview"),m(ie,"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"),m(ie,"href","#overview"),m(q,"class","relative group"),m(Ke,"width","600"),Ya(Ke.src,Ws="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/segformer_architecture.png")||m(Ke,"src",Ws),m(de,"id","resources"),m(de,"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"),m(de,"href","#resources"),m(X,"class","relative group"),m(ce,"id","transformers.SegformerConfig"),m(ce,"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"),m(ce,"href","#transformers.SegformerConfig"),m(D,"class","relative group"),m(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fe,"id","transformers.SegformerFeatureExtractor"),m(fe,"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"),m(fe,"href","#transformers.SegformerFeatureExtractor"),m(Y,"class","relative group"),m(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pe,"id","transformers.SegformerImageProcessor"),m(pe,"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"),m(pe,"href","#transformers.SegformerImageProcessor"),m(Q,"class","relative group"),m(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_e,"id","transformers.SegformerModel"),m(_e,"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"),m(_e,"href","#transformers.SegformerModel"),m(O,"class","relative group"),m(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ye,"id","transformers.SegformerDecodeHead"),m(ye,"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"),m(ye,"href","#transformers.SegformerDecodeHead"),m(K,"class","relative group"),m(_o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Te,"id","transformers.SegformerForImageClassification"),m(Te,"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"),m(Te,"href","#transformers.SegformerForImageClassification"),m(te,"class","relative group"),m(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m($e,"id","transformers.SegformerForSemanticSegmentation"),m($e,"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"),m($e,"href","#transformers.SegformerForSemanticSegmentation"),m(oe,"class","relative group"),m(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(xe,"id","transformers.TFSegformerDecodeHead"),m(xe,"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"),m(xe,"href","#transformers.TFSegformerDecodeHead"),m(re,"class","relative group"),m(Fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ce,"id","transformers.TFSegformerModel"),m(Ce,"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"),m(Ce,"href","#transformers.TFSegformerModel"),m(se,"class","relative group"),m(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ke,"id","transformers.TFSegformerForImageClassification"),m(ke,"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"),m(ke,"href","#transformers.TFSegformerForImageClassification"),m(ae,"class","relative group"),m(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ze,"id","transformers.TFSegformerForSemanticSegmentation"),m(Ze,"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"),m(Ze,"href","#transformers.TFSegformerForSemanticSegmentation"),m(le,"class","relative group"),m(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,s){o(document.head,i),c(e,S,s),c(e,f,s),c(e,g,s),c(e,w,s),o(w,d),o(d,$),b(qe,$,null),o(w,_n),o(w,Ot),c(e,gr,s),c(e,q,s),o(q,ie),o(ie,Ao),b(Xe,Ao,null),o(q,bn),o(q,Kt),c(e,pr,s),c(e,De,s),c(e,hr,s),c(e,Ye,s),c(e,ur,s),c(e,Qe,s),c(e,_r,s),c(e,Oe,s),c(e,br,s),c(e,Ke,s),c(e,vr,s),c(e,et,s),c(e,yr,s),c(e,tt,s),c(e,Tr,s),c(e,ot,s),c(e,wr,s),c(e,rt,s),c(e,Sr,s),c(e,nt,s),c(e,$r,s),c(e,X,s),o(X,de),o(de,Go),b(st,Go,null),o(X,vn),o(X,eo),c(e,Mr,s),c(e,at,s),c(e,Fr,s),b(lt,e,s),c(e,xr,s),c(e,it,s),c(e,Cr,s),c(e,dt,s),c(e,Ir,s),c(e,ct,s),c(e,jr,s),c(e,mt,s),c(e,kr,s),c(e,D,s),o(D,ce),o(ce,qo),b(ft,qo,null),o(D,yn),o(D,to),c(e,Jr,s),c(e,I,s),b(gt,I,null),o(I,Tn),o(I,oo),o(I,wn),o(I,ro),o(I,Sn),b(me,I,null),c(e,Wr,s),c(e,Y,s),o(Y,fe),o(fe,Xo),b(pt,Xo,null),o(Y,$n),o(Y,no),c(e,Zr,s),c(e,H,s),b(ht,H,null),o(H,Mn),o(H,A),b(ut,A,null),o(A,Fn),o(A,so),o(A,xn),o(A,ao),o(H,Cn),o(H,ge),b(_t,ge,null),o(ge,In),o(ge,lo),c(e,zr,s),c(e,Q,s),o(Q,pe),o(pe,Do),b(bt,Do,null),o(Q,jn),o(Q,io),c(e,Ur,s),c(e,j,s),b(vt,j,null),o(j,kn),o(j,co),o(j,Jn),o(j,he),b(yt,he,null),o(he,Wn),o(he,mo),o(j,Zn),o(j,ue),b(Tt,ue,null),o(ue,zn),o(ue,fo),c(e,Nr,s),c(e,O,s),o(O,_e),o(_e,Yo),b(wt,Yo,null),o(O,Un),o(O,go),c(e,Er,s),c(e,R,s),b(St,R,null),o(R,Nn),o(R,po),o(R,En),o(R,z),b($t,z,null),o(z,Pn),o(z,ho),o(z,Ln),b(be,z,null),o(z,Hn),b(ve,z,null),c(e,Pr,s),c(e,K,s),o(K,ye),o(ye,Qo),b(Mt,Qo,null),o(K,Rn),o(K,uo),c(e,Lr,s),c(e,ee,s),b(Ft,ee,null),o(ee,Bn),o(ee,_o),b(xt,_o,null),c(e,Hr,s),c(e,te,s),o(te,Te),o(Te,Oo),b(Ct,Oo,null),o(te,Vn),o(te,bo),c(e,Rr,s),c(e,k,s),b(It,k,null),o(k,An),o(k,vo),o(k,Gn),o(k,yo),o(k,qn),o(k,U),b(jt,U,null),o(U,Xn),o(U,To),o(U,Dn),b(we,U,null),o(U,Yn),b(Se,U,null),c(e,Br,s),c(e,oe,s),o(oe,$e),o($e,Ko),b(kt,Ko,null),o(oe,Qn),o(oe,wo),c(e,Vr,s),c(e,B,s),b(Jt,B,null),o(B,On),o(B,So),o(B,Kn),o(B,N),b(Wt,N,null),o(N,es),o(N,$o),o(N,ts),b(Me,N,null),o(N,os),b(Fe,N,null),c(e,Ar,s),c(e,re,s),o(re,xe),o(xe,er),b(Zt,er,null),o(re,rs),o(re,Mo),c(e,Gr,s),c(e,ne,s),b(zt,ne,null),o(ne,ns),o(ne,Fo),b(Ut,Fo,null),c(e,qr,s),c(e,se,s),o(se,Ce),o(Ce,tr),b(Nt,tr,null),o(se,ss),o(se,xo),c(e,Xr,s),c(e,J,s),b(Et,J,null),o(J,as),o(J,Co),o(J,ls),o(J,Io),o(J,is),o(J,E),b(Pt,E,null),o(E,ds),o(E,jo),o(E,cs),b(Ie,E,null),o(E,ms),b(je,E,null),c(e,Dr,s),c(e,ae,s),o(ae,ke),o(ke,or),b(Lt,or,null),o(ae,fs),o(ae,ko),c(e,Yr,s),c(e,x,s),b(Ht,x,null),o(x,gs),o(x,Jo),o(x,ps),o(x,Wo),o(x,hs),o(x,Zo),o(x,us),o(x,P),b(Rt,P,null),o(P,_s),o(P,zo),o(P,bs),b(Je,P,null),o(P,vs),b(We,P,null),c(e,Qr,s),c(e,le,s),o(le,Ze),o(Ze,rr),b(Bt,rr,null),o(le,ys),o(le,Uo),c(e,Or,s),c(e,W,s),b(Vt,W,null),o(W,Ts),o(W,No),o(W,ws),o(W,Eo),o(W,Ss),o(W,L),b(At,L,null),o(L,$s),o(L,Po),o(L,Ms),b(ze,L,null),o(L,Fs),b(Ue,L,null),c(e,Kr,s),c(e,nr,s),en=!0},p(e,[s]){const Gt={};s&2&&(Gt.$$scope={dirty:s,ctx:e}),me.$set(Gt);const sr={};s&2&&(sr.$$scope={dirty:s,ctx:e}),be.$set(sr);const ar={};s&2&&(ar.$$scope={dirty:s,ctx:e}),ve.$set(ar);const qt={};s&2&&(qt.$$scope={dirty:s,ctx:e}),we.$set(qt);const lr={};s&2&&(lr.$$scope={dirty:s,ctx:e}),Se.$set(lr);const ir={};s&2&&(ir.$$scope={dirty:s,ctx:e}),Me.$set(ir);const Xt={};s&2&&(Xt.$$scope={dirty:s,ctx:e}),Fe.$set(Xt);const dr={};s&2&&(dr.$$scope={dirty:s,ctx:e}),Ie.$set(dr);const cr={};s&2&&(cr.$$scope={dirty:s,ctx:e}),je.$set(cr);const Dt={};s&2&&(Dt.$$scope={dirty:s,ctx:e}),Je.$set(Dt);const mr={};s&2&&(mr.$$scope={dirty:s,ctx:e}),We.$set(mr);const fr={};s&2&&(fr.$$scope={dirty:s,ctx:e}),ze.$set(fr);const V={};s&2&&(V.$$scope={dirty:s,ctx:e}),Ue.$set(V)},i(e){en||(v(qe.$$.fragment,e),v(Xe.$$.fragment,e),v(st.$$.fragment,e),v(lt.$$.fragment,e),v(ft.$$.fragment,e),v(gt.$$.fragment,e),v(me.$$.fragment,e),v(pt.$$.fragment,e),v(ht.$$.fragment,e),v(ut.$$.fragment,e),v(_t.$$.fragment,e),v(bt.$$.fragment,e),v(vt.$$.fragment,e),v(yt.$$.fragment,e),v(Tt.$$.fragment,e),v(wt.$$.fragment,e),v(St.$$.fragment,e),v($t.$$.fragment,e),v(be.$$.fragment,e),v(ve.$$.fragment,e),v(Mt.$$.fragment,e),v(Ft.$$.fragment,e),v(xt.$$.fragment,e),v(Ct.$$.fragment,e),v(It.$$.fragment,e),v(jt.$$.fragment,e),v(we.$$.fragment,e),v(Se.$$.fragment,e),v(kt.$$.fragment,e),v(Jt.$$.fragment,e),v(Wt.$$.fragment,e),v(Me.$$.fragment,e),v(Fe.$$.fragment,e),v(Zt.$$.fragment,e),v(zt.$$.fragment,e),v(Ut.$$.fragment,e),v(Nt.$$.fragment,e),v(Et.$$.fragment,e),v(Pt.$$.fragment,e),v(Ie.$$.fragment,e),v(je.$$.fragment,e),v(Lt.$$.fragment,e),v(Ht.$$.fragment,e),v(Rt.$$.fragment,e),v(Je.$$.fragment,e),v(We.$$.fragment,e),v(Bt.$$.fragment,e),v(Vt.$$.fragment,e),v(At.$$.fragment,e),v(ze.$$.fragment,e),v(Ue.$$.fragment,e),en=!0)},o(e){y(qe.$$.fragment,e),y(Xe.$$.fragment,e),y(st.$$.fragment,e),y(lt.$$.fragment,e),y(ft.$$.fragment,e),y(gt.$$.fragment,e),y(me.$$.fragment,e),y(pt.$$.fragment,e),y(ht.$$.fragment,e),y(ut.$$.fragment,e),y(_t.$$.fragment,e),y(bt.$$.fragment,e),y(vt.$$.fragment,e),y(yt.$$.fragment,e),y(Tt.$$.fragment,e),y(wt.$$.fragment,e),y(St.$$.fragment,e),y($t.$$.fragment,e),y(be.$$.fragment,e),y(ve.$$.fragment,e),y(Mt.$$.fragment,e),y(Ft.$$.fragment,e),y(xt.$$.fragment,e),y(Ct.$$.fragment,e),y(It.$$.fragment,e),y(jt.$$.fragment,e),y(we.$$.fragment,e),y(Se.$$.fragment,e),y(kt.$$.fragment,e),y(Jt.$$.fragment,e),y(Wt.$$.fragment,e),y(Me.$$.fragment,e),y(Fe.$$.fragment,e),y(Zt.$$.fragment,e),y(zt.$$.fragment,e),y(Ut.$$.fragment,e),y(Nt.$$.fragment,e),y(Et.$$.fragment,e),y(Pt.$$.fragment,e),y(Ie.$$.fragment,e),y(je.$$.fragment,e),y(Lt.$$.fragment,e),y(Ht.$$.fragment,e),y(Rt.$$.fragment,e),y(Je.$$.fragment,e),y(We.$$.fragment,e),y(Bt.$$.fragment,e),y(Vt.$$.fragment,e),y(At.$$.fragment,e),y(ze.$$.fragment,e),y(Ue.$$.fragment,e),en=!1},d(e){e&&(t(S),t(f),t(g),t(w),t(gr),t(q),t(pr),t(De),t(hr),t(Ye),t(ur),t(Qe),t(_r),t(Oe),t(br),t(Ke),t(vr),t(et),t(yr),t(tt),t(Tr),t(ot),t(wr),t(rt),t(Sr),t(nt),t($r),t(X),t(Mr),t(at),t(Fr),t(xr),t(it),t(Cr),t(dt),t(Ir),t(ct),t(jr),t(mt),t(kr),t(D),t(Jr),t(I),t(Wr),t(Y),t(Zr),t(H),t(zr),t(Q),t(Ur),t(j),t(Nr),t(O),t(Er),t(R),t(Pr),t(K),t(Lr),t(ee),t(Hr),t(te),t(Rr),t(k),t(Br),t(oe),t(Vr),t(B),t(Ar),t(re),t(Gr),t(ne),t(qr),t(se),t(Xr),t(J),t(Dr),t(ae),t(Yr),t(x),t(Qr),t(le),t(Or),t(W),t(Kr),t(nr)),t(i),T(qe),T(Xe),T(st),T(lt,e),T(ft),T(gt),T(me),T(pt),T(ht),T(ut),T(_t),T(bt),T(vt),T(yt),T(Tt),T(wt),T(St),T($t),T(be),T(ve),T(Mt),T(Ft),T(xt),T(Ct),T(It),T(jt),T(we),T(Se),T(kt),T(Jt),T(Wt),T(Me),T(Fe),T(Zt),T(zt),T(Ut),T(Nt),T(Et),T(Pt),T(Ie),T(je),T(Lt),T(Ht),T(Rt),T(Je),T(We),T(Bt),T(Vt),T(At),T(ze),T(Ue)}}}const ul={local:"segformer",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.SegformerConfig",title:"SegformerConfig"},{local:"transformers.SegformerFeatureExtractor",title:"SegformerFeatureExtractor"},{local:"transformers.SegformerImageProcessor",title:"SegformerImageProcessor"},{local:"transformers.SegformerModel",title:"SegformerModel"},{local:"transformers.SegformerDecodeHead",title:"SegformerDecodeHead"},{local:"transformers.SegformerForImageClassification",title:"SegformerForImageClassification"},{local:"transformers.SegformerForSemanticSegmentation",title:"SegformerForSemanticSegmentation"},{local:"transformers.TFSegformerDecodeHead",title:"TFSegformerDecodeHead"},{local:"transformers.TFSegformerModel",title:"TFSegformerModel"},{local:"transformers.TFSegformerForImageClassification",title:"TFSegformerForImageClassification"},{local:"transformers.TFSegformerForSemanticSegmentation",title:"TFSegformerForSemanticSegmentation"}],title:"SegFormer"};function _l(M){return Qa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fl extends Oa{constructor(i){super(),Ka(this,i,_l,hl,Da,{})}}export{Fl as component};
