import{s as Jt,o as kt,n as $e}from"../chunks/scheduler.25b97de1.js";import{S as Wt,i as zt,g as m,s as r,r as M,A as Rt,h as p,f as n,c as i,j as Q,u as v,x as u,k as A,y as c,a as l,v as y,d as w,t as $,w as V}from"../chunks/index.d9030fc9.js";import{T as Oe}from"../chunks/Tip.baa67368.js";import{D as ce}from"../chunks/Docstring.ffac8efa.js";import{C as st}from"../chunks/CodeBlock.e6cd0d95.js";import{F as St,M as Zt}from"../chunks/Markdown.7217f838.js";import{E as dt}from"../chunks/ExampleCodeBlock.22dfe688.js";import{P as Nt}from"../chunks/PipelineTag.5f100392.js";import{H as Se,E as Gt}from"../chunks/EditOnGithub.91d95064.js";function Pt(F){let e,g="Example:",o,a,b;return a=new st({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME1vYmlsZVZpVENvbmZpZyUyQyUyME1vYmlsZVZpVE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vYmlsZXZpdC1zbWFsbCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBNb2JpbGVWaVRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBtb2JpbGV2aXQtc21hbGwlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyME1vYmlsZVZpVE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> MobileViTConfig, MobileViTModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a mobilevit-small style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = MobileViTConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the mobilevit-small style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileViTModel(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(){e=m("p"),e.textContent=g,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=g),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),y(a,s,_),b=!0},p:$e,i(s){b||(w(a.$$.fragment,s),b=!0)},o(s){$(a.$$.fragment,s),b=!1},d(s){s&&(n(e),n(o)),V(a,s)}}}function Lt(F){let e,g=`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(){e=m("p"),e.innerHTML=g},l(o){e=p(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function Ht(F){let e,g="Example:",o,a,b;return a=new st({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyME1vYmlsZVZpVE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJhcHBsZSUyRm1vYmlsZXZpdC1zbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyME1vYmlsZVZpVE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJhcHBsZSUyRm1vYmlsZXZpdC1zbWFsbCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, MobileViTModel
<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>, trust_remote_code=<span class="hljs-literal">True</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;apple/mobilevit-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileViTModel.from_pretrained(<span class="hljs-string">&quot;apple/mobilevit-small&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">640</span>, <span class="hljs-number">8</span>, <span class="hljs-number">8</span>]`,wrap:!1}}),{c(){e=m("p"),e.textContent=g,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=g),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),y(a,s,_),b=!0},p:$e,i(s){b||(w(a.$$.fragment,s),b=!0)},o(s){$(a.$$.fragment,s),b=!1},d(s){s&&(n(e),n(o)),V(a,s)}}}function Bt(F){let e,g=`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(){e=m("p"),e.innerHTML=g},l(o){e=p(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function Et(F){let e,g="Example:",o,a,b;return a=new st({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyME1vYmlsZVZpVEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmFwcGxlJTJGbW9iaWxldml0LXNtYWxsJTIyKSUwQW1vZGVsJTIwJTNEJTIwTW9iaWxlVmlURm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYXBwbGUlMkZtb2JpbGV2aXQtc21hbGwlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, MobileViTForImageClassification
<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>, trust_remote_code=<span class="hljs-literal">True</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;apple/mobilevit-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileViTForImageClassification.from_pretrained(<span class="hljs-string">&quot;apple/mobilevit-small&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(){e=m("p"),e.textContent=g,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=g),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),y(a,s,_),b=!0},p:$e,i(s){b||(w(a.$$.fragment,s),b=!0)},o(s){$(a.$$.fragment,s),b=!1},d(s){s&&(n(e),n(o)),V(a,s)}}}function Xt(F){let e,g=`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(){e=m("p"),e.innerHTML=g},l(o){e=p(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function qt(F){let e,g="Examples:",o,a,b;return a=new st({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBdXRvSW1hZ2VQcm9jZXNzb3IlMkMlMjBNb2JpbGVWaVRGb3JTZW1hbnRpY1NlZ21lbnRhdGlvbiUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmFwcGxlJTJGZGVlcGxhYnYzLW1vYmlsZXZpdC1zbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyME1vYmlsZVZpVEZvclNlbWFudGljU2VnbWVudGF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJhcHBsZSUyRmRlZXBsYWJ2My1tb2JpbGV2aXQtc21hbGwlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQSUyMyUyMGxvZ2l0cyUyMGFyZSUyMG9mJTIwc2hhcGUlMjAoYmF0Y2hfc2l6ZSUyQyUyMG51bV9sYWJlbHMlMkMlMjBoZWlnaHQlMkMlMjB3aWR0aCklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<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> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, MobileViTForSemanticSegmentation

<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;apple/deeplabv3-mobilevit-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = MobileViTForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;apple/deeplabv3-mobilevit-small&quot;</span>)

<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><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><span class="hljs-comment"># logits are of shape (batch_size, num_labels, height, width)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`,wrap:!1}}),{c(){e=m("p"),e.textContent=g,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),u(e)!=="svelte-kvfsh7"&&(e.textContent=g),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),y(a,s,_),b=!0},p:$e,i(s){b||(w(a.$$.fragment,s),b=!0)},o(s){$(a.$$.fragment,s),b=!1},d(s){s&&(n(e),n(o)),V(a,s)}}}function Yt(F){let e,g,o,a,b,s,_=`The bare MobileViT model 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> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,X,C,J,q,Z,k='The <a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTModel">MobileViTModel</a> forward method, overrides the <code>__call__</code> special method.',z,d,j,D,Ve,Ue,de,N,Y,_e,he,Ne=`MobileViT model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,R,te,Ie=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,ze,O,oe,xe,ge,Qe='The <a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTForImageClassification">MobileViTForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Ce,se,Ge,G,He,P,K,ee,ne,Ze,Re,Te="MobileViT model with a semantic segmentation head on top, e.g. for Pascal VOC.",Fe,me,Pe=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,ae,E,U,re,Je,Me='The <a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTForSemanticSegmentation">MobileViTForSemanticSegmentation</a> forward method, overrides the <code>__call__</code> special method.',Ae,ve,ue,ke,Le;return e=new Se({props:{title:"MobileViTModel",local:"transformers.MobileViTModel",headingTag:"h2"}}),a=new ce({props:{name:"class transformers.MobileViTModel",anchor:"transformers.MobileViTModel",parameters:[{name:"config",val:": MobileViTConfig"},{name:"expand_output",val:": bool = True"}],parametersDescription:[{anchor:"transformers.MobileViTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig">MobileViTConfig</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/pr_22105/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/vr_22105/src/transformers/models/mobilevit/modeling_mobilevit.py#L691"}}),J=new ce({props:{name:"forward",anchor:"transformers.MobileViTModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MobileViTModel.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. Pixel values can be obtained using <a href="/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">MobileViTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.MobileViTModel.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.MobileViTModel.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/pr_22105/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mobilevit/modeling_mobilevit.py#L732",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</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/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig"
>MobileViTConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state after a pooling operation on the spatial dimensions.</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, num_channels, height, width)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),d=new Oe({props:{$$slots:{default:[Lt]},$$scope:{ctx:F}}}),D=new dt({props:{anchor:"transformers.MobileViTModel.forward.example",$$slots:{default:[Ht]},$$scope:{ctx:F}}}),Ue=new Se({props:{title:"MobileViTForImageClassification",local:"transformers.MobileViTForImageClassification",headingTag:"h2"}}),Y=new ce({props:{name:"class transformers.MobileViTForImageClassification",anchor:"transformers.MobileViTForImageClassification",parameters:[{name:"config",val:": MobileViTConfig"}],parametersDescription:[{anchor:"transformers.MobileViTForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig">MobileViTConfig</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/pr_22105/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/vr_22105/src/transformers/models/mobilevit/modeling_mobilevit.py#L782"}}),oe=new ce({props:{name:"forward",anchor:"transformers.MobileViTForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MobileViTForImageClassification.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. Pixel values can be obtained using <a href="/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">MobileViTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.MobileViTForImageClassification.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.MobileViTForImageClassification.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/pr_22105/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MobileViTForImageClassification.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/vr_22105/src/transformers/models/mobilevit/modeling_mobilevit.py#L805",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</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/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig"
>MobileViTConfig</a>) and inputs.</p>
<ul>
<li><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.</li>
<li><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).</li>
<li><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.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),se=new Oe({props:{$$slots:{default:[Bt]},$$scope:{ctx:F}}}),G=new dt({props:{anchor:"transformers.MobileViTForImageClassification.forward.example",$$slots:{default:[Et]},$$scope:{ctx:F}}}),P=new Se({props:{title:"MobileViTForSemanticSegmentation",local:"transformers.MobileViTForSemanticSegmentation",headingTag:"h2"}}),ne=new ce({props:{name:"class transformers.MobileViTForSemanticSegmentation",anchor:"transformers.MobileViTForSemanticSegmentation",parameters:[{name:"config",val:": MobileViTConfig"}],parametersDescription:[{anchor:"transformers.MobileViTForSemanticSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig">MobileViTConfig</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/pr_22105/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/vr_22105/src/transformers/models/mobilevit/modeling_mobilevit.py#L978"}}),U=new ce({props:{name:"forward",anchor:"transformers.MobileViTForSemanticSegmentation.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.MobileViTForSemanticSegmentation.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. Pixel values can be obtained using <a href="/docs/transformers/pr_22105/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">MobileViTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.MobileViTForSemanticSegmentation.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.MobileViTForSemanticSegmentation.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/pr_22105/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.MobileViTForSemanticSegmentation.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/vr_22105/src/transformers/models/mobilevit/modeling_mobilevit.py#L995",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_22105/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/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig"
>MobileViTConfig</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/pr_22105/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ve=new Oe({props:{$$slots:{default:[Xt]},$$scope:{ctx:F}}}),ke=new dt({props:{anchor:"transformers.MobileViTForSemanticSegmentation.forward.example",$$slots:{default:[qt]},$$scope:{ctx:F}}}),{c(){M(e.$$.fragment),g=r(),o=m("div"),M(a.$$.fragment),b=r(),s=m("p"),s.innerHTML=_,X=r(),C=m("div"),M(J.$$.fragment),q=r(),Z=m("p"),Z.innerHTML=k,z=r(),M(d.$$.fragment),j=r(),M(D.$$.fragment),Ve=r(),M(Ue.$$.fragment),de=r(),N=m("div"),M(Y.$$.fragment),_e=r(),he=m("p"),he.textContent=Ne,R=r(),te=m("p"),te.innerHTML=Ie,ze=r(),O=m("div"),M(oe.$$.fragment),xe=r(),ge=m("p"),ge.innerHTML=Qe,Ce=r(),M(se.$$.fragment),Ge=r(),M(G.$$.fragment),He=r(),M(P.$$.fragment),K=r(),ee=m("div"),M(ne.$$.fragment),Ze=r(),Re=m("p"),Re.textContent=Te,Fe=r(),me=m("p"),me.innerHTML=Pe,ae=r(),E=m("div"),M(U.$$.fragment),re=r(),Je=m("p"),Je.innerHTML=Me,Ae=r(),M(ve.$$.fragment),ue=r(),M(ke.$$.fragment),this.h()},l(f){v(e.$$.fragment,f),g=i(f),o=p(f,"DIV",{class:!0});var I=Q(o);v(a.$$.fragment,I),b=i(I),s=p(I,"P",{"data-svelte-h":!0}),u(s)!=="svelte-1nu7yyb"&&(s.innerHTML=_),X=i(I),C=p(I,"DIV",{class:!0});var H=Q(C);v(J.$$.fragment,H),q=i(H),Z=p(H,"P",{"data-svelte-h":!0}),u(Z)!=="svelte-13fyrni"&&(Z.innerHTML=k),z=i(H),v(d.$$.fragment,H),j=i(H),v(D.$$.fragment,H),H.forEach(n),I.forEach(n),Ve=i(f),v(Ue.$$.fragment,f),de=i(f),N=p(f,"DIV",{class:!0});var L=Q(N);v(Y.$$.fragment,L),_e=i(L),he=p(L,"P",{"data-svelte-h":!0}),u(he)!=="svelte-zljr1p"&&(he.textContent=Ne),R=i(L),te=p(L,"P",{"data-svelte-h":!0}),u(te)!=="svelte-1gjh92c"&&(te.innerHTML=Ie),ze=i(L),O=p(L,"DIV",{class:!0});var S=Q(O);v(oe.$$.fragment,S),xe=i(S),ge=p(S,"P",{"data-svelte-h":!0}),u(ge)!=="svelte-1gmycvu"&&(ge.innerHTML=Qe),Ce=i(S),v(se.$$.fragment,S),Ge=i(S),v(G.$$.fragment,S),S.forEach(n),L.forEach(n),He=i(f),v(P.$$.fragment,f),K=i(f),ee=p(f,"DIV",{class:!0});var W=Q(ee);v(ne.$$.fragment,W),Ze=i(W),Re=p(W,"P",{"data-svelte-h":!0}),u(Re)!=="svelte-n2rd9e"&&(Re.textContent=Te),Fe=i(W),me=p(W,"P",{"data-svelte-h":!0}),u(me)!=="svelte-1gjh92c"&&(me.innerHTML=Pe),ae=i(W),E=p(W,"DIV",{class:!0});var B=Q(E);v(U.$$.fragment,B),re=i(B),Je=p(B,"P",{"data-svelte-h":!0}),u(Je)!=="svelte-11p5sri"&&(Je.innerHTML=Me),Ae=i(B),v(ve.$$.fragment,B),ue=i(B),v(ke.$$.fragment,B),B.forEach(n),W.forEach(n),this.h()},h(){A(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(f,I){y(e,f,I),l(f,g,I),l(f,o,I),y(a,o,null),c(o,b),c(o,s),c(o,X),c(o,C),y(J,C,null),c(C,q),c(C,Z),c(C,z),y(d,C,null),c(C,j),y(D,C,null),l(f,Ve,I),y(Ue,f,I),l(f,de,I),l(f,N,I),y(Y,N,null),c(N,_e),c(N,he),c(N,R),c(N,te),c(N,ze),c(N,O),y(oe,O,null),c(O,xe),c(O,ge),c(O,Ce),y(se,O,null),c(O,Ge),y(G,O,null),l(f,He,I),y(P,f,I),l(f,K,I),l(f,ee,I),y(ne,ee,null),c(ee,Ze),c(ee,Re),c(ee,Fe),c(ee,me),c(ee,ae),c(ee,E),y(U,E,null),c(E,re),c(E,Je),c(E,Ae),y(ve,E,null),c(E,ue),y(ke,E,null),Le=!0},p(f,I){const H={};I&2&&(H.$$scope={dirty:I,ctx:f}),d.$set(H);const L={};I&2&&(L.$$scope={dirty:I,ctx:f}),D.$set(L);const S={};I&2&&(S.$$scope={dirty:I,ctx:f}),se.$set(S);const W={};I&2&&(W.$$scope={dirty:I,ctx:f}),G.$set(W);const B={};I&2&&(B.$$scope={dirty:I,ctx:f}),ve.$set(B);const be={};I&2&&(be.$$scope={dirty:I,ctx:f}),ke.$set(be)},i(f){Le||(w(e.$$.fragment,f),w(a.$$.fragment,f),w(J.$$.fragment,f),w(d.$$.fragment,f),w(D.$$.fragment,f),w(Ue.$$.fragment,f),w(Y.$$.fragment,f),w(oe.$$.fragment,f),w(se.$$.fragment,f),w(G.$$.fragment,f),w(P.$$.fragment,f),w(ne.$$.fragment,f),w(U.$$.fragment,f),w(ve.$$.fragment,f),w(ke.$$.fragment,f),Le=!0)},o(f){$(e.$$.fragment,f),$(a.$$.fragment,f),$(J.$$.fragment,f),$(d.$$.fragment,f),$(D.$$.fragment,f),$(Ue.$$.fragment,f),$(Y.$$.fragment,f),$(oe.$$.fragment,f),$(se.$$.fragment,f),$(G.$$.fragment,f),$(P.$$.fragment,f),$(ne.$$.fragment,f),$(U.$$.fragment,f),$(ve.$$.fragment,f),$(ke.$$.fragment,f),Le=!1},d(f){f&&(n(g),n(o),n(Ve),n(de),n(N),n(He),n(K),n(ee)),V(e,f),V(a),V(J),V(d),V(D),V(Ue,f),V(Y),V(oe),V(se),V(G),V(P,f),V(ne),V(U),V(ve),V(ke)}}}function Qt(F){let e,g;return e=new Zt({props:{$$slots:{default:[Yt]},$$scope:{ctx:F}}}),{c(){M(e.$$.fragment)},l(o){v(e.$$.fragment,o)},m(o,a){y(e,o,a),g=!0},p(o,a){const b={};a&2&&(b.$$scope={dirty:a,ctx:o}),e.$set(b)},i(o){g||(w(e.$$.fragment,o),g=!0)},o(o){$(e.$$.fragment,o),g=!1},d(o){V(e,o)}}}function At(F){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",o,a,b="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",s,_,X=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,C,J,q=`<li>a single Tensor with <code>pixel_values</code> only and nothing else: <code>model(pixel_values)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([pixel_values, attention_mask])</code> or <code>model([pixel_values, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;pixel_values&quot;: pixel_values, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,Z,k,z=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=m("p"),e.innerHTML=g,o=r(),a=m("ul"),a.innerHTML=b,s=r(),_=m("p"),_.innerHTML=X,C=r(),J=m("ul"),J.innerHTML=q,Z=r(),k=m("p"),k.innerHTML=z},l(d){e=p(d,"P",{"data-svelte-h":!0}),u(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),o=i(d),a=p(d,"UL",{"data-svelte-h":!0}),u(a)!=="svelte-qm1t26"&&(a.innerHTML=b),s=i(d),_=p(d,"P",{"data-svelte-h":!0}),u(_)!=="svelte-1v9qsc5"&&(_.innerHTML=X),C=i(d),J=p(d,"UL",{"data-svelte-h":!0}),u(J)!=="svelte-99h8aq"&&(J.innerHTML=q),Z=i(d),k=p(d,"P",{"data-svelte-h":!0}),u(k)!=="svelte-1an3odd"&&(k.innerHTML=z)},m(d,j){l(d,e,j),l(d,o,j),l(d,a,j),l(d,s,j),l(d,_,j),l(d,C,j),l(d,J,j),l(d,Z,j),l(d,k,j)},p:$e,d(d){d&&(n(e),n(o),n(a),n(s),n(_),n(C),n(J),n(Z),n(k))}}}function Dt(F){let e,g=`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(){e=m("p"),e.innerHTML=g},l(o){e=p(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function Ot(F){let e,g="Example:",o,a,b;return a=new st({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGTW9iaWxlVmlUTW9kZWwlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJhcHBsZSUyRm1vYmlsZXZpdC1zbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGTW9iaWxlVmlUTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmFwcGxlJTJGbW9iaWxldml0LXNtYWxsJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFMobileViTModel
<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>, trust_remote_code=<span class="hljs-literal">True</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;apple/mobilevit-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMobileViTModel.from_pretrained(<span class="hljs-string">&quot;apple/mobilevit-small&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">640</span>, <span class="hljs-number">8</span>, <span class="hljs-number">8</span>]`,wrap:!1}}),{c(){e=m("p"),e.textContent=g,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=g),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),y(a,s,_),b=!0},p:$e,i(s){b||(w(a.$$.fragment,s),b=!0)},o(s){$(a.$$.fragment,s),b=!1},d(s){s&&(n(e),n(o)),V(a,s)}}}function Kt(F){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",o,a,b="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",s,_,X=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,C,J,q=`<li>a single Tensor with <code>pixel_values</code> only and nothing else: <code>model(pixel_values)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([pixel_values, attention_mask])</code> or <code>model([pixel_values, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;pixel_values&quot;: pixel_values, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,Z,k,z=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=m("p"),e.innerHTML=g,o=r(),a=m("ul"),a.innerHTML=b,s=r(),_=m("p"),_.innerHTML=X,C=r(),J=m("ul"),J.innerHTML=q,Z=r(),k=m("p"),k.innerHTML=z},l(d){e=p(d,"P",{"data-svelte-h":!0}),u(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),o=i(d),a=p(d,"UL",{"data-svelte-h":!0}),u(a)!=="svelte-qm1t26"&&(a.innerHTML=b),s=i(d),_=p(d,"P",{"data-svelte-h":!0}),u(_)!=="svelte-1v9qsc5"&&(_.innerHTML=X),C=i(d),J=p(d,"UL",{"data-svelte-h":!0}),u(J)!=="svelte-99h8aq"&&(J.innerHTML=q),Z=i(d),k=p(d,"P",{"data-svelte-h":!0}),u(k)!=="svelte-1an3odd"&&(k.innerHTML=z)},m(d,j){l(d,e,j),l(d,o,j),l(d,a,j),l(d,s,j),l(d,_,j),l(d,C,j),l(d,J,j),l(d,Z,j),l(d,k,j)},p:$e,d(d){d&&(n(e),n(o),n(a),n(s),n(_),n(C),n(J),n(Z),n(k))}}}function eo(F){let e,g=`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(){e=m("p"),e.innerHTML=g},l(o){e=p(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function to(F){let e,g="Example:",o,a,b;return a=new st({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGTW9iaWxlVmlURm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyYXBwbGUlMkZtb2JpbGV2aXQtc21hbGwlMjIpJTBBbW9kZWwlMjAlM0QlMjBURk1vYmlsZVZpVEZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmFwcGxlJTJGbW9iaWxldml0LXNtYWxsJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFMobileViTForImageClassification
<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>, trust_remote_code=<span class="hljs-literal">True</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;apple/mobilevit-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMobileViTForImageClassification.from_pretrained(<span class="hljs-string">&quot;apple/mobilevit-small&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(){e=m("p"),e.textContent=g,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=g),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),y(a,s,_),b=!0},p:$e,i(s){b||(w(a.$$.fragment,s),b=!0)},o(s){$(a.$$.fragment,s),b=!1},d(s){s&&(n(e),n(o)),V(a,s)}}}function oo(F){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",o,a,b="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",s,_,X=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,C,J,q=`<li>a single Tensor with <code>pixel_values</code> only and nothing else: <code>model(pixel_values)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([pixel_values, attention_mask])</code> or <code>model([pixel_values, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;pixel_values&quot;: pixel_values, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,Z,k,z=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=m("p"),e.innerHTML=g,o=r(),a=m("ul"),a.innerHTML=b,s=r(),_=m("p"),_.innerHTML=X,C=r(),J=m("ul"),J.innerHTML=q,Z=r(),k=m("p"),k.innerHTML=z},l(d){e=p(d,"P",{"data-svelte-h":!0}),u(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),o=i(d),a=p(d,"UL",{"data-svelte-h":!0}),u(a)!=="svelte-qm1t26"&&(a.innerHTML=b),s=i(d),_=p(d,"P",{"data-svelte-h":!0}),u(_)!=="svelte-1v9qsc5"&&(_.innerHTML=X),C=i(d),J=p(d,"UL",{"data-svelte-h":!0}),u(J)!=="svelte-99h8aq"&&(J.innerHTML=q),Z=i(d),k=p(d,"P",{"data-svelte-h":!0}),u(k)!=="svelte-1an3odd"&&(k.innerHTML=z)},m(d,j){l(d,e,j),l(d,o,j),l(d,a,j),l(d,s,j),l(d,_,j),l(d,C,j),l(d,J,j),l(d,Z,j),l(d,k,j)},p:$e,d(d){d&&(n(e),n(o),n(a),n(s),n(_),n(C),n(J),n(Z),n(k))}}}function so(F){let e,g=`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(){e=m("p"),e.innerHTML=g},l(o){e=p(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function no(F){let e,g="Examples:",o,a,b;return a=new st({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGTW9iaWxlVmlURm9yU2VtYW50aWNTZWdtZW50YXRpb24lMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmFwcGxlJTJGZGVlcGxhYnYzLW1vYmlsZXZpdC1zbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGTW9iaWxlVmlURm9yU2VtYW50aWNTZWdtZW50YXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmFwcGxlJTJGZGVlcGxhYnYzLW1vYmlsZXZpdC1zbWFsbCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEElMjMlMjBsb2dpdHMlMjBhcmUlMjBvZiUyMHNoYXBlJTIwKGJhdGNoX3NpemUlMkMlMjBudW1fbGFiZWxzJTJDJTIwaGVpZ2h0JTJDJTIwd2lkdGgpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFMobileViTForSemanticSegmentation
<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;apple/deeplabv3-mobilevit-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFMobileViTForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;apple/deeplabv3-mobilevit-small&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)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># logits are of shape (batch_size, num_labels, height, width)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`,wrap:!1}}),{c(){e=m("p"),e.textContent=g,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),u(e)!=="svelte-kvfsh7"&&(e.textContent=g),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),y(a,s,_),b=!0},p:$e,i(s){b||(w(a.$$.fragment,s),b=!0)},o(s){$(a.$$.fragment,s),b=!1},d(s){s&&(n(e),n(o)),V(a,s)}}}function ao(F){let e,g,o,a,b,s,_=`The bare MobileViT model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/pr_22105/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.)`,X,C,J=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">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.`,q,Z,k,z,d,j,D,Ve='The <a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.TFMobileViTModel">TFMobileViTModel</a> forward method, overrides the <code>__call__</code> special method.',Ue,de,N,Y,_e,he,Ne,R,te,Ie,ze,O=`MobileViT model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,oe,xe,ge=`This model inherits from <a href="/docs/transformers/pr_22105/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.)`,Qe,Ce,se=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">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.`,Ge,G,He,P,K,ee,ne,Ze='The <a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.TFMobileViTForImageClassification">TFMobileViTForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Re,Te,Fe,me,Pe,ae,E,U,re,Je,Me,Ae="MobileViT model with a semantic segmentation head on top, e.g. for Pascal VOC.",ve,ue,ke=`This model inherits from <a href="/docs/transformers/pr_22105/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.)`,Le,f,I=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">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.`,H,L,S,W,B,be,We,mt='The <a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.TFMobileViTForSemanticSegmentation">TFMobileViTForSemanticSegmentation</a> forward method, overrides the <code>__call__</code> special method.',Xe,Be,nt,je,at;return e=new Se({props:{title:"TFMobileViTModel",local:"transformers.TFMobileViTModel",headingTag:"h2"}}),a=new ce({props:{name:"class transformers.TFMobileViTModel",anchor:"transformers.TFMobileViTModel",parameters:[{name:"config",val:": MobileViTConfig"},{name:"expand_output",val:": bool = True"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMobileViTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig">MobileViTConfig</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/pr_22105/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/vr_22105/src/transformers/models/mobilevit/modeling_tf_mobilevit.py#L977"}}),Z=new Oe({props:{$$slots:{default:[At]},$$scope:{ctx:F}}}),d=new ce({props:{name:"call",anchor:"transformers.TFMobileViTModel.call",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFMobileViTModel.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/pr_22105/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">MobileViTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFMobileViTModel.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.TFMobileViTModel.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/pr_22105/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"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mobilevit/modeling_tf_mobilevit.py#L989",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_22105/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</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/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig"
>MobileViTConfig</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>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you’re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</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/pr_22105/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),de=new Oe({props:{$$slots:{default:[Dt]},$$scope:{ctx:F}}}),Y=new dt({props:{anchor:"transformers.TFMobileViTModel.call.example",$$slots:{default:[Ot]},$$scope:{ctx:F}}}),he=new Se({props:{title:"TFMobileViTForImageClassification",local:"transformers.TFMobileViTForImageClassification",headingTag:"h2"}}),te=new ce({props:{name:"class transformers.TFMobileViTForImageClassification",anchor:"transformers.TFMobileViTForImageClassification",parameters:[{name:"config",val:": MobileViTConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMobileViTForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig">MobileViTConfig</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/pr_22105/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/vr_22105/src/transformers/models/mobilevit/modeling_tf_mobilevit.py#L1017"}}),G=new Oe({props:{$$slots:{default:[Kt]},$$scope:{ctx:F}}}),K=new ce({props:{name:"call",anchor:"transformers.TFMobileViTForImageClassification.call",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"labels",val:": tf.Tensor | None = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFMobileViTForImageClassification.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/pr_22105/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">MobileViTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFMobileViTForImageClassification.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.TFMobileViTForImageClassification.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/pr_22105/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.TFMobileViTForImageClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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/vr_22105/src/transformers/models/mobilevit/modeling_tf_mobilevit.py#L1038",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.modeling_tf_outputs.TFImageClassifierOutputWithNoAttention</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/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig"
>MobileViTConfig</a>) and inputs.</p>
<ul>
<li><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.</li>
<li><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).</li>
<li><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 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.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.modeling_tf_outputs.TFImageClassifierOutputWithNoAttention</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Te=new Oe({props:{$$slots:{default:[eo]},$$scope:{ctx:F}}}),me=new dt({props:{anchor:"transformers.TFMobileViTForImageClassification.call.example",$$slots:{default:[to]},$$scope:{ctx:F}}}),ae=new Se({props:{title:"TFMobileViTForSemanticSegmentation",local:"transformers.TFMobileViTForSemanticSegmentation",headingTag:"h2"}}),re=new ce({props:{name:"class transformers.TFMobileViTForSemanticSegmentation",anchor:"transformers.TFMobileViTForSemanticSegmentation",parameters:[{name:"config",val:": MobileViTConfig"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFMobileViTForSemanticSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig">MobileViTConfig</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/pr_22105/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/vr_22105/src/transformers/models/mobilevit/modeling_tf_mobilevit.py#L1249"}}),L=new Oe({props:{$$slots:{default:[oo]},$$scope:{ctx:F}}}),B=new ce({props:{name:"call",anchor:"transformers.TFMobileViTForSemanticSegmentation.call",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"labels",val:": tf.Tensor | None = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFMobileViTForSemanticSegmentation.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/pr_22105/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">MobileViTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFMobileViTForSemanticSegmentation.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.TFMobileViTForSemanticSegmentation.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/pr_22105/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.TFMobileViTForSemanticSegmentation.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 classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mobilevit/modeling_tf_mobilevit.py#L1283",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.modeling_tf_outputs.TFSemanticSegmenterOutputWithNoAttention</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/pr_22105/en/model_doc/mobilevit#transformers.MobileViTConfig"
>MobileViTConfig</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>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.modeling_tf_outputs.TFSemanticSegmenterOutputWithNoAttention</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Be=new Oe({props:{$$slots:{default:[so]},$$scope:{ctx:F}}}),je=new dt({props:{anchor:"transformers.TFMobileViTForSemanticSegmentation.call.example",$$slots:{default:[no]},$$scope:{ctx:F}}}),{c(){M(e.$$.fragment),g=r(),o=m("div"),M(a.$$.fragment),b=r(),s=m("p"),s.innerHTML=_,X=r(),C=m("p"),C.innerHTML=J,q=r(),M(Z.$$.fragment),k=r(),z=m("div"),M(d.$$.fragment),j=r(),D=m("p"),D.innerHTML=Ve,Ue=r(),M(de.$$.fragment),N=r(),M(Y.$$.fragment),_e=r(),M(he.$$.fragment),Ne=r(),R=m("div"),M(te.$$.fragment),Ie=r(),ze=m("p"),ze.textContent=O,oe=r(),xe=m("p"),xe.innerHTML=ge,Qe=r(),Ce=m("p"),Ce.innerHTML=se,Ge=r(),M(G.$$.fragment),He=r(),P=m("div"),M(K.$$.fragment),ee=r(),ne=m("p"),ne.innerHTML=Ze,Re=r(),M(Te.$$.fragment),Fe=r(),M(me.$$.fragment),Pe=r(),M(ae.$$.fragment),E=r(),U=m("div"),M(re.$$.fragment),Je=r(),Me=m("p"),Me.textContent=Ae,ve=r(),ue=m("p"),ue.innerHTML=ke,Le=r(),f=m("p"),f.innerHTML=I,H=r(),M(L.$$.fragment),S=r(),W=m("div"),M(B.$$.fragment),be=r(),We=m("p"),We.innerHTML=mt,Xe=r(),M(Be.$$.fragment),nt=r(),M(je.$$.fragment),this.h()},l(h){v(e.$$.fragment,h),g=i(h),o=p(h,"DIV",{class:!0});var x=Q(o);v(a.$$.fragment,x),b=i(x),s=p(x,"P",{"data-svelte-h":!0}),u(s)!=="svelte-7l5s3"&&(s.innerHTML=_),X=i(x),C=p(x,"P",{"data-svelte-h":!0}),u(C)!=="svelte-1be7e3c"&&(C.innerHTML=J),q=i(x),v(Z.$$.fragment,x),k=i(x),z=p(x,"DIV",{class:!0});var ie=Q(z);v(d.$$.fragment,ie),j=i(ie),D=p(ie,"P",{"data-svelte-h":!0}),u(D)!=="svelte-bt1bm2"&&(D.innerHTML=Ve),Ue=i(ie),v(de.$$.fragment,ie),N=i(ie),v(Y.$$.fragment,ie),ie.forEach(n),x.forEach(n),_e=i(h),v(he.$$.fragment,h),Ne=i(h),R=p(h,"DIV",{class:!0});var le=Q(R);v(te.$$.fragment,le),Ie=i(le),ze=p(le,"P",{"data-svelte-h":!0}),u(ze)!=="svelte-zljr1p"&&(ze.textContent=O),oe=i(le),xe=p(le,"P",{"data-svelte-h":!0}),u(xe)!=="svelte-ahvnkk"&&(xe.innerHTML=ge),Qe=i(le),Ce=p(le,"P",{"data-svelte-h":!0}),u(Ce)!=="svelte-1be7e3c"&&(Ce.innerHTML=se),Ge=i(le),v(G.$$.fragment,le),He=i(le),P=p(le,"DIV",{class:!0});var pe=Q(P);v(K.$$.fragment,pe),ee=i(pe),ne=p(pe,"P",{"data-svelte-h":!0}),u(ne)!=="svelte-gwgh4a"&&(ne.innerHTML=Ze),Re=i(pe),v(Te.$$.fragment,pe),Fe=i(pe),v(me.$$.fragment,pe),pe.forEach(n),le.forEach(n),Pe=i(h),v(ae.$$.fragment,h),E=i(h),U=p(h,"DIV",{class:!0});var fe=Q(U);v(re.$$.fragment,fe),Je=i(fe),Me=p(fe,"P",{"data-svelte-h":!0}),u(Me)!=="svelte-n2rd9e"&&(Me.textContent=Ae),ve=i(fe),ue=p(fe,"P",{"data-svelte-h":!0}),u(ue)!=="svelte-ahvnkk"&&(ue.innerHTML=ke),Le=i(fe),f=p(fe,"P",{"data-svelte-h":!0}),u(f)!=="svelte-1be7e3c"&&(f.innerHTML=I),H=i(fe),v(L.$$.fragment,fe),S=i(fe),W=p(fe,"DIV",{class:!0});var ye=Q(W);v(B.$$.fragment,ye),be=i(ye),We=p(ye,"P",{"data-svelte-h":!0}),u(We)!=="svelte-iv95nu"&&(We.innerHTML=mt),Xe=i(ye),v(Be.$$.fragment,ye),nt=i(ye),v(je.$$.fragment,ye),ye.forEach(n),fe.forEach(n),this.h()},h(){A(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(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(h,x){y(e,h,x),l(h,g,x),l(h,o,x),y(a,o,null),c(o,b),c(o,s),c(o,X),c(o,C),c(o,q),y(Z,o,null),c(o,k),c(o,z),y(d,z,null),c(z,j),c(z,D),c(z,Ue),y(de,z,null),c(z,N),y(Y,z,null),l(h,_e,x),y(he,h,x),l(h,Ne,x),l(h,R,x),y(te,R,null),c(R,Ie),c(R,ze),c(R,oe),c(R,xe),c(R,Qe),c(R,Ce),c(R,Ge),y(G,R,null),c(R,He),c(R,P),y(K,P,null),c(P,ee),c(P,ne),c(P,Re),y(Te,P,null),c(P,Fe),y(me,P,null),l(h,Pe,x),y(ae,h,x),l(h,E,x),l(h,U,x),y(re,U,null),c(U,Je),c(U,Me),c(U,ve),c(U,ue),c(U,Le),c(U,f),c(U,H),y(L,U,null),c(U,S),c(U,W),y(B,W,null),c(W,be),c(W,We),c(W,Xe),y(Be,W,null),c(W,nt),y(je,W,null),at=!0},p(h,x){const ie={};x&2&&(ie.$$scope={dirty:x,ctx:h}),Z.$set(ie);const le={};x&2&&(le.$$scope={dirty:x,ctx:h}),de.$set(le);const pe={};x&2&&(pe.$$scope={dirty:x,ctx:h}),Y.$set(pe);const fe={};x&2&&(fe.$$scope={dirty:x,ctx:h}),G.$set(fe);const ye={};x&2&&(ye.$$scope={dirty:x,ctx:h}),Te.$set(ye);const qe={};x&2&&(qe.$$scope={dirty:x,ctx:h}),me.$set(qe);const rt={};x&2&&(rt.$$scope={dirty:x,ctx:h}),L.$set(rt);const we={};x&2&&(we.$$scope={dirty:x,ctx:h}),Be.$set(we);const Ye={};x&2&&(Ye.$$scope={dirty:x,ctx:h}),je.$set(Ye)},i(h){at||(w(e.$$.fragment,h),w(a.$$.fragment,h),w(Z.$$.fragment,h),w(d.$$.fragment,h),w(de.$$.fragment,h),w(Y.$$.fragment,h),w(he.$$.fragment,h),w(te.$$.fragment,h),w(G.$$.fragment,h),w(K.$$.fragment,h),w(Te.$$.fragment,h),w(me.$$.fragment,h),w(ae.$$.fragment,h),w(re.$$.fragment,h),w(L.$$.fragment,h),w(B.$$.fragment,h),w(Be.$$.fragment,h),w(je.$$.fragment,h),at=!0)},o(h){$(e.$$.fragment,h),$(a.$$.fragment,h),$(Z.$$.fragment,h),$(d.$$.fragment,h),$(de.$$.fragment,h),$(Y.$$.fragment,h),$(he.$$.fragment,h),$(te.$$.fragment,h),$(G.$$.fragment,h),$(K.$$.fragment,h),$(Te.$$.fragment,h),$(me.$$.fragment,h),$(ae.$$.fragment,h),$(re.$$.fragment,h),$(L.$$.fragment,h),$(B.$$.fragment,h),$(Be.$$.fragment,h),$(je.$$.fragment,h),at=!1},d(h){h&&(n(g),n(o),n(_e),n(Ne),n(R),n(Pe),n(E),n(U)),V(e,h),V(a),V(Z),V(d),V(de),V(Y),V(he,h),V(te),V(G),V(K),V(Te),V(me),V(ae,h),V(re),V(L),V(B),V(Be),V(je)}}}function ro(F){let e,g;return e=new Zt({props:{$$slots:{default:[ao]},$$scope:{ctx:F}}}),{c(){M(e.$$.fragment)},l(o){v(e.$$.fragment,o)},m(o,a){y(e,o,a),g=!0},p(o,a){const b={};a&2&&(b.$$scope={dirty:a,ctx:o}),e.$set(b)},i(o){g||(w(e.$$.fragment,o),g=!0)},o(o){$(e.$$.fragment,o),g=!1},d(o){V(e,o)}}}function io(F){let e,g,o,a,b,s,_,X,C,J='The MobileViT model was proposed in <a href="https://arxiv.org/abs/2110.02178" rel="nofollow">MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer</a> by Sachin Mehta and Mohammad Rastegari. MobileViT introduces a new layer that replaces local processing in convolutions with global processing using transformers.',q,Z,k="The abstract from the paper is the following:",z,d,j="<em>Light-weight convolutional neural networks (CNNs) are the de-facto for mobile vision tasks. Their spatial inductive biases allow them to learn representations with fewer parameters across different vision tasks. However, these networks are spatially local. To learn global representations, self-attention-based vision trans-formers (ViTs) have been adopted. Unlike CNNs, ViTs are heavy-weight. In this paper, we ask the following question: is it possible to combine the strengths of CNNs and ViTs to build a light-weight and low latency network for mobile vision tasks? Towards this end, we introduce MobileViT, a light-weight and general-purpose vision transformer for mobile devices. MobileViT presents a different perspective for the global processing of information with transformers, i.e., transformers as convolutions. Our results show that MobileViT significantly outperforms CNN- and ViT-based networks across different tasks and datasets. On the ImageNet-1k dataset, MobileViT achieves top-1 accuracy of 78.4% with about 6 million parameters, which is 3.2% and 6.2% more accurate than MobileNetv3 (CNN-based) and DeIT (ViT-based) for a similar number of parameters. On the MS-COCO object detection task, MobileViT is 5.7% more accurate than MobileNetv3 for a similar number of parameters.</em>",D,Ve,Ue='This model was contributed by <a href="https://huggingface.co/Matthijs" rel="nofollow">matthijs</a>. The TensorFlow version of the model was contributed by <a href="https://huggingface.co/sayakpaul" rel="nofollow">sayakpaul</a>. The original code and weights can be found <a href="https://github.com/apple/ml-cvnets" rel="nofollow">here</a>.',de,N,Y,_e,he=`<li><p>MobileViT is more like a CNN than a Transformer model. It does not work on sequence data but on batches of images. Unlike ViT, there are no embeddings. The backbone model outputs a feature map. You can follow <a href="https://keras.io/examples/vision/mobilevit" rel="nofollow">this tutorial</a> for a lightweight introduction.</p></li> <li><p>One can use <a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTImageProcessor">MobileViTImageProcessor</a> to prepare images for the model. Note that if you do your own preprocessing, the pretrained checkpoints expect images to be in BGR pixel order (not RGB).</p></li> <li><p>The available image classification checkpoints are pre-trained on <a href="https://huggingface.co/datasets/imagenet-1k" rel="nofollow">ImageNet-1k</a> (also referred to as ILSVRC 2012, a collection of 1.3 million images and 1,000 classes).</p></li> <li><p>The segmentation model uses a <a href="https://arxiv.org/abs/1706.05587" rel="nofollow">DeepLabV3</a> head. The available semantic segmentation checkpoints are pre-trained on <a href="http://host.robots.ox.ac.uk/pascal/VOC/" rel="nofollow">PASCAL VOC</a>.</p></li> <li><p>As the name suggests MobileViT was designed to be performant and efficient on mobile phones. The TensorFlow versions of the MobileViT models are fully compatible with <a href="https://www.tensorflow.org/lite" rel="nofollow">TensorFlow Lite</a>.</p> <p>You can use the following code to convert a MobileViT checkpoint (be it image classification or semantic segmentation) to generate a
TensorFlow Lite model:</p></li>`,Ne,R,te,Ie,ze=`The resulting model will be just <strong>about an MB</strong> making it a good fit for mobile applications where resources and network
bandwidth can be constrained.`,O,oe,xe,ge,Qe="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with MobileViT.",Ce,se,Ge,G,He='<li><a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTForImageClassification">MobileViTForImageClassification</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>See also: <a href="../tasks/image_classification">Image classification task guide</a></li>',P,K,ee="<strong>Semantic segmentation</strong>",ne,Ze,Re='<li><a href="../tasks/semantic_segmentation">Semantic segmentation task guide</a></li>',Te,Fe,me="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.",Pe,ae,E,U,re,Je,Me,Ae=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTModel">MobileViTModel</a>. It is used to instantiate a
MobileViT 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 MobileViT
<a href="https://huggingface.co/apple/mobilevit-small" rel="nofollow">apple/mobilevit-small</a> architecture.`,ve,ue,ke=`Configuration objects inherit from <a href="/docs/transformers/pr_22105/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/pr_22105/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Le,f,I,H,L,S,W,B,be,We,mt,Xe,Be="Preprocesses a batch of images and optionally segmentation maps.",nt,je,at=`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.`,h,x,ie,le,pe,fe='Converts the output of <a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTForSemanticSegmentation">MobileViTForSemanticSegmentation</a> into semantic segmentation maps. Only supports PyTorch.',ye,qe,rt,we,Ye,$t,pt,jt="Constructs a MobileViT image processor.",Vt,Ke,it,xt,ft,Ut="Preprocess an image or batch of images.",Ct,et,lt,Ft,ht,It='Converts the output of <a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTForSemanticSegmentation">MobileViTForSemanticSegmentation</a> into semantic segmentation maps. Only supports PyTorch.',bt,tt,_t,ct,Tt,ut,Mt;return b=new Se({props:{title:"MobileViT",local:"mobilevit",headingTag:"h1"}}),_=new Se({props:{title:"Overview",local:"overview",headingTag:"h2"}}),N=new Se({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),R=new st({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGTW9iaWxlVmlURm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBJTBBbW9kZWxfY2twdCUyMCUzRCUyMCUyMmFwcGxlJTJGbW9iaWxldml0LXh4LXNtYWxsJTIyJTBBbW9kZWwlMjAlM0QlMjBURk1vYmlsZVZpVEZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2NrcHQpJTBBJTBBY29udmVydGVyJTIwJTNEJTIwdGYubGl0ZS5URkxpdGVDb252ZXJ0ZXIuZnJvbV9rZXJhc19tb2RlbChtb2RlbCklMEFjb252ZXJ0ZXIub3B0aW1pemF0aW9ucyUyMCUzRCUyMCU1QnRmLmxpdGUuT3B0aW1pemUuREVGQVVMVCU1RCUwQWNvbnZlcnRlci50YXJnZXRfc3BlYy5zdXBwb3J0ZWRfb3BzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwdGYubGl0ZS5PcHNTZXQuVEZMSVRFX0JVSUxUSU5TJTJDJTBBJTIwJTIwJTIwJTIwdGYubGl0ZS5PcHNTZXQuU0VMRUNUX1RGX09QUyUyQyUwQSU1RCUwQXRmbGl0ZV9tb2RlbCUyMCUzRCUyMGNvbnZlcnRlci5jb252ZXJ0KCklMEF0ZmxpdGVfZmlsZW5hbWUlMjAlM0QlMjBtb2RlbF9ja3B0LnNwbGl0KCUyMiUyRiUyMiklNUItMSU1RCUyMCUyQiUyMCUyMi50ZmxpdGUlMjIlMEF3aXRoJTIwb3Blbih0ZmxpdGVfZmlsZW5hbWUlMkMlMjAlMjJ3YiUyMiklMjBhcyUyMGYlM0ElMEElMjAlMjAlMjAlMjBmLndyaXRlKHRmbGl0ZV9tb2RlbCk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFMobileViTForImageClassification
<span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf


model_ckpt = <span class="hljs-string">&quot;apple/mobilevit-xx-small&quot;</span>
model = TFMobileViTForImageClassification.from_pretrained(model_ckpt)

converter = tf.lite.TFLiteConverter.from_keras_model(model)
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_ops = [
    tf.lite.OpsSet.TFLITE_BUILTINS,
    tf.lite.OpsSet.SELECT_TF_OPS,
]
tflite_model = converter.convert()
tflite_filename = model_ckpt.split(<span class="hljs-string">&quot;/&quot;</span>)[-<span class="hljs-number">1</span>] + <span class="hljs-string">&quot;.tflite&quot;</span>
<span class="hljs-keyword">with</span> <span class="hljs-built_in">open</span>(tflite_filename, <span class="hljs-string">&quot;wb&quot;</span>) <span class="hljs-keyword">as</span> f:
    f.write(tflite_model)`,wrap:!1}}),oe=new Se({props:{title:"Resources",local:"resources",headingTag:"h2"}}),se=new Nt({props:{pipeline:"image-classification"}}),ae=new Se({props:{title:"MobileViTConfig",local:"transformers.MobileViTConfig",headingTag:"h2"}}),re=new ce({props:{name:"class transformers.MobileViTConfig",anchor:"transformers.MobileViTConfig",parameters:[{name:"num_channels",val:" = 3"},{name:"image_size",val:" = 256"},{name:"patch_size",val:" = 2"},{name:"hidden_sizes",val:" = [144, 192, 240]"},{name:"neck_hidden_sizes",val:" = [16, 32, 64, 96, 128, 160, 640]"},{name:"num_attention_heads",val:" = 4"},{name:"mlp_ratio",val:" = 2.0"},{name:"expand_ratio",val:" = 4.0"},{name:"hidden_act",val:" = 'silu'"},{name:"conv_kernel_size",val:" = 3"},{name:"output_stride",val:" = 32"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"classifier_dropout_prob",val:" = 0.1"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"qkv_bias",val:" = True"},{name:"aspp_out_channels",val:" = 256"},{name:"atrous_rates",val:" = [6, 12, 18]"},{name:"aspp_dropout_prob",val:" = 0.1"},{name:"semantic_loss_ignore_index",val:" = 255"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileViTConfig.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.MobileViTConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.MobileViTConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.MobileViTConfig.hidden_sizes",description:`<strong>hidden_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[144, 192, 240]</code>) &#x2014;
Dimensionality (hidden size) of the Transformer encoders at each stage.`,name:"hidden_sizes"},{anchor:"transformers.MobileViTConfig.neck_hidden_sizes",description:`<strong>neck_hidden_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[16, 32, 64, 96, 128, 160, 640]</code>) &#x2014;
The number of channels for the feature maps of the backbone.`,name:"neck_hidden_sizes"},{anchor:"transformers.MobileViTConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.MobileViTConfig.mlp_ratio",description:`<strong>mlp_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 2.0) &#x2014;
The ratio of the number of channels in the output of the MLP to the number of channels in the input.`,name:"mlp_ratio"},{anchor:"transformers.MobileViTConfig.expand_ratio",description:`<strong>expand_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#x2014;
Expansion factor for the MobileNetv2 layers.`,name:"expand_ratio"},{anchor:"transformers.MobileViTConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the Transformer encoder and convolution layers.`,name:"hidden_act"},{anchor:"transformers.MobileViTConfig.conv_kernel_size",description:`<strong>conv_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The size of the convolutional kernel in the MobileViT layer.`,name:"conv_kernel_size"},{anchor:"transformers.MobileViTConfig.output_stride",description:`<strong>output_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The ratio of the spatial resolution of the output to the resolution of the input image.`,name:"output_stride"},{anchor:"transformers.MobileViTConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the Transformer encoder.`,name:"hidden_dropout_prob"},{anchor:"transformers.MobileViTConfig.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.MobileViTConfig.classifier_dropout_prob",description:`<strong>classifier_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for attached classifiers.`,name:"classifier_dropout_prob"},{anchor:"transformers.MobileViTConfig.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.MobileViTConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.MobileViTConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"},{anchor:"transformers.MobileViTConfig.aspp_out_channels",description:`<strong>aspp_out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Number of output channels used in the ASPP layer for semantic segmentation.`,name:"aspp_out_channels"},{anchor:"transformers.MobileViTConfig.atrous_rates",description:`<strong>atrous_rates</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[6, 12, 18]</code>) &#x2014;
Dilation (atrous) factors used in the ASPP layer for semantic segmentation.`,name:"atrous_rates"},{anchor:"transformers.MobileViTConfig.aspp_dropout_prob",description:`<strong>aspp_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the ASPP layer for semantic segmentation.`,name:"aspp_dropout_prob"},{anchor:"transformers.MobileViTConfig.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/vr_22105/src/transformers/models/mobilevit/configuration_mobilevit.py#L30"}}),f=new dt({props:{anchor:"transformers.MobileViTConfig.example",$$slots:{default:[Pt]},$$scope:{ctx:F}}}),H=new Se({props:{title:"MobileViTFeatureExtractor",local:"transformers.MobileViTFeatureExtractor",headingTag:"h2"}}),W=new ce({props:{name:"class transformers.MobileViTFeatureExtractor",anchor:"transformers.MobileViTFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mobilevit/feature_extraction_mobilevit.py#L26"}}),We=new ce({props:{name:"__call__",anchor:"transformers.MobileViTFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"segmentation_maps",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mobilevit/image_processing_mobilevit.py#L184"}}),ie=new ce({props:{name:"post_process_semantic_segmentation",anchor:"transformers.MobileViTFeatureExtractor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple] = None"}],parametersDescription:[{anchor:"transformers.MobileViTFeatureExtractor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTForSemanticSegmentation">MobileViTForSemanticSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.MobileViTFeatureExtractor.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/vr_22105/src/transformers/models/mobilevit/image_processing_mobilevit.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 Se({props:{title:"MobileViTImageProcessor",local:"transformers.MobileViTImageProcessor",headingTag:"h2"}}),Ye=new ce({props:{name:"class transformers.MobileViTImageProcessor",anchor:"transformers.MobileViTImageProcessor",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_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_flip_channel_order",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.MobileViTImageProcessor.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</code>. Can be overridden by the
<code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.MobileViTImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 224}</code>):
Controls the 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.MobileViTImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>Resampling.BILINEAR</code>) &#x2014;
Defines the 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.MobileViTImageProcessor.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.MobileViTImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter in the
<code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.MobileViTImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to crop the input at the center. If the input size is smaller than <code>crop_size</code> along any edge, the
image is padded with 0&#x2019;s and then center cropped. Can be overridden by the <code>do_center_crop</code> parameter in
the <code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.MobileViTImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 256, &quot;width&quot;: 256}</code>):
Desired output size <code>(size[&quot;height&quot;], size[&quot;width&quot;])</code> when applying center-cropping. Can be overridden by
the <code>crop_size</code> parameter in the <code>preprocess</code> method.`,name:"crop_size"},{anchor:"transformers.MobileViTImageProcessor.do_flip_channel_order",description:`<strong>do_flip_channel_order</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to flip the color channels from RGB to BGR. Can be overridden by the <code>do_flip_channel_order</code>
parameter in the <code>preprocess</code> method.`,name:"do_flip_channel_order"}],source:"https://github.com/huggingface/transformers/blob/vr_22105/src/transformers/models/mobilevit/image_processing_mobilevit.py#L54"}}),it=new ce({props:{name:"preprocess",anchor:"transformers.MobileViTImageProcessor.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:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_center_crop",val:": bool = None"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_flip_channel_order",val:": 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"}],parametersDescription:[{anchor:"transformers.MobileViTImageProcessor.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.MobileViTImageProcessor.preprocess.segmentation_maps",description:`<strong>segmentation_maps</strong> (<code>ImageInput</code>, <em>optional</em>) &#x2014;
Segmentation map to preprocess.`,name:"segmentation_maps"},{anchor:"transformers.MobileViTImageProcessor.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.MobileViTImageProcessor.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 resizing.`,name:"size"},{anchor:"transformers.MobileViTImageProcessor.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.MobileViTImageProcessor.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 by rescale factor.`,name:"do_rescale"},{anchor:"transformers.MobileViTImageProcessor.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.MobileViTImageProcessor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.MobileViTImageProcessor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the center crop if <code>do_center_crop</code> is set to <code>True</code>.`,name:"crop_size"},{anchor:"transformers.MobileViTImageProcessor.preprocess.do_flip_channel_order",description:`<strong>do_flip_channel_order</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_flip_channel_order</code>) &#x2014;
Whether to flip the channel order of the image.`,name:"do_flip_channel_order"},{anchor:"transformers.MobileViTImageProcessor.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.MobileViTImageProcessor.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.MobileViTImageProcessor.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/vr_22105/src/transformers/models/mobilevit/image_processing_mobilevit.py#L300"}}),lt=new ce({props:{name:"post_process_semantic_segmentation",anchor:"transformers.MobileViTImageProcessor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": typing.List[typing.Tuple] = None"}],parametersDescription:[{anchor:"transformers.MobileViTImageProcessor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/pr_22105/en/model_doc/mobilevit#transformers.MobileViTForSemanticSegmentation">MobileViTForSemanticSegmentation</a>) &#x2014;
Raw outputs of the model.`,name:"outputs"},{anchor:"transformers.MobileViTImageProcessor.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/vr_22105/src/transformers/models/mobilevit/image_processing_mobilevit.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>
`}}),tt=new St({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ro],pytorch:[Qt]},$$scope:{ctx:F}}}),ct=new Gt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/mobilevit.md"}}),{c(){e=m("meta"),g=r(),o=m("p"),a=r(),M(b.$$.fragment),s=r(),M(_.$$.fragment),X=r(),C=m("p"),C.innerHTML=J,q=r(),Z=m("p"),Z.textContent=k,z=r(),d=m("p"),d.innerHTML=j,D=r(),Ve=m("p"),Ve.innerHTML=Ue,de=r(),M(N.$$.fragment),Y=r(),_e=m("ul"),_e.innerHTML=he,Ne=r(),M(R.$$.fragment),te=r(),Ie=m("p"),Ie.innerHTML=ze,O=r(),M(oe.$$.fragment),xe=r(),ge=m("p"),ge.textContent=Qe,Ce=r(),M(se.$$.fragment),Ge=r(),G=m("ul"),G.innerHTML=He,P=r(),K=m("p"),K.innerHTML=ee,ne=r(),Ze=m("ul"),Ze.innerHTML=Re,Te=r(),Fe=m("p"),Fe.textContent=me,Pe=r(),M(ae.$$.fragment),E=r(),U=m("div"),M(re.$$.fragment),Je=r(),Me=m("p"),Me.innerHTML=Ae,ve=r(),ue=m("p"),ue.innerHTML=ke,Le=r(),M(f.$$.fragment),I=r(),M(H.$$.fragment),L=r(),S=m("div"),M(W.$$.fragment),B=r(),be=m("div"),M(We.$$.fragment),mt=r(),Xe=m("p"),Xe.textContent=Be,nt=r(),je=m("p"),je.innerHTML=at,h=r(),x=m("div"),M(ie.$$.fragment),le=r(),pe=m("p"),pe.innerHTML=fe,ye=r(),M(qe.$$.fragment),rt=r(),we=m("div"),M(Ye.$$.fragment),$t=r(),pt=m("p"),pt.textContent=jt,Vt=r(),Ke=m("div"),M(it.$$.fragment),xt=r(),ft=m("p"),ft.textContent=Ut,Ct=r(),et=m("div"),M(lt.$$.fragment),Ft=r(),ht=m("p"),ht.innerHTML=It,bt=r(),M(tt.$$.fragment),_t=r(),M(ct.$$.fragment),Tt=r(),ut=m("p"),this.h()},l(t){const T=Rt("svelte-u9bgzb",document.head);e=p(T,"META",{name:!0,content:!0}),T.forEach(n),g=i(t),o=p(t,"P",{}),Q(o).forEach(n),a=i(t),v(b.$$.fragment,t),s=i(t),v(_.$$.fragment,t),X=i(t),C=p(t,"P",{"data-svelte-h":!0}),u(C)!=="svelte-apjtbw"&&(C.innerHTML=J),q=i(t),Z=p(t,"P",{"data-svelte-h":!0}),u(Z)!=="svelte-vfdo9a"&&(Z.textContent=k),z=i(t),d=p(t,"P",{"data-svelte-h":!0}),u(d)!=="svelte-1sl3ue4"&&(d.innerHTML=j),D=i(t),Ve=p(t,"P",{"data-svelte-h":!0}),u(Ve)!=="svelte-wh05f9"&&(Ve.innerHTML=Ue),de=i(t),v(N.$$.fragment,t),Y=i(t),_e=p(t,"UL",{"data-svelte-h":!0}),u(_e)!=="svelte-mki8li"&&(_e.innerHTML=he),Ne=i(t),v(R.$$.fragment,t),te=i(t),Ie=p(t,"P",{"data-svelte-h":!0}),u(Ie)!=="svelte-j7j4pu"&&(Ie.innerHTML=ze),O=i(t),v(oe.$$.fragment,t),xe=i(t),ge=p(t,"P",{"data-svelte-h":!0}),u(ge)!=="svelte-1vdwjx8"&&(ge.textContent=Qe),Ce=i(t),v(se.$$.fragment,t),Ge=i(t),G=p(t,"UL",{"data-svelte-h":!0}),u(G)!=="svelte-mfmi4a"&&(G.innerHTML=He),P=i(t),K=p(t,"P",{"data-svelte-h":!0}),u(K)!=="svelte-1qspi63"&&(K.innerHTML=ee),ne=i(t),Ze=p(t,"UL",{"data-svelte-h":!0}),u(Ze)!=="svelte-bnel3y"&&(Ze.innerHTML=Re),Te=i(t),Fe=p(t,"P",{"data-svelte-h":!0}),u(Fe)!=="svelte-1xesile"&&(Fe.textContent=me),Pe=i(t),v(ae.$$.fragment,t),E=i(t),U=p(t,"DIV",{class:!0});var Ee=Q(U);v(re.$$.fragment,Ee),Je=i(Ee),Me=p(Ee,"P",{"data-svelte-h":!0}),u(Me)!=="svelte-grkxrs"&&(Me.innerHTML=Ae),ve=i(Ee),ue=p(Ee,"P",{"data-svelte-h":!0}),u(ue)!=="svelte-1pjt8ff"&&(ue.innerHTML=ke),Le=i(Ee),v(f.$$.fragment,Ee),Ee.forEach(n),I=i(t),v(H.$$.fragment,t),L=i(t),S=p(t,"DIV",{class:!0});var De=Q(S);v(W.$$.fragment,De),B=i(De),be=p(De,"DIV",{class:!0});var gt=Q(be);v(We.$$.fragment,gt),mt=i(gt),Xe=p(gt,"P",{"data-svelte-h":!0}),u(Xe)!=="svelte-4612b7"&&(Xe.textContent=Be),nt=i(gt),je=p(gt,"P",{"data-svelte-h":!0}),u(je)!=="svelte-b84uvg"&&(je.innerHTML=at),gt.forEach(n),h=i(De),x=p(De,"DIV",{class:!0});var vt=Q(x);v(ie.$$.fragment,vt),le=i(vt),pe=p(vt,"P",{"data-svelte-h":!0}),u(pe)!=="svelte-3ge177"&&(pe.innerHTML=fe),vt.forEach(n),De.forEach(n),ye=i(t),v(qe.$$.fragment,t),rt=i(t),we=p(t,"DIV",{class:!0});var ot=Q(we);v(Ye.$$.fragment,ot),$t=i(ot),pt=p(ot,"P",{"data-svelte-h":!0}),u(pt)!=="svelte-7gbr4d"&&(pt.textContent=jt),Vt=i(ot),Ke=p(ot,"DIV",{class:!0});var yt=Q(Ke);v(it.$$.fragment,yt),xt=i(yt),ft=p(yt,"P",{"data-svelte-h":!0}),u(ft)!=="svelte-1x3yxsa"&&(ft.textContent=Ut),yt.forEach(n),Ct=i(ot),et=p(ot,"DIV",{class:!0});var wt=Q(et);v(lt.$$.fragment,wt),Ft=i(wt),ht=p(wt,"P",{"data-svelte-h":!0}),u(ht)!=="svelte-3ge177"&&(ht.innerHTML=It),wt.forEach(n),ot.forEach(n),bt=i(t),v(tt.$$.fragment,t),_t=i(t),v(ct.$$.fragment,t),Tt=i(t),ut=p(t,"P",{}),Q(ut).forEach(n),this.h()},h(){A(e,"name","hf:doc:metadata"),A(e,"content",lo),A(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,T){c(document.head,e),l(t,g,T),l(t,o,T),l(t,a,T),y(b,t,T),l(t,s,T),y(_,t,T),l(t,X,T),l(t,C,T),l(t,q,T),l(t,Z,T),l(t,z,T),l(t,d,T),l(t,D,T),l(t,Ve,T),l(t,de,T),y(N,t,T),l(t,Y,T),l(t,_e,T),l(t,Ne,T),y(R,t,T),l(t,te,T),l(t,Ie,T),l(t,O,T),y(oe,t,T),l(t,xe,T),l(t,ge,T),l(t,Ce,T),y(se,t,T),l(t,Ge,T),l(t,G,T),l(t,P,T),l(t,K,T),l(t,ne,T),l(t,Ze,T),l(t,Te,T),l(t,Fe,T),l(t,Pe,T),y(ae,t,T),l(t,E,T),l(t,U,T),y(re,U,null),c(U,Je),c(U,Me),c(U,ve),c(U,ue),c(U,Le),y(f,U,null),l(t,I,T),y(H,t,T),l(t,L,T),l(t,S,T),y(W,S,null),c(S,B),c(S,be),y(We,be,null),c(be,mt),c(be,Xe),c(be,nt),c(be,je),c(S,h),c(S,x),y(ie,x,null),c(x,le),c(x,pe),l(t,ye,T),y(qe,t,T),l(t,rt,T),l(t,we,T),y(Ye,we,null),c(we,$t),c(we,pt),c(we,Vt),c(we,Ke),y(it,Ke,null),c(Ke,xt),c(Ke,ft),c(we,Ct),c(we,et),y(lt,et,null),c(et,Ft),c(et,ht),l(t,bt,T),y(tt,t,T),l(t,_t,T),y(ct,t,T),l(t,Tt,T),l(t,ut,T),Mt=!0},p(t,[T]){const Ee={};T&2&&(Ee.$$scope={dirty:T,ctx:t}),f.$set(Ee);const De={};T&2&&(De.$$scope={dirty:T,ctx:t}),tt.$set(De)},i(t){Mt||(w(b.$$.fragment,t),w(_.$$.fragment,t),w(N.$$.fragment,t),w(R.$$.fragment,t),w(oe.$$.fragment,t),w(se.$$.fragment,t),w(ae.$$.fragment,t),w(re.$$.fragment,t),w(f.$$.fragment,t),w(H.$$.fragment,t),w(W.$$.fragment,t),w(We.$$.fragment,t),w(ie.$$.fragment,t),w(qe.$$.fragment,t),w(Ye.$$.fragment,t),w(it.$$.fragment,t),w(lt.$$.fragment,t),w(tt.$$.fragment,t),w(ct.$$.fragment,t),Mt=!0)},o(t){$(b.$$.fragment,t),$(_.$$.fragment,t),$(N.$$.fragment,t),$(R.$$.fragment,t),$(oe.$$.fragment,t),$(se.$$.fragment,t),$(ae.$$.fragment,t),$(re.$$.fragment,t),$(f.$$.fragment,t),$(H.$$.fragment,t),$(W.$$.fragment,t),$(We.$$.fragment,t),$(ie.$$.fragment,t),$(qe.$$.fragment,t),$(Ye.$$.fragment,t),$(it.$$.fragment,t),$(lt.$$.fragment,t),$(tt.$$.fragment,t),$(ct.$$.fragment,t),Mt=!1},d(t){t&&(n(g),n(o),n(a),n(s),n(X),n(C),n(q),n(Z),n(z),n(d),n(D),n(Ve),n(de),n(Y),n(_e),n(Ne),n(te),n(Ie),n(O),n(xe),n(ge),n(Ce),n(Ge),n(G),n(P),n(K),n(ne),n(Ze),n(Te),n(Fe),n(Pe),n(E),n(U),n(I),n(L),n(S),n(ye),n(rt),n(we),n(bt),n(_t),n(Tt),n(ut)),n(e),V(b,t),V(_,t),V(N,t),V(R,t),V(oe,t),V(se,t),V(ae,t),V(re),V(f),V(H,t),V(W),V(We),V(ie),V(qe,t),V(Ye),V(it),V(lt),V(tt,t),V(ct,t)}}}const lo='{"title":"MobileViT","local":"mobilevit","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"MobileViTConfig","local":"transformers.MobileViTConfig","sections":[],"depth":2},{"title":"MobileViTFeatureExtractor","local":"transformers.MobileViTFeatureExtractor","sections":[],"depth":2},{"title":"MobileViTImageProcessor","local":"transformers.MobileViTImageProcessor","sections":[],"depth":2},{"title":"MobileViTModel","local":"transformers.MobileViTModel","sections":[],"depth":2},{"title":"MobileViTForImageClassification","local":"transformers.MobileViTForImageClassification","sections":[],"depth":2},{"title":"MobileViTForSemanticSegmentation","local":"transformers.MobileViTForSemanticSegmentation","sections":[],"depth":2},{"title":"TFMobileViTModel","local":"transformers.TFMobileViTModel","sections":[],"depth":2},{"title":"TFMobileViTForImageClassification","local":"transformers.TFMobileViTForImageClassification","sections":[],"depth":2},{"title":"TFMobileViTForSemanticSegmentation","local":"transformers.TFMobileViTForSemanticSegmentation","sections":[],"depth":2}],"depth":1}';function co(F){return kt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Mo extends Wt{constructor(e){super(),zt(this,e,co,io,Jt,{})}}export{Mo as component};
