import{s as Jn,f as Wn,o as Zn,n as z}from"../chunks/scheduler.9bc65507.js";import{S as zn,i as kn,g as d,s,r as p,A as Un,h as m,f as t,c as a,j as S,u as f,x as T,k as M,y as l,a as i,v as h,d as u,t as _,w as b}from"../chunks/index.707bf1b6.js";import{T as to}from"../chunks/Tip.c2ecdbf4.js";import{D as F}from"../chunks/Docstring.17db21ae.js";import{C as Ft}from"../chunks/CodeBlock.54a9f38d.js";import{E as St}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{P as Nn}from"../chunks/PipelineTag.44585822.js";import{H as C}from"../chunks/Heading.342b1fa6.js";function Ln($){let r,y="Example:",c,g,w;return g=new Ft({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(){r=d("p"),r.textContent=y,c=s(),p(g.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),T(r)!=="svelte-11lpom8"&&(r.textContent=y),c=a(n),f(g.$$.fragment,n)},m(n,v){i(n,r,v),i(n,c,v),h(g,n,v),w=!0},p:z,i(n){w||(u(g.$$.fragment,n),w=!0)},o(n){_(g.$$.fragment,n),w=!1},d(n){n&&(t(r),t(c)),b(g,n)}}}function Pn($){let r,y=`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(){r=d("p"),r.innerHTML=y},l(c){r=m(c,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=y)},m(c,g){i(c,r,g)},p:z,d(c){c&&t(r)}}}function Rn($){let r,y="Example:",c,g,w;return g=new Ft({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(){r=d("p"),r.textContent=y,c=s(),p(g.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),T(r)!=="svelte-11lpom8"&&(r.textContent=y),c=a(n),f(g.$$.fragment,n)},m(n,v){i(n,r,v),i(n,c,v),h(g,n,v),w=!0},p:z,i(n){w||(u(g.$$.fragment,n),w=!0)},o(n){_(g.$$.fragment,n),w=!1},d(n){n&&(t(r),t(c)),b(g,n)}}}function En($){let r,y=`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(){r=d("p"),r.innerHTML=y},l(c){r=m(c,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=y)},m(c,g){i(c,r,g)},p:z,d(c){c&&t(r)}}}function Bn($){let r,y="Example:",c,g,w;return g=new Ft({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(){r=d("p"),r.textContent=y,c=s(),p(g.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),T(r)!=="svelte-11lpom8"&&(r.textContent=y),c=a(n),f(g.$$.fragment,n)},m(n,v){i(n,r,v),i(n,c,v),h(g,n,v),w=!0},p:z,i(n){w||(u(g.$$.fragment,n),w=!0)},o(n){_(g.$$.fragment,n),w=!1},d(n){n&&(t(r),t(c)),b(g,n)}}}function Hn($){let r,y=`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(){r=d("p"),r.innerHTML=y},l(c){r=m(c,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=y)},m(c,g){i(c,r,g)},p:z,d(c){c&&t(r)}}}function Vn($){let r,y="Examples:",c,g,w;return g=new Ft({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(){r=d("p"),r.textContent=y,c=s(),p(g.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),T(r)!=="svelte-kvfsh7"&&(r.textContent=y),c=a(n),f(g.$$.fragment,n)},m(n,v){i(n,r,v),i(n,c,v),h(g,n,v),w=!0},p:z,i(n){w||(u(g.$$.fragment,n),w=!0)},o(n){_(g.$$.fragment,n),w=!1},d(n){n&&(t(r),t(c)),b(g,n)}}}function Gn($){let r,y=`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(){r=d("p"),r.innerHTML=y},l(c){r=m(c,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=y)},m(c,g){i(c,r,g)},p:z,d(c){c&&t(r)}}}function qn($){let r,y="Example:",c,g,w;return g=new Ft({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(){r=d("p"),r.textContent=y,c=s(),p(g.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),T(r)!=="svelte-11lpom8"&&(r.textContent=y),c=a(n),f(g.$$.fragment,n)},m(n,v){i(n,r,v),i(n,c,v),h(g,n,v),w=!0},p:z,i(n){w||(u(g.$$.fragment,n),w=!0)},o(n){_(g.$$.fragment,n),w=!1},d(n){n&&(t(r),t(c)),b(g,n)}}}function Xn($){let r,y=`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(){r=d("p"),r.innerHTML=y},l(c){r=m(c,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=y)},m(c,g){i(c,r,g)},p:z,d(c){c&&t(r)}}}function Yn($){let r,y="Example:",c,g,w;return g=new Ft({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(){r=d("p"),r.textContent=y,c=s(),p(g.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),T(r)!=="svelte-11lpom8"&&(r.textContent=y),c=a(n),f(g.$$.fragment,n)},m(n,v){i(n,r,v),i(n,c,v),h(g,n,v),w=!0},p:z,i(n){w||(u(g.$$.fragment,n),w=!0)},o(n){_(g.$$.fragment,n),w=!1},d(n){n&&(t(r),t(c)),b(g,n)}}}function Dn($){let r,y=`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(){r=d("p"),r.innerHTML=y},l(c){r=m(c,"P",{"data-svelte-h":!0}),T(r)!=="svelte-fincs2"&&(r.innerHTML=y)},m(c,g){i(c,r,g)},p:z,d(c){c&&t(r)}}}function An($){let r,y="Examples:",c,g,w;return g=new Ft({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(){r=d("p"),r.textContent=y,c=s(),p(g.$$.fragment)},l(n){r=m(n,"P",{"data-svelte-h":!0}),T(r)!=="svelte-kvfsh7"&&(r.textContent=y),c=a(n),f(g.$$.fragment,n)},m(n,v){i(n,r,v),i(n,c,v),h(g,n,v),w=!0},p:z,i(n){w||(u(g.$$.fragment,n),w=!0)},o(n){_(g.$$.fragment,n),w=!1},d(n){n&&(t(r),t(c)),b(g,n)}}}function Qn($){let r,y,c,g,w,n,v,no,Me,Hr=`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.`,so,Se,Vr="The abstract from the paper is the following:",ao,Fe,Gr=`<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>`,io,xe,qr='The figure below illustrates the architecture of SegFormer. Taken from the <a href="https://arxiv.org/abs/2105.15203" rel="nofollow">original paper</a>.',lo,Ce,Xr,mo,Ie,Yr=`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>.`,co,je,Dr="Tips:",go,Je,Ar=`<li>SegFormer consists of a hierarchical Transformer encoder, and a lightweight all-MLP decoder head.
<a href="/docs/transformers/main/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/main/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/main/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/main/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/main/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/main/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>`,po,We,Qr='<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>',fo,Ze,Or=`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>.`,ho,ze,uo,ke,Kr="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with SegFormer.",_o,Ue,bo,Ne,en='<li><a href="/docs/transformers/main/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>',To,Le,tn="Semantic segmentation:",yo,Pe,on='<li><a href="/docs/transformers/main/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/main/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>',wo,Re,rn="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.",vo,Ee,$o,I,Be,Xo,xt,nn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/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.`,Yo,Ct,sn=`Configuration objects inherit from <a href="/docs/transformers/main/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/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Do,oe,Mo,He,So,E,Ve,Ao,D,Ge,Qo,It,an="Preprocesses a batch of images and optionally segmentation maps.",Oo,jt,ln=`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.`,Ko,re,qe,er,Jt,dn=`Converts the output of <a href="/docs/transformers/main/en/model_doc/segformer#transformers.SegformerForSemanticSegmentation">SegformerForSemanticSegmentation</a> into semantic segmentation maps. Only supports
PyTorch.`,Fo,Xe,xo,j,Ye,tr,Wt,mn="Constructs a Segformer image processor.",or,ne,De,rr,Zt,cn="Preprocess an image or batch of images.",nr,se,Ae,sr,zt,gn=`Converts the output of <a href="/docs/transformers/main/en/model_doc/segformer#transformers.SegformerForSemanticSegmentation">SegformerForSemanticSegmentation</a> into semantic segmentation maps. Only supports
PyTorch.`,Co,Qe,Io,B,Oe,ar,kt,pn=`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.`,ir,k,Ke,lr,Ut,fn='The <a href="/docs/transformers/main/en/model_doc/segformer#transformers.SegformerModel">SegformerModel</a> forward method, overrides the <code>__call__</code> special method.',dr,ae,mr,ie,jo,et,Jo,Q,tt,cr,Nt,ot,Wo,rt,Zo,J,nt,gr,Lt,hn=`SegFormer Model transformer with an image classification head on top (a linear layer on top of the final hidden
states) e.g. for ImageNet.`,pr,Pt,un=`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.`,fr,U,st,hr,Rt,_n='The <a href="/docs/transformers/main/en/model_doc/segformer#transformers.SegformerForImageClassification">SegformerForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',ur,le,_r,de,zo,at,ko,H,it,br,Et,bn=`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.`,Tr,N,lt,yr,Bt,Tn='The <a href="/docs/transformers/main/en/model_doc/segformer#transformers.SegformerForSemanticSegmentation">SegformerForSemanticSegmentation</a> forward method, overrides the <code>__call__</code> special method.',wr,me,vr,ce,Uo,dt,No,O,mt,$r,Ht,ct,Lo,gt,Po,W,pt,Mr,Vt,yn=`The bare SegFormer encoder (Mix-Transformer) outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/main/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.)`,Sr,Gt,wn=`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.`,Fr,L,ft,xr,qt,vn='The <a href="/docs/transformers/main/en/model_doc/segformer#transformers.TFSegformerModel">TFSegformerModel</a> forward method, overrides the <code>__call__</code> special method.',Cr,ge,Ir,pe,Ro,ht,Eo,x,ut,jr,Xt,$n=`SegFormer Model transformer with an image classification head on top (a linear layer on top of the final hidden
states) e.g. for ImageNet.`,Jr,Yt,Mn=`This model inherits from <a href="/docs/transformers/main/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.)`,Wr,Dt,Sn=`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.`,Zr,P,_t,zr,At,Fn='The <a href="/docs/transformers/main/en/model_doc/segformer#transformers.TFSegformerForImageClassification">TFSegformerForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',kr,fe,Ur,he,Bo,bt,Ho,Z,Tt,Nr,Qt,xn=`SegFormer Model transformer with an all-MLP decode head on top e.g. for ADE20k, CityScapes.
This model inherits from <a href="/docs/transformers/main/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.)`,Lr,Ot,Cn=`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.`,Pr,R,yt,Rr,Kt,In='The <a href="/docs/transformers/main/en/model_doc/segformer#transformers.TFSegformerForSemanticSegmentation">TFSegformerForSemanticSegmentation</a> forward method, overrides the <code>__call__</code> special method.',Er,ue,Br,_e,Vo,oo,Go;return w=new C({props:{title:"SegFormer",local:"segformer",headingTag:"h1"}}),v=new C({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ze=new C({props:{title:"Resources",local:"resources",headingTag:"h2"}}),Ue=new Nn({props:{pipeline:"image-classification"}}),Ee=new C({props:{title:"SegformerConfig",local:"transformers.SegformerConfig",headingTag:"h2"}}),Be=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 <code>[2, 2, 2, 2]</code>) &#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 <code>[8, 4, 2, 1]</code>) &#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 <code>[32, 64, 160, 256]</code>) &#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 <code>[7, 3, 3, 3]</code>) &#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 <code>[4, 2, 2, 2]</code>) &#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 <code>[1, 2, 5, 8]</code>) &#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 <code>[4, 4, 4, 4]</code>) &#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-06) &#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/main/src/transformers/models/segformer/configuration_segformer.py#L38"}}),oe=new St({props:{anchor:"transformers.SegformerConfig.example",$$slots:{default:[Ln]},$$scope:{ctx:$}}}),He=new C({props:{title:"SegformerFeatureExtractor",local:"transformers.SegformerFeatureExtractor",headingTag:"h2"}}),Ve=new F({props:{name:"class transformers.SegformerFeatureExtractor",anchor:"transformers.SegformerFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/segformer/feature_extraction_segformer.py#L26"}}),Ge=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/main/src/transformers/models/segformer/image_processing_segformer.py#L296"}}),qe=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/main/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/main/src/transformers/models/segformer/image_processing_segformer.py#L441",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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:`<script context="module">export const metadata = 'undefined';<\/script>


<p>semantic_segmentation</p>
`}}),Xe=new C({props:{title:"SegformerImageProcessor",local:"transformers.SegformerImageProcessor",headingTag:"h2"}}),Ye=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>Resampling.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/main/src/transformers/models/segformer/image_processing_segformer.py#L49"}}),De=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/main/src/transformers/models/segformer/image_processing_segformer.py#L305"}}),Ae=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/main/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/main/src/transformers/models/segformer/image_processing_segformer.py#L441",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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:`<script context="module">export const metadata = 'undefined';<\/script>


<p>semantic_segmentation</p>
`}}),Qe=new C({props:{title:"SegformerModel",local:"transformers.SegformerModel",headingTag:"h2"}}),Oe=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/segformer/modeling_segformer.py#L510"}}),Ke=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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/segformer/modeling_segformer.py#L529",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ae=new to({props:{$$slots:{default:[Pn]},$$scope:{ctx:$}}}),ie=new St({props:{anchor:"transformers.SegformerModel.forward.example",$$slots:{default:[Rn]},$$scope:{ctx:$}}}),et=new C({props:{title:"SegformerDecodeHead",local:"transformers.SegformerDecodeHead",headingTag:"h2"}}),tt=new F({props:{name:"class transformers.SegformerDecodeHead",anchor:"transformers.SegformerDecodeHead",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/segformer/modeling_segformer.py#L681"}}),ot=new F({props:{name:"forward",anchor:"transformers.SegformerDecodeHead.forward",parameters:[{name:"encoder_hidden_states",val:": FloatTensor"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/segformer/modeling_segformer.py#L706"}}),rt=new C({props:{title:"SegformerForImageClassification",local:"transformers.SegformerForImageClassification",headingTag:"h2"}}),nt=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/segformer/modeling_segformer.py#L575"}}),st=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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/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/main/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/main/src/transformers/models/segformer/modeling_segformer.py#L588",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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/main/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.segformer.modeling_segformer.SegFormerImageClassifierOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),le=new to({props:{$$slots:{default:[En]},$$scope:{ctx:$}}}),de=new St({props:{anchor:"transformers.SegformerForImageClassification.forward.example",$$slots:{default:[Bn]},$$scope:{ctx:$}}}),at=new C({props:{title:"SegformerForSemanticSegmentation",local:"transformers.SegformerForSemanticSegmentation",headingTag:"h2"}}),it=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/segformer/modeling_segformer.py#L743"}}),lt=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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/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/main/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/main/src/transformers/models/segformer/modeling_segformer.py#L752",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),me=new to({props:{$$slots:{default:[Hn]},$$scope:{ctx:$}}}),ce=new St({props:{anchor:"transformers.SegformerForSemanticSegmentation.forward.example",$$slots:{default:[Vn]},$$scope:{ctx:$}}}),dt=new C({props:{title:"TFSegformerDecodeHead",local:"transformers.TFSegformerDecodeHead",headingTag:"h2"}}),mt=new F({props:{name:"class transformers.TFSegformerDecodeHead",anchor:"transformers.TFSegformerDecodeHead",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/segformer/modeling_tf_segformer.py#L690"}}),ct=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/main/src/transformers/models/segformer/modeling_tf_segformer.py#L712"}}),gt=new C({props:{title:"TFSegformerModel",local:"transformers.TFSegformerModel",headingTag:"h2"}}),pt=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/main/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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/segformer/modeling_tf_segformer.py#L574"}}),ft=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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/segformer/modeling_tf_segformer.py#L582",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ge=new to({props:{$$slots:{default:[Gn]},$$scope:{ctx:$}}}),pe=new St({props:{anchor:"transformers.TFSegformerModel.call.example",$$slots:{default:[qn]},$$scope:{ctx:$}}}),ht=new C({props:{title:"TFSegformerForImageClassification",local:"transformers.TFSegformerForImageClassification",headingTag:"h2"}}),ut=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/main/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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/segformer/modeling_tf_segformer.py#L616"}}),_t=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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/segformer/modeling_tf_segformer.py#L626",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),fe=new to({props:{$$slots:{default:[Xn]},$$scope:{ctx:$}}}),he=new St({props:{anchor:"transformers.TFSegformerForImageClassification.call.example",$$slots:{default:[Yn]},$$scope:{ctx:$}}}),bt=new C({props:{title:"TFSegformerForSemanticSegmentation",local:"transformers.TFSegformerForSemanticSegmentation",headingTag:"h2"}}),Tt=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/main/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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/segformer/modeling_tf_segformer.py#L749"}}),yt=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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/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/main/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/main/src/transformers/models/segformer/modeling_tf_segformer.py#L775",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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/main/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.modeling_tf_outputs.TFSemanticSegmenterOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),ue=new to({props:{$$slots:{default:[Dn]},$$scope:{ctx:$}}}),_e=new St({props:{anchor:"transformers.TFSegformerForSemanticSegmentation.call.example",$$slots:{default:[An]},$$scope:{ctx:$}}}),{c(){r=d("meta"),y=s(),c=d("p"),g=s(),p(w.$$.fragment),n=s(),p(v.$$.fragment),no=s(),Me=d("p"),Me.innerHTML=Hr,so=s(),Se=d("p"),Se.textContent=Vr,ao=s(),Fe=d("p"),Fe.innerHTML=Gr,io=s(),xe=d("p"),xe.innerHTML=qr,lo=s(),Ce=d("img"),mo=s(),Ie=d("p"),Ie.innerHTML=Yr,co=s(),je=d("p"),je.textContent=Dr,go=s(),Je=d("ul"),Je.innerHTML=Ar,po=s(),We=d("table"),We.innerHTML=Qr,fo=s(),Ze=d("p"),Ze.innerHTML=Or,ho=s(),p(ze.$$.fragment),uo=s(),ke=d("p"),ke.textContent=Kr,_o=s(),p(Ue.$$.fragment),bo=s(),Ne=d("ul"),Ne.innerHTML=en,To=s(),Le=d("p"),Le.textContent=tn,yo=s(),Pe=d("ul"),Pe.innerHTML=on,wo=s(),Re=d("p"),Re.textContent=rn,vo=s(),p(Ee.$$.fragment),$o=s(),I=d("div"),p(Be.$$.fragment),Xo=s(),xt=d("p"),xt.innerHTML=nn,Yo=s(),Ct=d("p"),Ct.innerHTML=sn,Do=s(),p(oe.$$.fragment),Mo=s(),p(He.$$.fragment),So=s(),E=d("div"),p(Ve.$$.fragment),Ao=s(),D=d("div"),p(Ge.$$.fragment),Qo=s(),It=d("p"),It.textContent=an,Oo=s(),jt=d("p"),jt.innerHTML=ln,Ko=s(),re=d("div"),p(qe.$$.fragment),er=s(),Jt=d("p"),Jt.innerHTML=dn,Fo=s(),p(Xe.$$.fragment),xo=s(),j=d("div"),p(Ye.$$.fragment),tr=s(),Wt=d("p"),Wt.textContent=mn,or=s(),ne=d("div"),p(De.$$.fragment),rr=s(),Zt=d("p"),Zt.textContent=cn,nr=s(),se=d("div"),p(Ae.$$.fragment),sr=s(),zt=d("p"),zt.innerHTML=gn,Co=s(),p(Qe.$$.fragment),Io=s(),B=d("div"),p(Oe.$$.fragment),ar=s(),kt=d("p"),kt.innerHTML=pn,ir=s(),k=d("div"),p(Ke.$$.fragment),lr=s(),Ut=d("p"),Ut.innerHTML=fn,dr=s(),p(ae.$$.fragment),mr=s(),p(ie.$$.fragment),jo=s(),p(et.$$.fragment),Jo=s(),Q=d("div"),p(tt.$$.fragment),cr=s(),Nt=d("div"),p(ot.$$.fragment),Wo=s(),p(rt.$$.fragment),Zo=s(),J=d("div"),p(nt.$$.fragment),gr=s(),Lt=d("p"),Lt.textContent=hn,pr=s(),Pt=d("p"),Pt.innerHTML=un,fr=s(),U=d("div"),p(st.$$.fragment),hr=s(),Rt=d("p"),Rt.innerHTML=_n,ur=s(),p(le.$$.fragment),_r=s(),p(de.$$.fragment),zo=s(),p(at.$$.fragment),ko=s(),H=d("div"),p(it.$$.fragment),br=s(),Et=d("p"),Et.innerHTML=bn,Tr=s(),N=d("div"),p(lt.$$.fragment),yr=s(),Bt=d("p"),Bt.innerHTML=Tn,wr=s(),p(me.$$.fragment),vr=s(),p(ce.$$.fragment),Uo=s(),p(dt.$$.fragment),No=s(),O=d("div"),p(mt.$$.fragment),$r=s(),Ht=d("div"),p(ct.$$.fragment),Lo=s(),p(gt.$$.fragment),Po=s(),W=d("div"),p(pt.$$.fragment),Mr=s(),Vt=d("p"),Vt.innerHTML=yn,Sr=s(),Gt=d("p"),Gt.innerHTML=wn,Fr=s(),L=d("div"),p(ft.$$.fragment),xr=s(),qt=d("p"),qt.innerHTML=vn,Cr=s(),p(ge.$$.fragment),Ir=s(),p(pe.$$.fragment),Ro=s(),p(ht.$$.fragment),Eo=s(),x=d("div"),p(ut.$$.fragment),jr=s(),Xt=d("p"),Xt.textContent=$n,Jr=s(),Yt=d("p"),Yt.innerHTML=Mn,Wr=s(),Dt=d("p"),Dt.innerHTML=Sn,Zr=s(),P=d("div"),p(_t.$$.fragment),zr=s(),At=d("p"),At.innerHTML=Fn,kr=s(),p(fe.$$.fragment),Ur=s(),p(he.$$.fragment),Bo=s(),p(bt.$$.fragment),Ho=s(),Z=d("div"),p(Tt.$$.fragment),Nr=s(),Qt=d("p"),Qt.innerHTML=xn,Lr=s(),Ot=d("p"),Ot.innerHTML=Cn,Pr=s(),R=d("div"),p(yt.$$.fragment),Rr=s(),Kt=d("p"),Kt.innerHTML=In,Er=s(),p(ue.$$.fragment),Br=s(),p(_e.$$.fragment),Vo=s(),oo=d("p"),this.h()},l(e){const o=Un("svelte-u9bgzb",document.head);r=m(o,"META",{name:!0,content:!0}),o.forEach(t),y=a(e),c=m(e,"P",{}),S(c).forEach(t),g=a(e),f(w.$$.fragment,e),n=a(e),f(v.$$.fragment,e),no=a(e),Me=m(e,"P",{"data-svelte-h":!0}),T(Me)!=="svelte-1rmm4pp"&&(Me.innerHTML=Hr),so=a(e),Se=m(e,"P",{"data-svelte-h":!0}),T(Se)!=="svelte-vfdo9a"&&(Se.textContent=Vr),ao=a(e),Fe=m(e,"P",{"data-svelte-h":!0}),T(Fe)!=="svelte-1abqxvb"&&(Fe.innerHTML=Gr),io=a(e),xe=m(e,"P",{"data-svelte-h":!0}),T(xe)!=="svelte-1xgqs41"&&(xe.innerHTML=qr),lo=a(e),Ce=m(e,"IMG",{width:!0,src:!0}),mo=a(e),Ie=m(e,"P",{"data-svelte-h":!0}),T(Ie)!=="svelte-1794tdg"&&(Ie.innerHTML=Yr),co=a(e),je=m(e,"P",{"data-svelte-h":!0}),T(je)!=="svelte-axv494"&&(je.textContent=Dr),go=a(e),Je=m(e,"UL",{"data-svelte-h":!0}),T(Je)!=="svelte-1228c1f"&&(Je.innerHTML=Ar),po=a(e),We=m(e,"TABLE",{"data-svelte-h":!0}),T(We)!=="svelte-1u5dqy3"&&(We.innerHTML=Qr),fo=a(e),Ze=m(e,"P",{"data-svelte-h":!0}),T(Ze)!=="svelte-1srzf2y"&&(Ze.innerHTML=Or),ho=a(e),f(ze.$$.fragment,e),uo=a(e),ke=m(e,"P",{"data-svelte-h":!0}),T(ke)!=="svelte-ka71ur"&&(ke.textContent=Kr),_o=a(e),f(Ue.$$.fragment,e),bo=a(e),Ne=m(e,"UL",{"data-svelte-h":!0}),T(Ne)!=="svelte-11tmyel"&&(Ne.innerHTML=en),To=a(e),Le=m(e,"P",{"data-svelte-h":!0}),T(Le)!=="svelte-15vx5o0"&&(Le.textContent=tn),yo=a(e),Pe=m(e,"UL",{"data-svelte-h":!0}),T(Pe)!=="svelte-qu3r0v"&&(Pe.innerHTML=on),wo=a(e),Re=m(e,"P",{"data-svelte-h":!0}),T(Re)!=="svelte-1xesile"&&(Re.textContent=rn),vo=a(e),f(Ee.$$.fragment,e),$o=a(e),I=m(e,"DIV",{class:!0});var V=S(I);f(Be.$$.fragment,V),Xo=a(V),xt=m(V,"P",{"data-svelte-h":!0}),T(xt)!=="svelte-1o791ab"&&(xt.innerHTML=nn),Yo=a(V),Ct=m(V,"P",{"data-svelte-h":!0}),T(Ct)!=="svelte-o55m63"&&(Ct.innerHTML=sn),Do=a(V),f(oe.$$.fragment,V),V.forEach(t),Mo=a(e),f(He.$$.fragment,e),So=a(e),E=m(e,"DIV",{class:!0});var K=S(E);f(Ve.$$.fragment,K),Ao=a(K),D=m(K,"DIV",{class:!0});var ee=S(D);f(Ge.$$.fragment,ee),Qo=a(ee),It=m(ee,"P",{"data-svelte-h":!0}),T(It)!=="svelte-4612b7"&&(It.textContent=an),Oo=a(ee),jt=m(ee,"P",{"data-svelte-h":!0}),T(jt)!=="svelte-b84uvg"&&(jt.innerHTML=ln),ee.forEach(t),Ko=a(K),re=m(K,"DIV",{class:!0});var wt=S(re);f(qe.$$.fragment,wt),er=a(wt),Jt=m(wt,"P",{"data-svelte-h":!0}),T(Jt)!=="svelte-10ssqls"&&(Jt.innerHTML=dn),wt.forEach(t),K.forEach(t),Fo=a(e),f(Xe.$$.fragment,e),xo=a(e),j=m(e,"DIV",{class:!0});var G=S(j);f(Ye.$$.fragment,G),tr=a(G),Wt=m(G,"P",{"data-svelte-h":!0}),T(Wt)!=="svelte-ijd3ni"&&(Wt.textContent=mn),or=a(G),ne=m(G,"DIV",{class:!0});var vt=S(ne);f(De.$$.fragment,vt),rr=a(vt),Zt=m(vt,"P",{"data-svelte-h":!0}),T(Zt)!=="svelte-1x3yxsa"&&(Zt.textContent=cn),vt.forEach(t),nr=a(G),se=m(G,"DIV",{class:!0});var $t=S(se);f(Ae.$$.fragment,$t),sr=a($t),zt=m($t,"P",{"data-svelte-h":!0}),T(zt)!=="svelte-10ssqls"&&(zt.innerHTML=gn),$t.forEach(t),G.forEach(t),Co=a(e),f(Qe.$$.fragment,e),Io=a(e),B=m(e,"DIV",{class:!0});var te=S(B);f(Oe.$$.fragment,te),ar=a(te),kt=m(te,"P",{"data-svelte-h":!0}),T(kt)!=="svelte-1eq9zl9"&&(kt.innerHTML=pn),ir=a(te),k=m(te,"DIV",{class:!0});var q=S(k);f(Ke.$$.fragment,q),lr=a(q),Ut=m(q,"P",{"data-svelte-h":!0}),T(Ut)!=="svelte-jczd7l"&&(Ut.innerHTML=fn),dr=a(q),f(ae.$$.fragment,q),mr=a(q),f(ie.$$.fragment,q),q.forEach(t),te.forEach(t),jo=a(e),f(et.$$.fragment,e),Jo=a(e),Q=m(e,"DIV",{class:!0});var Mt=S(Q);f(tt.$$.fragment,Mt),cr=a(Mt),Nt=m(Mt,"DIV",{class:!0});var ro=S(Nt);f(ot.$$.fragment,ro),ro.forEach(t),Mt.forEach(t),Wo=a(e),f(rt.$$.fragment,e),Zo=a(e),J=m(e,"DIV",{class:!0});var X=S(J);f(nt.$$.fragment,X),gr=a(X),Lt=m(X,"P",{"data-svelte-h":!0}),T(Lt)!=="svelte-m32qg1"&&(Lt.textContent=hn),pr=a(X),Pt=m(X,"P",{"data-svelte-h":!0}),T(Pt)!=="svelte-68lg8f"&&(Pt.innerHTML=un),fr=a(X),U=m(X,"DIV",{class:!0});var Y=S(U);f(st.$$.fragment,Y),hr=a(Y),Rt=m(Y,"P",{"data-svelte-h":!0}),T(Rt)!=="svelte-1t07fnn"&&(Rt.innerHTML=_n),ur=a(Y),f(le.$$.fragment,Y),_r=a(Y),f(de.$$.fragment,Y),Y.forEach(t),X.forEach(t),zo=a(e),f(at.$$.fragment,e),ko=a(e),H=m(e,"DIV",{class:!0});var eo=S(H);f(it.$$.fragment,eo),br=a(eo),Et=m(eo,"P",{"data-svelte-h":!0}),T(Et)!=="svelte-x9btf5"&&(Et.innerHTML=bn),Tr=a(eo),N=m(eo,"DIV",{class:!0});var be=S(N);f(lt.$$.fragment,be),yr=a(be),Bt=m(be,"P",{"data-svelte-h":!0}),T(Bt)!=="svelte-t24qt"&&(Bt.innerHTML=Tn),wr=a(be),f(me.$$.fragment,be),vr=a(be),f(ce.$$.fragment,be),be.forEach(t),eo.forEach(t),Uo=a(e),f(dt.$$.fragment,e),No=a(e),O=m(e,"DIV",{class:!0});var qo=S(O);f(mt.$$.fragment,qo),$r=a(qo),Ht=m(qo,"DIV",{class:!0});var jn=S(Ht);f(ct.$$.fragment,jn),jn.forEach(t),qo.forEach(t),Lo=a(e),f(gt.$$.fragment,e),Po=a(e),W=m(e,"DIV",{class:!0});var Te=S(W);f(pt.$$.fragment,Te),Mr=a(Te),Vt=m(Te,"P",{"data-svelte-h":!0}),T(Vt)!=="svelte-l7vec2"&&(Vt.innerHTML=yn),Sr=a(Te),Gt=m(Te,"P",{"data-svelte-h":!0}),T(Gt)!=="svelte-1ivrf8m"&&(Gt.innerHTML=wn),Fr=a(Te),L=m(Te,"DIV",{class:!0});var ye=S(L);f(ft.$$.fragment,ye),xr=a(ye),qt=m(ye,"P",{"data-svelte-h":!0}),T(qt)!=="svelte-1bcfza5"&&(qt.innerHTML=vn),Cr=a(ye),f(ge.$$.fragment,ye),Ir=a(ye),f(pe.$$.fragment,ye),ye.forEach(t),Te.forEach(t),Ro=a(e),f(ht.$$.fragment,e),Eo=a(e),x=m(e,"DIV",{class:!0});var A=S(x);f(ut.$$.fragment,A),jr=a(A),Xt=m(A,"P",{"data-svelte-h":!0}),T(Xt)!=="svelte-m32qg1"&&(Xt.textContent=$n),Jr=a(A),Yt=m(A,"P",{"data-svelte-h":!0}),T(Yt)!=="svelte-1qaxm70"&&(Yt.innerHTML=Mn),Wr=a(A),Dt=m(A,"P",{"data-svelte-h":!0}),T(Dt)!=="svelte-1ivrf8m"&&(Dt.innerHTML=Sn),Zr=a(A),P=m(A,"DIV",{class:!0});var we=S(P);f(_t.$$.fragment,we),zr=a(we),At=m(we,"P",{"data-svelte-h":!0}),T(At)!=="svelte-p7zmrz"&&(At.innerHTML=Fn),kr=a(we),f(fe.$$.fragment,we),Ur=a(we),f(he.$$.fragment,we),we.forEach(t),A.forEach(t),Bo=a(e),f(bt.$$.fragment,e),Ho=a(e),Z=m(e,"DIV",{class:!0});var ve=S(Z);f(Tt.$$.fragment,ve),Nr=a(ve),Qt=m(ve,"P",{"data-svelte-h":!0}),T(Qt)!=="svelte-8r2i3i"&&(Qt.innerHTML=xn),Lr=a(ve),Ot=m(ve,"P",{"data-svelte-h":!0}),T(Ot)!=="svelte-1ivrf8m"&&(Ot.innerHTML=Cn),Pr=a(ve),R=m(ve,"DIV",{class:!0});var $e=S(R);f(yt.$$.fragment,$e),Rr=a($e),Kt=m($e,"P",{"data-svelte-h":!0}),T(Kt)!=="svelte-1vmjagp"&&(Kt.innerHTML=In),Er=a($e),f(ue.$$.fragment,$e),Br=a($e),f(_e.$$.fragment,$e),$e.forEach(t),ve.forEach(t),Vo=a(e),oo=m(e,"P",{}),S(oo).forEach(t),this.h()},h(){M(r,"name","hf:doc:metadata"),M(r,"content",On),M(Ce,"width","600"),Wn(Ce.src,Xr="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/segformer_architecture.png")||M(Ce,"src",Xr),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(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(re,"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,"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(se,"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(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(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(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(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(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(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(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(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(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(e,o){l(document.head,r),i(e,y,o),i(e,c,o),i(e,g,o),h(w,e,o),i(e,n,o),h(v,e,o),i(e,no,o),i(e,Me,o),i(e,so,o),i(e,Se,o),i(e,ao,o),i(e,Fe,o),i(e,io,o),i(e,xe,o),i(e,lo,o),i(e,Ce,o),i(e,mo,o),i(e,Ie,o),i(e,co,o),i(e,je,o),i(e,go,o),i(e,Je,o),i(e,po,o),i(e,We,o),i(e,fo,o),i(e,Ze,o),i(e,ho,o),h(ze,e,o),i(e,uo,o),i(e,ke,o),i(e,_o,o),h(Ue,e,o),i(e,bo,o),i(e,Ne,o),i(e,To,o),i(e,Le,o),i(e,yo,o),i(e,Pe,o),i(e,wo,o),i(e,Re,o),i(e,vo,o),h(Ee,e,o),i(e,$o,o),i(e,I,o),h(Be,I,null),l(I,Xo),l(I,xt),l(I,Yo),l(I,Ct),l(I,Do),h(oe,I,null),i(e,Mo,o),h(He,e,o),i(e,So,o),i(e,E,o),h(Ve,E,null),l(E,Ao),l(E,D),h(Ge,D,null),l(D,Qo),l(D,It),l(D,Oo),l(D,jt),l(E,Ko),l(E,re),h(qe,re,null),l(re,er),l(re,Jt),i(e,Fo,o),h(Xe,e,o),i(e,xo,o),i(e,j,o),h(Ye,j,null),l(j,tr),l(j,Wt),l(j,or),l(j,ne),h(De,ne,null),l(ne,rr),l(ne,Zt),l(j,nr),l(j,se),h(Ae,se,null),l(se,sr),l(se,zt),i(e,Co,o),h(Qe,e,o),i(e,Io,o),i(e,B,o),h(Oe,B,null),l(B,ar),l(B,kt),l(B,ir),l(B,k),h(Ke,k,null),l(k,lr),l(k,Ut),l(k,dr),h(ae,k,null),l(k,mr),h(ie,k,null),i(e,jo,o),h(et,e,o),i(e,Jo,o),i(e,Q,o),h(tt,Q,null),l(Q,cr),l(Q,Nt),h(ot,Nt,null),i(e,Wo,o),h(rt,e,o),i(e,Zo,o),i(e,J,o),h(nt,J,null),l(J,gr),l(J,Lt),l(J,pr),l(J,Pt),l(J,fr),l(J,U),h(st,U,null),l(U,hr),l(U,Rt),l(U,ur),h(le,U,null),l(U,_r),h(de,U,null),i(e,zo,o),h(at,e,o),i(e,ko,o),i(e,H,o),h(it,H,null),l(H,br),l(H,Et),l(H,Tr),l(H,N),h(lt,N,null),l(N,yr),l(N,Bt),l(N,wr),h(me,N,null),l(N,vr),h(ce,N,null),i(e,Uo,o),h(dt,e,o),i(e,No,o),i(e,O,o),h(mt,O,null),l(O,$r),l(O,Ht),h(ct,Ht,null),i(e,Lo,o),h(gt,e,o),i(e,Po,o),i(e,W,o),h(pt,W,null),l(W,Mr),l(W,Vt),l(W,Sr),l(W,Gt),l(W,Fr),l(W,L),h(ft,L,null),l(L,xr),l(L,qt),l(L,Cr),h(ge,L,null),l(L,Ir),h(pe,L,null),i(e,Ro,o),h(ht,e,o),i(e,Eo,o),i(e,x,o),h(ut,x,null),l(x,jr),l(x,Xt),l(x,Jr),l(x,Yt),l(x,Wr),l(x,Dt),l(x,Zr),l(x,P),h(_t,P,null),l(P,zr),l(P,At),l(P,kr),h(fe,P,null),l(P,Ur),h(he,P,null),i(e,Bo,o),h(bt,e,o),i(e,Ho,o),i(e,Z,o),h(Tt,Z,null),l(Z,Nr),l(Z,Qt),l(Z,Lr),l(Z,Ot),l(Z,Pr),l(Z,R),h(yt,R,null),l(R,Rr),l(R,Kt),l(R,Er),h(ue,R,null),l(R,Br),h(_e,R,null),i(e,Vo,o),i(e,oo,o),Go=!0},p(e,[o]){const V={};o&2&&(V.$$scope={dirty:o,ctx:e}),oe.$set(V);const K={};o&2&&(K.$$scope={dirty:o,ctx:e}),ae.$set(K);const ee={};o&2&&(ee.$$scope={dirty:o,ctx:e}),ie.$set(ee);const wt={};o&2&&(wt.$$scope={dirty:o,ctx:e}),le.$set(wt);const G={};o&2&&(G.$$scope={dirty:o,ctx:e}),de.$set(G);const vt={};o&2&&(vt.$$scope={dirty:o,ctx:e}),me.$set(vt);const $t={};o&2&&($t.$$scope={dirty:o,ctx:e}),ce.$set($t);const te={};o&2&&(te.$$scope={dirty:o,ctx:e}),ge.$set(te);const q={};o&2&&(q.$$scope={dirty:o,ctx:e}),pe.$set(q);const Mt={};o&2&&(Mt.$$scope={dirty:o,ctx:e}),fe.$set(Mt);const ro={};o&2&&(ro.$$scope={dirty:o,ctx:e}),he.$set(ro);const X={};o&2&&(X.$$scope={dirty:o,ctx:e}),ue.$set(X);const Y={};o&2&&(Y.$$scope={dirty:o,ctx:e}),_e.$set(Y)},i(e){Go||(u(w.$$.fragment,e),u(v.$$.fragment,e),u(ze.$$.fragment,e),u(Ue.$$.fragment,e),u(Ee.$$.fragment,e),u(Be.$$.fragment,e),u(oe.$$.fragment,e),u(He.$$.fragment,e),u(Ve.$$.fragment,e),u(Ge.$$.fragment,e),u(qe.$$.fragment,e),u(Xe.$$.fragment,e),u(Ye.$$.fragment,e),u(De.$$.fragment,e),u(Ae.$$.fragment,e),u(Qe.$$.fragment,e),u(Oe.$$.fragment,e),u(Ke.$$.fragment,e),u(ae.$$.fragment,e),u(ie.$$.fragment,e),u(et.$$.fragment,e),u(tt.$$.fragment,e),u(ot.$$.fragment,e),u(rt.$$.fragment,e),u(nt.$$.fragment,e),u(st.$$.fragment,e),u(le.$$.fragment,e),u(de.$$.fragment,e),u(at.$$.fragment,e),u(it.$$.fragment,e),u(lt.$$.fragment,e),u(me.$$.fragment,e),u(ce.$$.fragment,e),u(dt.$$.fragment,e),u(mt.$$.fragment,e),u(ct.$$.fragment,e),u(gt.$$.fragment,e),u(pt.$$.fragment,e),u(ft.$$.fragment,e),u(ge.$$.fragment,e),u(pe.$$.fragment,e),u(ht.$$.fragment,e),u(ut.$$.fragment,e),u(_t.$$.fragment,e),u(fe.$$.fragment,e),u(he.$$.fragment,e),u(bt.$$.fragment,e),u(Tt.$$.fragment,e),u(yt.$$.fragment,e),u(ue.$$.fragment,e),u(_e.$$.fragment,e),Go=!0)},o(e){_(w.$$.fragment,e),_(v.$$.fragment,e),_(ze.$$.fragment,e),_(Ue.$$.fragment,e),_(Ee.$$.fragment,e),_(Be.$$.fragment,e),_(oe.$$.fragment,e),_(He.$$.fragment,e),_(Ve.$$.fragment,e),_(Ge.$$.fragment,e),_(qe.$$.fragment,e),_(Xe.$$.fragment,e),_(Ye.$$.fragment,e),_(De.$$.fragment,e),_(Ae.$$.fragment,e),_(Qe.$$.fragment,e),_(Oe.$$.fragment,e),_(Ke.$$.fragment,e),_(ae.$$.fragment,e),_(ie.$$.fragment,e),_(et.$$.fragment,e),_(tt.$$.fragment,e),_(ot.$$.fragment,e),_(rt.$$.fragment,e),_(nt.$$.fragment,e),_(st.$$.fragment,e),_(le.$$.fragment,e),_(de.$$.fragment,e),_(at.$$.fragment,e),_(it.$$.fragment,e),_(lt.$$.fragment,e),_(me.$$.fragment,e),_(ce.$$.fragment,e),_(dt.$$.fragment,e),_(mt.$$.fragment,e),_(ct.$$.fragment,e),_(gt.$$.fragment,e),_(pt.$$.fragment,e),_(ft.$$.fragment,e),_(ge.$$.fragment,e),_(pe.$$.fragment,e),_(ht.$$.fragment,e),_(ut.$$.fragment,e),_(_t.$$.fragment,e),_(fe.$$.fragment,e),_(he.$$.fragment,e),_(bt.$$.fragment,e),_(Tt.$$.fragment,e),_(yt.$$.fragment,e),_(ue.$$.fragment,e),_(_e.$$.fragment,e),Go=!1},d(e){e&&(t(y),t(c),t(g),t(n),t(no),t(Me),t(so),t(Se),t(ao),t(Fe),t(io),t(xe),t(lo),t(Ce),t(mo),t(Ie),t(co),t(je),t(go),t(Je),t(po),t(We),t(fo),t(Ze),t(ho),t(uo),t(ke),t(_o),t(bo),t(Ne),t(To),t(Le),t(yo),t(Pe),t(wo),t(Re),t(vo),t($o),t(I),t(Mo),t(So),t(E),t(Fo),t(xo),t(j),t(Co),t(Io),t(B),t(jo),t(Jo),t(Q),t(Wo),t(Zo),t(J),t(zo),t(ko),t(H),t(Uo),t(No),t(O),t(Lo),t(Po),t(W),t(Ro),t(Eo),t(x),t(Bo),t(Ho),t(Z),t(Vo),t(oo)),t(r),b(w,e),b(v,e),b(ze,e),b(Ue,e),b(Ee,e),b(Be),b(oe),b(He,e),b(Ve),b(Ge),b(qe),b(Xe,e),b(Ye),b(De),b(Ae),b(Qe,e),b(Oe),b(Ke),b(ae),b(ie),b(et,e),b(tt),b(ot),b(rt,e),b(nt),b(st),b(le),b(de),b(at,e),b(it),b(lt),b(me),b(ce),b(dt,e),b(mt),b(ct),b(gt,e),b(pt),b(ft),b(ge),b(pe),b(ht,e),b(ut),b(_t),b(fe),b(he),b(bt,e),b(Tt),b(yt),b(ue),b(_e)}}}const On='{"title":"SegFormer","local":"segformer","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"SegformerConfig","local":"transformers.SegformerConfig","sections":[],"depth":2},{"title":"SegformerFeatureExtractor","local":"transformers.SegformerFeatureExtractor","sections":[],"depth":2},{"title":"SegformerImageProcessor","local":"transformers.SegformerImageProcessor","sections":[],"depth":2},{"title":"SegformerModel","local":"transformers.SegformerModel","sections":[],"depth":2},{"title":"SegformerDecodeHead","local":"transformers.SegformerDecodeHead","sections":[],"depth":2},{"title":"SegformerForImageClassification","local":"transformers.SegformerForImageClassification","sections":[],"depth":2},{"title":"SegformerForSemanticSegmentation","local":"transformers.SegformerForSemanticSegmentation","sections":[],"depth":2},{"title":"TFSegformerDecodeHead","local":"transformers.TFSegformerDecodeHead","sections":[],"depth":2},{"title":"TFSegformerModel","local":"transformers.TFSegformerModel","sections":[],"depth":2},{"title":"TFSegformerForImageClassification","local":"transformers.TFSegformerForImageClassification","sections":[],"depth":2},{"title":"TFSegformerForSemanticSegmentation","local":"transformers.TFSegformerForSemanticSegmentation","sections":[],"depth":2}],"depth":1}';function Kn($){return Zn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ls extends zn{constructor(r){super(),kn(this,r,Kn,Qn,Jn,{})}}export{ls as component};
