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 St,h as p,f as n,c as i,j as Q,u as v,x as g,k as A,y as c,a as l,v as w,d as y,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.e257edda.js";import{C as st}from"../chunks/CodeBlock.e6cd0d95.js";import{F as Nt,M as Zt}from"../chunks/Markdown.7217f838.js";import{E as dt}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{P as Rt}from"../chunks/PipelineTag.5f100392.js";import{H as Ne,E as Gt}from"../chunks/EditOnGithub.91d95064.js";function Pt(F){let e,u="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=u,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),g(e)!=="svelte-11lpom8"&&(e.textContent=u),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),w(a,s,_),b=!0},p:$e,i(s){b||(y(a.$$.fragment,s),b=!0)},o(s){$(a.$$.fragment,s),b=!1},d(s){s&&(n(e),n(o)),V(a,s)}}}function Ht(F){let e,u=`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=u},l(o){e=p(o,"P",{"data-svelte-h":!0}),g(e)!=="svelte-fincs2"&&(e.innerHTML=u)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function Lt(F){let e,u="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=u,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),g(e)!=="svelte-11lpom8"&&(e.textContent=u),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),w(a,s,_),b=!0},p:$e,i(s){b||(y(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,u=`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=u},l(o){e=p(o,"P",{"data-svelte-h":!0}),g(e)!=="svelte-fincs2"&&(e.innerHTML=u)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function Et(F){let e,u="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=u,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),g(e)!=="svelte-11lpom8"&&(e.textContent=u),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),w(a,s,_),b=!0},p:$e,i(s){b||(y(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,u=`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=u},l(o){e=p(o,"P",{"data-svelte-h":!0}),g(e)!=="svelte-fincs2"&&(e.innerHTML=u)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function qt(F){let e,u="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=u,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),g(e)!=="svelte-kvfsh7"&&(e.textContent=u),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),w(a,s,_),b=!0},p:$e,i(s){b||(y(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,u,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/v4.43.0/en/model_doc/mobilevit#transformers.MobileViTModel">MobileViTModel</a> forward method, overrides the <code>__call__</code> special method.',z,d,j,D,Ve,Ue,de,R,Y,_e,he,Re=`MobileViT model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,S,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,ue,Qe='The <a href="/docs/transformers/v4.43.0/en/model_doc/mobilevit#transformers.MobileViTForImageClassification">MobileViTForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Ce,se,Ge,G,Le,P,K,ee,ne,Ze,Se,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/v4.43.0/en/model_doc/mobilevit#transformers.MobileViTForSemanticSegmentation">MobileViTForSemanticSegmentation</a> forward method, overrides the <code>__call__</code> special method.',Ae,ve,ge,ke,He;return e=new Ne({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/v4.43.0/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/v4.43.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.43.0/src/transformers/models/mobilevit/modeling_mobilevit.py#L691"}}),J=new ce({props:{name:"forward",anchor:"transformers.MobileViTModel.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/v4.43.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.43.0/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/v4.43.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.43.0/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/v4.43.0/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:[Ht]},$$scope:{ctx:F}}}),D=new dt({props:{anchor:"transformers.MobileViTModel.forward.example",$$slots:{default:[Lt]},$$scope:{ctx:F}}}),Ue=new Ne({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/v4.43.0/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/v4.43.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.43.0/src/transformers/models/mobilevit/modeling_mobilevit.py#L782"}}),oe=new ce({props:{name:"forward",anchor:"transformers.MobileViTForImageClassification.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/v4.43.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.43.0/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/v4.43.0/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/v4.43.0/src/transformers/models/mobilevit/modeling_mobilevit.py#L805",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.43.0/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/v4.43.0/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/v4.43.0/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 Ne({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/v4.43.0/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/v4.43.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.43.0/src/transformers/models/mobilevit/modeling_mobilevit.py#L978"}}),U=new ce({props:{name:"forward",anchor:"transformers.MobileViTForSemanticSegmentation.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/v4.43.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.43.0/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/v4.43.0/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/v4.43.0/src/transformers/models/mobilevit/modeling_mobilevit.py#L995",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.43.0/en/main_classes/output#transformers.modeling_outputs.SemanticSegmenterOutput"
>transformers.modeling_outputs.SemanticSegmenterOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.43.0/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/v4.43.0/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),u=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(),R=m("div"),M(Y.$$.fragment),_e=r(),he=m("p"),he.textContent=Re,S=r(),te=m("p"),te.innerHTML=Ie,ze=r(),O=m("div"),M(oe.$$.fragment),xe=r(),ue=m("p"),ue.innerHTML=Qe,Ce=r(),M(se.$$.fragment),Ge=r(),M(G.$$.fragment),Le=r(),M(P.$$.fragment),K=r(),ee=m("div"),M(ne.$$.fragment),Ze=r(),Se=m("p"),Se.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),ge=r(),M(ke.$$.fragment),this.h()},l(f){v(e.$$.fragment,f),u=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}),g(s)!=="svelte-1nu7yyb"&&(s.innerHTML=_),X=i(I),C=p(I,"DIV",{class:!0});var L=Q(C);v(J.$$.fragment,L),q=i(L),Z=p(L,"P",{"data-svelte-h":!0}),g(Z)!=="svelte-1tvptrc"&&(Z.innerHTML=k),z=i(L),v(d.$$.fragment,L),j=i(L),v(D.$$.fragment,L),L.forEach(n),I.forEach(n),Ve=i(f),v(Ue.$$.fragment,f),de=i(f),R=p(f,"DIV",{class:!0});var H=Q(R);v(Y.$$.fragment,H),_e=i(H),he=p(H,"P",{"data-svelte-h":!0}),g(he)!=="svelte-zljr1p"&&(he.textContent=Re),S=i(H),te=p(H,"P",{"data-svelte-h":!0}),g(te)!=="svelte-1gjh92c"&&(te.innerHTML=Ie),ze=i(H),O=p(H,"DIV",{class:!0});var N=Q(O);v(oe.$$.fragment,N),xe=i(N),ue=p(N,"P",{"data-svelte-h":!0}),g(ue)!=="svelte-1b92n4k"&&(ue.innerHTML=Qe),Ce=i(N),v(se.$$.fragment,N),Ge=i(N),v(G.$$.fragment,N),N.forEach(n),H.forEach(n),Le=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),Se=p(W,"P",{"data-svelte-h":!0}),g(Se)!=="svelte-n2rd9e"&&(Se.textContent=Te),Fe=i(W),me=p(W,"P",{"data-svelte-h":!0}),g(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}),g(Je)!=="svelte-13bqmg"&&(Je.innerHTML=Me),Ae=i(B),v(ve.$$.fragment,B),ge=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(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(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){w(e,f,I),l(f,u,I),l(f,o,I),w(a,o,null),c(o,b),c(o,s),c(o,X),c(o,C),w(J,C,null),c(C,q),c(C,Z),c(C,z),w(d,C,null),c(C,j),w(D,C,null),l(f,Ve,I),w(Ue,f,I),l(f,de,I),l(f,R,I),w(Y,R,null),c(R,_e),c(R,he),c(R,S),c(R,te),c(R,ze),c(R,O),w(oe,O,null),c(O,xe),c(O,ue),c(O,Ce),w(se,O,null),c(O,Ge),w(G,O,null),l(f,Le,I),w(P,f,I),l(f,K,I),l(f,ee,I),w(ne,ee,null),c(ee,Ze),c(ee,Se),c(ee,Fe),c(ee,me),c(ee,ae),c(ee,E),w(U,E,null),c(E,re),c(E,Je),c(E,Ae),w(ve,E,null),c(E,ge),w(ke,E,null),He=!0},p(f,I){const L={};I&2&&(L.$$scope={dirty:I,ctx:f}),d.$set(L);const H={};I&2&&(H.$$scope={dirty:I,ctx:f}),D.$set(H);const N={};I&2&&(N.$$scope={dirty:I,ctx:f}),se.$set(N);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){He||(y(e.$$.fragment,f),y(a.$$.fragment,f),y(J.$$.fragment,f),y(d.$$.fragment,f),y(D.$$.fragment,f),y(Ue.$$.fragment,f),y(Y.$$.fragment,f),y(oe.$$.fragment,f),y(se.$$.fragment,f),y(G.$$.fragment,f),y(P.$$.fragment,f),y(ne.$$.fragment,f),y(U.$$.fragment,f),y(ve.$$.fragment,f),y(ke.$$.fragment,f),He=!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),He=!1},d(f){f&&(n(u),n(o),n(Ve),n(de),n(R),n(Le),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,u;return e=new Zt({props:{$$slots:{default:[Yt]},$$scope:{ctx:F}}}),{c(){M(e.$$.fragment)},l(o){v(e.$$.fragment,o)},m(o,a){w(e,o,a),u=!0},p(o,a){const b={};a&2&&(b.$$scope={dirty:a,ctx:o}),e.$set(b)},i(o){u||(y(e.$$.fragment,o),u=!0)},o(o){$(e.$$.fragment,o),u=!1},d(o){V(e,o)}}}function At(F){let e,u="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=u,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}),g(e)!=="svelte-1ajbfxg"&&(e.innerHTML=u),o=i(d),a=p(d,"UL",{"data-svelte-h":!0}),g(a)!=="svelte-qm1t26"&&(a.innerHTML=b),s=i(d),_=p(d,"P",{"data-svelte-h":!0}),g(_)!=="svelte-1v9qsc5"&&(_.innerHTML=X),C=i(d),J=p(d,"UL",{"data-svelte-h":!0}),g(J)!=="svelte-99h8aq"&&(J.innerHTML=q),Z=i(d),k=p(d,"P",{"data-svelte-h":!0}),g(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,u=`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=u},l(o){e=p(o,"P",{"data-svelte-h":!0}),g(e)!=="svelte-fincs2"&&(e.innerHTML=u)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function Ot(F){let e,u="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=u,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),g(e)!=="svelte-11lpom8"&&(e.textContent=u),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),w(a,s,_),b=!0},p:$e,i(s){b||(y(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,u="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=u,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}),g(e)!=="svelte-1ajbfxg"&&(e.innerHTML=u),o=i(d),a=p(d,"UL",{"data-svelte-h":!0}),g(a)!=="svelte-qm1t26"&&(a.innerHTML=b),s=i(d),_=p(d,"P",{"data-svelte-h":!0}),g(_)!=="svelte-1v9qsc5"&&(_.innerHTML=X),C=i(d),J=p(d,"UL",{"data-svelte-h":!0}),g(J)!=="svelte-99h8aq"&&(J.innerHTML=q),Z=i(d),k=p(d,"P",{"data-svelte-h":!0}),g(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,u=`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=u},l(o){e=p(o,"P",{"data-svelte-h":!0}),g(e)!=="svelte-fincs2"&&(e.innerHTML=u)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function to(F){let e,u="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=u,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),g(e)!=="svelte-11lpom8"&&(e.textContent=u),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),w(a,s,_),b=!0},p:$e,i(s){b||(y(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,u="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=u,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}),g(e)!=="svelte-1ajbfxg"&&(e.innerHTML=u),o=i(d),a=p(d,"UL",{"data-svelte-h":!0}),g(a)!=="svelte-qm1t26"&&(a.innerHTML=b),s=i(d),_=p(d,"P",{"data-svelte-h":!0}),g(_)!=="svelte-1v9qsc5"&&(_.innerHTML=X),C=i(d),J=p(d,"UL",{"data-svelte-h":!0}),g(J)!=="svelte-99h8aq"&&(J.innerHTML=q),Z=i(d),k=p(d,"P",{"data-svelte-h":!0}),g(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,u=`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=u},l(o){e=p(o,"P",{"data-svelte-h":!0}),g(e)!=="svelte-fincs2"&&(e.innerHTML=u)},m(o,a){l(o,e,a)},p:$e,d(o){o&&n(e)}}}function no(F){let e,u="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=u,o=r(),M(a.$$.fragment)},l(s){e=p(s,"P",{"data-svelte-h":!0}),g(e)!=="svelte-kvfsh7"&&(e.textContent=u),o=i(s),v(a.$$.fragment,s)},m(s,_){l(s,e,_),l(s,o,_),w(a,s,_),b=!0},p:$e,i(s){b||(y(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,u,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/v4.43.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,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/v4.43.0/en/model_doc/mobilevit#transformers.TFMobileViTModel">TFMobileViTModel</a> forward method, overrides the <code>__call__</code> special method.',Ue,de,R,Y,_e,he,Re,S,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,ue=`This model inherits from <a href="/docs/transformers/v4.43.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,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,Le,P,K,ee,ne,Ze='The <a href="/docs/transformers/v4.43.0/en/model_doc/mobilevit#transformers.TFMobileViTForImageClassification">TFMobileViTForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Se,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,ge,ke=`This model inherits from <a href="/docs/transformers/v4.43.0/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,He,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.`,L,H,N,W,B,be,We,mt='The <a href="/docs/transformers/v4.43.0/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 Ne({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/v4.43.0/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/v4.43.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.43.0/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/v4.43.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.43.0/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/v4.43.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.43.0/src/transformers/models/mobilevit/modeling_tf_mobilevit.py#L989",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.43.0/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/v4.43.0/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/v4.43.0/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 Ne({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/v4.43.0/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/v4.43.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.43.0/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/v4.43.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.43.0/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/v4.43.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.43.0/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/v4.43.0/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 Ne({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/v4.43.0/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/v4.43.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.43.0/src/transformers/models/mobilevit/modeling_tf_mobilevit.py#L1249"}}),H=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/v4.43.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.43.0/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/v4.43.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.43.0/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/v4.43.0/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),u=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),R=r(),M(Y.$$.fragment),_e=r(),M(he.$$.fragment),Re=r(),S=m("div"),M(te.$$.fragment),Ie=r(),ze=m("p"),ze.textContent=O,oe=r(),xe=m("p"),xe.innerHTML=ue,Qe=r(),Ce=m("p"),Ce.innerHTML=se,Ge=r(),M(G.$$.fragment),Le=r(),P=m("div"),M(K.$$.fragment),ee=r(),ne=m("p"),ne.innerHTML=Ze,Se=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(),ge=m("p"),ge.innerHTML=ke,He=r(),f=m("p"),f.innerHTML=I,L=r(),M(H.$$.fragment),N=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),u=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}),g(s)!=="svelte-1d5awxt"&&(s.innerHTML=_),X=i(x),C=p(x,"P",{"data-svelte-h":!0}),g(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}),g(D)!=="svelte-h76y90"&&(D.innerHTML=Ve),Ue=i(ie),v(de.$$.fragment,ie),R=i(ie),v(Y.$$.fragment,ie),ie.forEach(n),x.forEach(n),_e=i(h),v(he.$$.fragment,h),Re=i(h),S=p(h,"DIV",{class:!0});var le=Q(S);v(te.$$.fragment,le),Ie=i(le),ze=p(le,"P",{"data-svelte-h":!0}),g(ze)!=="svelte-zljr1p"&&(ze.textContent=O),oe=i(le),xe=p(le,"P",{"data-svelte-h":!0}),g(xe)!=="svelte-f6d1qq"&&(xe.innerHTML=ue),Qe=i(le),Ce=p(le,"P",{"data-svelte-h":!0}),g(Ce)!=="svelte-1be7e3c"&&(Ce.innerHTML=se),Ge=i(le),v(G.$$.fragment,le),Le=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}),g(ne)!=="svelte-1yxkuv8"&&(ne.innerHTML=Ze),Se=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}),g(Me)!=="svelte-n2rd9e"&&(Me.textContent=Ae),ve=i(fe),ge=p(fe,"P",{"data-svelte-h":!0}),g(ge)!=="svelte-f6d1qq"&&(ge.innerHTML=ke),He=i(fe),f=p(fe,"P",{"data-svelte-h":!0}),g(f)!=="svelte-1be7e3c"&&(f.innerHTML=I),L=i(fe),v(H.$$.fragment,fe),N=i(fe),W=p(fe,"DIV",{class:!0});var we=Q(W);v(B.$$.fragment,we),be=i(we),We=p(we,"P",{"data-svelte-h":!0}),g(We)!=="svelte-10o9m2s"&&(We.innerHTML=mt),Xe=i(we),v(Be.$$.fragment,we),nt=i(we),v(je.$$.fragment,we),we.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(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(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){w(e,h,x),l(h,u,x),l(h,o,x),w(a,o,null),c(o,b),c(o,s),c(o,X),c(o,C),c(o,q),w(Z,o,null),c(o,k),c(o,z),w(d,z,null),c(z,j),c(z,D),c(z,Ue),w(de,z,null),c(z,R),w(Y,z,null),l(h,_e,x),w(he,h,x),l(h,Re,x),l(h,S,x),w(te,S,null),c(S,Ie),c(S,ze),c(S,oe),c(S,xe),c(S,Qe),c(S,Ce),c(S,Ge),w(G,S,null),c(S,Le),c(S,P),w(K,P,null),c(P,ee),c(P,ne),c(P,Se),w(Te,P,null),c(P,Fe),w(me,P,null),l(h,Pe,x),w(ae,h,x),l(h,E,x),l(h,U,x),w(re,U,null),c(U,Je),c(U,Me),c(U,ve),c(U,ge),c(U,He),c(U,f),c(U,L),w(H,U,null),c(U,N),c(U,W),w(B,W,null),c(W,be),c(W,We),c(W,Xe),w(Be,W,null),c(W,nt),w(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 we={};x&2&&(we.$$scope={dirty:x,ctx:h}),Te.$set(we);const qe={};x&2&&(qe.$$scope={dirty:x,ctx:h}),me.$set(qe);const rt={};x&2&&(rt.$$scope={dirty:x,ctx:h}),H.$set(rt);const ye={};x&2&&(ye.$$scope={dirty:x,ctx:h}),Be.$set(ye);const Ye={};x&2&&(Ye.$$scope={dirty:x,ctx:h}),je.$set(Ye)},i(h){at||(y(e.$$.fragment,h),y(a.$$.fragment,h),y(Z.$$.fragment,h),y(d.$$.fragment,h),y(de.$$.fragment,h),y(Y.$$.fragment,h),y(he.$$.fragment,h),y(te.$$.fragment,h),y(G.$$.fragment,h),y(K.$$.fragment,h),y(Te.$$.fragment,h),y(me.$$.fragment,h),y(ae.$$.fragment,h),y(re.$$.fragment,h),y(H.$$.fragment,h),y(B.$$.fragment,h),y(Be.$$.fragment,h),y(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),$(H.$$.fragment,h),$(B.$$.fragment,h),$(Be.$$.fragment,h),$(je.$$.fragment,h),at=!1},d(h){h&&(n(u),n(o),n(_e),n(Re),n(S),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(H),V(B),V(Be),V(je)}}}function ro(F){let e,u;return e=new Zt({props:{$$slots:{default:[ao]},$$scope:{ctx:F}}}),{c(){M(e.$$.fragment)},l(o){v(e.$$.fragment,o)},m(o,a){w(e,o,a),u=!0},p(o,a){const b={};a&2&&(b.$$scope={dirty:a,ctx:o}),e.$set(b)},i(o){u||(y(e.$$.fragment,o),u=!0)},o(o){$(e.$$.fragment,o),u=!1},d(o){V(e,o)}}}function io(F){let e,u,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,R,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/v4.43.0/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>`,Re,S,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,ue,Qe="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with MobileViT.",Ce,se,Ge,G,Le='<li><a href="/docs/transformers/v4.43.0/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,Se='<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/v4.43.0/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,ge,ke=`Configuration objects inherit from <a href="/docs/transformers/v4.43.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.43.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,He,f,I,L,H,N,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/v4.43.0/en/model_doc/mobilevit#transformers.MobileViTForSemanticSegmentation">MobileViTForSemanticSegmentation</a> into semantic segmentation maps. Only supports PyTorch.',we,qe,rt,ye,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/v4.43.0/en/model_doc/mobilevit#transformers.MobileViTForSemanticSegmentation">MobileViTForSemanticSegmentation</a> into semantic segmentation maps. Only supports PyTorch.',bt,tt,_t,ct,Tt,gt,Mt;return b=new Ne({props:{title:"MobileViT",local:"mobilevit",headingTag:"h1"}}),_=new Ne({props:{title:"Overview",local:"overview",headingTag:"h2"}}),R=new Ne({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),S=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 Ne({props:{title:"Resources",local:"resources",headingTag:"h2"}}),se=new Rt({props:{pipeline:"image-classification"}}),ae=new Ne({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/v4.43.0/src/transformers/models/mobilevit/configuration_mobilevit.py#L30"}}),f=new dt({props:{anchor:"transformers.MobileViTConfig.example",$$slots:{default:[Pt]},$$scope:{ctx:F}}}),L=new Ne({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/v4.43.0/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/v4.43.0/src/transformers/models/mobilevit/image_processing_mobilevit.py#L193"}}),ie=new ce({props:{name:"post_process_semantic_segmentation",anchor:"transformers.MobileViTFeatureExtractor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": List = None"}],parametersDescription:[{anchor:"transformers.MobileViTFeatureExtractor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.43.0/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/v4.43.0/src/transformers/models/mobilevit/image_processing_mobilevit.py#L452",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 Ne({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:": Dict = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": Union = 0.00392156862745098"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": Dict = 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/v4.43.0/src/transformers/models/mobilevit/image_processing_mobilevit.py#L48"}}),it=new ce({props:{name:"preprocess",anchor:"transformers.MobileViTImageProcessor.preprocess",parameters:[{name:"images",val:": Union"},{name:"segmentation_maps",val:": Union = None"},{name:"do_resize",val:": bool = None"},{name:"size",val:": Dict = 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:": Dict = None"},{name:"do_flip_channel_order",val:": bool = None"},{name:"return_tensors",val:": Union = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": Union = None"},{name:"**kwargs",val:""}],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/v4.43.0/src/transformers/models/mobilevit/image_processing_mobilevit.py#L309"}}),lt=new ce({props:{name:"post_process_semantic_segmentation",anchor:"transformers.MobileViTImageProcessor.post_process_semantic_segmentation",parameters:[{name:"outputs",val:""},{name:"target_sizes",val:": List = None"}],parametersDescription:[{anchor:"transformers.MobileViTImageProcessor.post_process_semantic_segmentation.outputs",description:`<strong>outputs</strong> (<a href="/docs/transformers/v4.43.0/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/v4.43.0/src/transformers/models/mobilevit/image_processing_mobilevit.py#L452",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 Nt({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"),u=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(R.$$.fragment),Y=r(),_e=m("ul"),_e.innerHTML=he,Re=r(),M(S.$$.fragment),te=r(),Ie=m("p"),Ie.innerHTML=ze,O=r(),M(oe.$$.fragment),xe=r(),ue=m("p"),ue.textContent=Qe,Ce=r(),M(se.$$.fragment),Ge=r(),G=m("ul"),G.innerHTML=Le,P=r(),K=m("p"),K.innerHTML=ee,ne=r(),Ze=m("ul"),Ze.innerHTML=Se,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(),ge=m("p"),ge.innerHTML=ke,He=r(),M(f.$$.fragment),I=r(),M(L.$$.fragment),H=r(),N=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,we=r(),M(qe.$$.fragment),rt=r(),ye=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(),gt=m("p"),this.h()},l(t){const T=St("svelte-u9bgzb",document.head);e=p(T,"META",{name:!0,content:!0}),T.forEach(n),u=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}),g(C)!=="svelte-apjtbw"&&(C.innerHTML=J),q=i(t),Z=p(t,"P",{"data-svelte-h":!0}),g(Z)!=="svelte-vfdo9a"&&(Z.textContent=k),z=i(t),d=p(t,"P",{"data-svelte-h":!0}),g(d)!=="svelte-1sl3ue4"&&(d.innerHTML=j),D=i(t),Ve=p(t,"P",{"data-svelte-h":!0}),g(Ve)!=="svelte-wh05f9"&&(Ve.innerHTML=Ue),de=i(t),v(R.$$.fragment,t),Y=i(t),_e=p(t,"UL",{"data-svelte-h":!0}),g(_e)!=="svelte-egm8y"&&(_e.innerHTML=he),Re=i(t),v(S.$$.fragment,t),te=i(t),Ie=p(t,"P",{"data-svelte-h":!0}),g(Ie)!=="svelte-j7j4pu"&&(Ie.innerHTML=ze),O=i(t),v(oe.$$.fragment,t),xe=i(t),ue=p(t,"P",{"data-svelte-h":!0}),g(ue)!=="svelte-1vdwjx8"&&(ue.textContent=Qe),Ce=i(t),v(se.$$.fragment,t),Ge=i(t),G=p(t,"UL",{"data-svelte-h":!0}),g(G)!=="svelte-zhm6xm"&&(G.innerHTML=Le),P=i(t),K=p(t,"P",{"data-svelte-h":!0}),g(K)!=="svelte-1qspi63"&&(K.innerHTML=ee),ne=i(t),Ze=p(t,"UL",{"data-svelte-h":!0}),g(Ze)!=="svelte-bnel3y"&&(Ze.innerHTML=Se),Te=i(t),Fe=p(t,"P",{"data-svelte-h":!0}),g(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}),g(Me)!=="svelte-1fc50f0"&&(Me.innerHTML=Ae),ve=i(Ee),ge=p(Ee,"P",{"data-svelte-h":!0}),g(ge)!=="svelte-w5ddnh"&&(ge.innerHTML=ke),He=i(Ee),v(f.$$.fragment,Ee),Ee.forEach(n),I=i(t),v(L.$$.fragment,t),H=i(t),N=p(t,"DIV",{class:!0});var De=Q(N);v(W.$$.fragment,De),B=i(De),be=p(De,"DIV",{class:!0});var ut=Q(be);v(We.$$.fragment,ut),mt=i(ut),Xe=p(ut,"P",{"data-svelte-h":!0}),g(Xe)!=="svelte-4612b7"&&(Xe.textContent=Be),nt=i(ut),je=p(ut,"P",{"data-svelte-h":!0}),g(je)!=="svelte-b84uvg"&&(je.innerHTML=at),ut.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}),g(pe)!=="svelte-17zf7hj"&&(pe.innerHTML=fe),vt.forEach(n),De.forEach(n),we=i(t),v(qe.$$.fragment,t),rt=i(t),ye=p(t,"DIV",{class:!0});var ot=Q(ye);v(Ye.$$.fragment,ot),$t=i(ot),pt=p(ot,"P",{"data-svelte-h":!0}),g(pt)!=="svelte-7gbr4d"&&(pt.textContent=jt),Vt=i(ot),Ke=p(ot,"DIV",{class:!0});var wt=Q(Ke);v(it.$$.fragment,wt),xt=i(wt),ft=p(wt,"P",{"data-svelte-h":!0}),g(ft)!=="svelte-1x3yxsa"&&(ft.textContent=Ut),wt.forEach(n),Ct=i(ot),et=p(ot,"DIV",{class:!0});var yt=Q(et);v(lt.$$.fragment,yt),Ft=i(yt),ht=p(yt,"P",{"data-svelte-h":!0}),g(ht)!=="svelte-17zf7hj"&&(ht.innerHTML=It),yt.forEach(n),ot.forEach(n),bt=i(t),v(tt.$$.fragment,t),_t=i(t),v(ct.$$.fragment,t),Tt=i(t),gt=p(t,"P",{}),Q(gt).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(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(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(ye,"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,u,T),l(t,o,T),l(t,a,T),w(b,t,T),l(t,s,T),w(_,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),w(R,t,T),l(t,Y,T),l(t,_e,T),l(t,Re,T),w(S,t,T),l(t,te,T),l(t,Ie,T),l(t,O,T),w(oe,t,T),l(t,xe,T),l(t,ue,T),l(t,Ce,T),w(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),w(ae,t,T),l(t,E,T),l(t,U,T),w(re,U,null),c(U,Je),c(U,Me),c(U,ve),c(U,ge),c(U,He),w(f,U,null),l(t,I,T),w(L,t,T),l(t,H,T),l(t,N,T),w(W,N,null),c(N,B),c(N,be),w(We,be,null),c(be,mt),c(be,Xe),c(be,nt),c(be,je),c(N,h),c(N,x),w(ie,x,null),c(x,le),c(x,pe),l(t,we,T),w(qe,t,T),l(t,rt,T),l(t,ye,T),w(Ye,ye,null),c(ye,$t),c(ye,pt),c(ye,Vt),c(ye,Ke),w(it,Ke,null),c(Ke,xt),c(Ke,ft),c(ye,Ct),c(ye,et),w(lt,et,null),c(et,Ft),c(et,ht),l(t,bt,T),w(tt,t,T),l(t,_t,T),w(ct,t,T),l(t,Tt,T),l(t,gt,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||(y(b.$$.fragment,t),y(_.$$.fragment,t),y(R.$$.fragment,t),y(S.$$.fragment,t),y(oe.$$.fragment,t),y(se.$$.fragment,t),y(ae.$$.fragment,t),y(re.$$.fragment,t),y(f.$$.fragment,t),y(L.$$.fragment,t),y(W.$$.fragment,t),y(We.$$.fragment,t),y(ie.$$.fragment,t),y(qe.$$.fragment,t),y(Ye.$$.fragment,t),y(it.$$.fragment,t),y(lt.$$.fragment,t),y(tt.$$.fragment,t),y(ct.$$.fragment,t),Mt=!0)},o(t){$(b.$$.fragment,t),$(_.$$.fragment,t),$(R.$$.fragment,t),$(S.$$.fragment,t),$(oe.$$.fragment,t),$(se.$$.fragment,t),$(ae.$$.fragment,t),$(re.$$.fragment,t),$(f.$$.fragment,t),$(L.$$.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(u),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(Re),n(te),n(Ie),n(O),n(xe),n(ue),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(H),n(N),n(we),n(rt),n(ye),n(bt),n(_t),n(Tt),n(gt)),n(e),V(b,t),V(_,t),V(R,t),V(S,t),V(oe,t),V(se,t),V(ae,t),V(re),V(f),V(L,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};
