import{s as Mo,A as Co,o as Lo,n as ke}from"../chunks/scheduler.01eeda35.js";import{S as xo,i as Io,g as l,s as r,r as f,A as jo,h as c,f as o,c as i,j as I,u as h,x as b,k as $,y as d,a as s,v as g,d as u,t as v,w as _}from"../chunks/index.6dd51b66.js";import{T as Ot}from"../chunks/Tip.de9bae2b.js";import{D as Z}from"../chunks/Docstring.cb556860.js";import{C as Lt}from"../chunks/CodeBlock.19ec9b8c.js";import{E as Ct}from"../chunks/ExampleCodeBlock.69db56ad.js";import{P as zo}from"../chunks/PipelineTag.5efc345e.js";import{H as V,E as Fo}from"../chunks/index.58fe8f9d.js";function Uo(M){let a,T="Example:",m,p,y;return p=new Lt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMExldml0Q29uZmlnJTJDJTIwTGV2aXRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBMZVZpVCUyMGxldml0LTEyOFMlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwTGV2aXRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwbGV2aXQtMTI4UyUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwTGV2aXRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LevitConfig, LevitModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a LeViT levit-128S style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = LevitConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the levit-128S style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = LevitModel(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(){a=l("p"),a.textContent=T,m=r(),f(p.$$.fragment)},l(n){a=c(n,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=i(n),h(p.$$.fragment,n)},m(n,w){s(n,a,w),s(n,m,w),g(p,n,w),y=!0},p:ke,i(n){y||(u(p.$$.fragment,n),y=!0)},o(n){v(p.$$.fragment,n),y=!1},d(n){n&&(o(a),o(m)),_(p,n)}}}function Wo(M){let a,T=`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(){a=l("p"),a.innerHTML=T},l(m){a=c(m,"P",{"data-svelte-h":!0}),b(a)!=="svelte-fincs2"&&(a.innerHTML=T)},m(m,p){s(m,a,p)},p:ke,d(m){m&&o(a)}}}function Jo(M){let a,T="Example:",m,p,y;return p=new Lt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMExldml0TW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbGV2aXQtMTI4UyUyMiklMEFtb2RlbCUyMCUzRCUyMExldml0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbGV2aXQtMTI4UyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, LevitModel
<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;facebook/levit-128S&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = LevitModel.from_pretrained(<span class="hljs-string">&quot;facebook/levit-128S&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">16</span>, <span class="hljs-number">384</span>]`,wrap:!1}}),{c(){a=l("p"),a.textContent=T,m=r(),f(p.$$.fragment)},l(n){a=c(n,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=i(n),h(p.$$.fragment,n)},m(n,w){s(n,a,w),s(n,m,w),g(p,n,w),y=!0},p:ke,i(n){y||(u(p.$$.fragment,n),y=!0)},o(n){v(p.$$.fragment,n),y=!1},d(n){n&&(o(a),o(m)),_(p,n)}}}function ko(M){let a,T=`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(){a=l("p"),a.innerHTML=T},l(m){a=c(m,"P",{"data-svelte-h":!0}),b(a)!=="svelte-fincs2"&&(a.innerHTML=T)},m(m,p){s(m,a,p)},p:ke,d(m){m&&o(a)}}}function Zo(M){let a,T="Example:",m,p,y;return p=new Lt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMExldml0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZsZXZpdC0xMjhTJTIyKSUwQW1vZGVsJTIwJTNEJTIwTGV2aXRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmxldml0LTEyOFMlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, LevitForImageClassification
<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;facebook/levit-128S&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = LevitForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/levit-128S&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(){a=l("p"),a.textContent=T,m=r(),f(p.$$.fragment)},l(n){a=c(n,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=i(n),h(p.$$.fragment,n)},m(n,w){s(n,a,w),s(n,m,w),g(p,n,w),y=!0},p:ke,i(n){y||(u(p.$$.fragment,n),y=!0)},o(n){v(p.$$.fragment,n),y=!1},d(n){n&&(o(a),o(m)),_(p,n)}}}function Vo(M){let a,T=`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(){a=l("p"),a.innerHTML=T},l(m){a=c(m,"P",{"data-svelte-h":!0}),b(a)!=="svelte-fincs2"&&(a.innerHTML=T)},m(m,p){s(m,a,p)},p:ke,d(m){m&&o(a)}}}function Po(M){let a,T="Example:",m,p,y;return p=new Lt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMExldml0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbldpdGhUZWFjaGVyJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmxldml0LTEyOFMlMjIpJTBBbW9kZWwlMjAlM0QlMjBMZXZpdEZvckltYWdlQ2xhc3NpZmljYXRpb25XaXRoVGVhY2hlci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZsZXZpdC0xMjhTJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, LevitForImageClassificationWithTeacher
<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;facebook/levit-128S&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = LevitForImageClassificationWithTeacher.from_pretrained(<span class="hljs-string">&quot;facebook/levit-128S&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(){a=l("p"),a.textContent=T,m=r(),f(p.$$.fragment)},l(n){a=c(n,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=i(n),h(p.$$.fragment,n)},m(n,w){s(n,a,w),s(n,m,w),g(p,n,w),y=!0},p:ke,i(n){y||(u(p.$$.fragment,n),y=!0)},o(n){v(p.$$.fragment,n),y=!1},d(n){n&&(o(a),o(m)),_(p,n)}}}function No(M){let a,T,m,p,y,n,w,Kt='<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/>',De,te,Ae,oe,eo='The LeViT model was proposed in <a href="https://arxiv.org/abs/2104.01136" rel="nofollow">LeViT: Introducing Convolutions to Vision Transformers</a> by Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Hervé Jégou, Matthijs Douze. LeViT improves the <a href="vit">Vision Transformer (ViT)</a> in performance and efficiency by a few architectural differences such as activation maps with decreasing resolutions in Transformers and the introduction of an attention bias to integrate positional information.',Oe,ae,to="The abstract from the paper is the following:",Ke,ne,oo=`<em>We design a family of image classification architectures that optimize the trade-off between accuracy
and efficiency in a high-speed regime. Our work exploits recent findings in attention-based architectures,
which are competitive on highly parallel processing hardware. We revisit principles from the extensive
literature on convolutional neural networks to apply them to transformers, in particular activation maps
with decreasing resolutions. We also introduce the attention bias, a new way to integrate positional information
in vision transformers. As a result, we propose LeVIT: a hybrid neural network for fast inference image classification.
We consider different measures of efficiency on different hardware platforms, so as to best reflect a wide range of
application scenarios. Our extensive experiments empirically validate our technical choices and show they are suitable
to most architectures. Overall, LeViT significantly outperforms existing convnets and vision transformers with respect
to the speed/accuracy tradeoff. For example, at 80% ImageNet top-1 accuracy, LeViT is 5 times faster than EfficientNet on CPU.</em>`,et,E,ao,tt,se,no='LeViT Architecture. Taken from the <a href="https://arxiv.org/abs/2104.01136">original paper</a>.',ot,re,so='This model was contributed by <a href="https://huggingface.co/anugunj" rel="nofollow">anugunj</a>. The original code can be found <a href="https://github.com/facebookresearch/LeViT" rel="nofollow">here</a>.',at,ie,nt,le,ro=`<li>Compared to ViT, LeViT models use an additional distillation head to effectively learn from a teacher (which, in the LeViT paper, is a ResNet like-model). The distillation head is learned through backpropagation under supervision of a ResNet like-model. They also draw inspiration from convolution neural networks to use activation maps with decreasing resolutions to increase the efficiency.</li> <li>There are 2 ways to fine-tune distilled models, either (1) in a classic way, by only placing a prediction head on top
of the final hidden state and not using the distillation head, or (2) by placing both a prediction head and distillation
head on top of the final hidden state. In that case, the prediction head is trained using regular cross-entropy between
the prediction of the head and the ground-truth label, while the distillation prediction head is trained using hard distillation
(cross-entropy between the prediction of the distillation head and the label predicted by the teacher). At inference time,
one takes the average prediction between both heads as final prediction. (2) is also called “fine-tuning with distillation”,
because one relies on a teacher that has already been fine-tuned on the downstream dataset. In terms of models, (1) corresponds
to <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitForImageClassification">LevitForImageClassification</a> and (2) corresponds to <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher">LevitForImageClassificationWithTeacher</a>.</li> <li>All released checkpoints were pre-trained and fine-tuned 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). only. No external data was used. This is in
contrast with the original ViT model, which used external data like the JFT-300M dataset/Imagenet-21k for
pre-training.</li> <li>The authors of LeViT released 5 trained LeViT models, which you can directly plug into <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitModel">LevitModel</a> or <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitForImageClassification">LevitForImageClassification</a>.
Techniques like data augmentation, optimization, and regularization were used in order to simulate training on a much larger dataset
(while only using ImageNet-1k for pre-training). The 5 variants available are (all trained on images of size 224x224):
<em>facebook/levit-128S</em>, <em>facebook/levit-128</em>, <em>facebook/levit-192</em>, <em>facebook/levit-256</em> and
<em>facebook/levit-384</em>. Note that one should use <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitImageProcessor">LevitImageProcessor</a> in order to
prepare images for the model.</li> <li><a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher">LevitForImageClassificationWithTeacher</a> currently supports only inference and not training or fine-tuning.</li> <li>You can check out demo notebooks regarding inference as well as fine-tuning on custom data <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/VisionTransformer" rel="nofollow">here</a>
(you can just replace <a href="/docs/transformers/main/en/model_doc/vit#transformers.ViTFeatureExtractor">ViTFeatureExtractor</a> by <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitImageProcessor">LevitImageProcessor</a> and <a href="/docs/transformers/main/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</a> by <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitForImageClassification">LevitForImageClassification</a> or <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher">LevitForImageClassificationWithTeacher</a>).</li>`,st,ce,rt,de,io="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with LeViT.",it,me,lt,pe,lo='<li><a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitForImageClassification">LevitForImageClassification</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>',ct,fe,co="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.",dt,he,mt,C,ge,xt,Ze,mo=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitModel">LevitModel</a>. It is used to instantiate a LeViT
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 LeViT
<a href="https://huggingface.co/facebook/levit-128S" rel="nofollow">facebook/levit-128S</a> architecture.`,It,Ve,po=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,jt,G,pt,ue,ft,P,ve,zt,B,_e,Ft,Pe,fo="Preprocess an image or a batch of images.",ht,be,gt,U,ye,Ut,Ne,ho="Constructs a LeViT image processor.",Wt,S,Te,Jt,Re,go="Preprocess an image or batch of images to be used as input to a LeViT model.",ut,we,vt,W,$e,kt,Ee,uo=`The bare Levit model outputting raw features 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.`,Zt,j,Me,Vt,Ge,vo='The <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitModel">LevitModel</a> forward method, overrides the <code>__call__</code> special method.',Pt,H,Nt,X,_t,Ce,bt,L,Le,Rt,Be,_o=`Levit Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,Et,Se,bo=`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.`,Gt,z,xe,Bt,He,yo='The <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitForImageClassification">LevitForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',St,q,Ht,Q,yt,Ie,Tt,x,je,Xt,Xe,To=`LeViT Model transformer with image classification heads on top (a linear layer on top of the final hidden state and
a linear layer on top of the final hidden state of the distillation token) e.g. for ImageNet. .. warning::
This model supports inference-only. Fine-tuning with distillation (i.e. with a teacher) is not yet
supported.`,qt,qe,wo=`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.`,Qt,F,ze,Yt,Qe,$o='The <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher">LevitForImageClassificationWithTeacher</a> forward method, overrides the <code>__call__</code> special method.',Dt,Y,At,D,wt,Fe,$t,Ye,Mt;return y=new V({props:{title:"LeViT",local:"levit",headingTag:"h1"}}),te=new V({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ie=new V({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),ce=new V({props:{title:"Resources",local:"resources",headingTag:"h2"}}),me=new zo({props:{pipeline:"image-classification"}}),he=new V({props:{title:"LevitConfig",local:"transformers.LevitConfig",headingTag:"h2"}}),ge=new Z({props:{name:"class transformers.LevitConfig",anchor:"transformers.LevitConfig",parameters:[{name:"image_size",val:" = 224"},{name:"num_channels",val:" = 3"},{name:"kernel_size",val:" = 3"},{name:"stride",val:" = 2"},{name:"padding",val:" = 1"},{name:"patch_size",val:" = 16"},{name:"hidden_sizes",val:" = [128, 256, 384]"},{name:"num_attention_heads",val:" = [4, 8, 12]"},{name:"depths",val:" = [4, 4, 4]"},{name:"key_dim",val:" = [16, 16, 16]"},{name:"drop_path_rate",val:" = 0"},{name:"mlp_ratio",val:" = [2, 2, 2]"},{name:"attention_ratio",val:" = [2, 2, 2]"},{name:"initializer_range",val:" = 0.02"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LevitConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size of the input image.`,name:"image_size"},{anchor:"transformers.LevitConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of channels in the input image.`,name:"num_channels"},{anchor:"transformers.LevitConfig.kernel_size",description:`<strong>kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The kernel size for the initial convolution layers of patch embedding.`,name:"kernel_size"},{anchor:"transformers.LevitConfig.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The stride size for the initial convolution layers of patch embedding.`,name:"stride"},{anchor:"transformers.LevitConfig.padding",description:`<strong>padding</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The padding size for the initial convolution layers of patch embedding.`,name:"padding"},{anchor:"transformers.LevitConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The patch size for embeddings.`,name:"patch_size"},{anchor:"transformers.LevitConfig.hidden_sizes",description:`<strong>hidden_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[128, 256, 384]</code>) &#x2014;
Dimension of each of the encoder blocks.`,name:"hidden_sizes"},{anchor:"transformers.LevitConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 8, 12]</code>) &#x2014;
Number of attention heads for each attention layer in each block of the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.LevitConfig.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 4, 4]</code>) &#x2014;
The number of layers in each encoder block.`,name:"depths"},{anchor:"transformers.LevitConfig.key_dim",description:`<strong>key_dim</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[16, 16, 16]</code>) &#x2014;
The size of key in each of the encoder blocks.`,name:"key_dim"},{anchor:"transformers.LevitConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The dropout probability for stochastic depths, used in the blocks of the Transformer encoder.`,name:"drop_path_rate"},{anchor:"transformers.LevitConfig.mlp_ratios",description:`<strong>mlp_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 2, 2]</code>) &#x2014;
Ratio of the size of the hidden layer compared to the size of the input layer of the Mix FFNs in the
encoder blocks.`,name:"mlp_ratios"},{anchor:"transformers.LevitConfig.attention_ratios",description:`<strong>attention_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 2, 2]</code>) &#x2014;
Ratio of the size of the output dimension compared to input dimension of attention layers.`,name:"attention_ratios"},{anchor:"transformers.LevitConfig.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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/levit/configuration_levit.py#L30"}}),G=new Ct({props:{anchor:"transformers.LevitConfig.example",$$slots:{default:[Uo]},$$scope:{ctx:M}}}),ue=new V({props:{title:"LevitFeatureExtractor",local:"transformers.LevitFeatureExtractor",headingTag:"h2"}}),ve=new Z({props:{name:"class transformers.LevitFeatureExtractor",anchor:"transformers.LevitFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/levit/feature_extraction_levit.py#L26"}}),_e=new Z({props:{name:"__call__",anchor:"transformers.LevitFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils.py#L40"}}),be=new V({props:{title:"LevitImageProcessor",local:"transformers.LevitImageProcessor",headingTag:"h2"}}),ye=new Z({props:{name:"class transformers.LevitImageProcessor",anchor:"transformers.LevitImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.Iterable[float], NoneType] = [0.485, 0.456, 0.406]"},{name:"image_std",val:": typing.Union[float, typing.Iterable[float], NoneType] = [0.229, 0.224, 0.225]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LevitImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Wwhether to resize the shortest edge of the input to int(256/224 *<code>size</code>). Can be overridden by the
<code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.LevitImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 224}</code>):
Size of the output image after resizing. If size is a dict with keys &#x201C;width&#x201D; and &#x201C;height&#x201D;, the image will
be resized to <code>(size[&quot;height&quot;], size[&quot;width&quot;])</code>. If size is a dict with key &#x201C;shortest_edge&#x201D;, the shortest
edge value <code>c</code> is rescaled to <code>int(c * (256/224))</code>. The smaller edge of the image will be matched to this
value i.e, if height &gt; width, then image will be rescaled to <code>(size[&quot;shortest_egde&quot;] * height / width, size[&quot;shortest_egde&quot;])</code>. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code> method.`,name:"size"},{anchor:"transformers.LevitImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>Resampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by the <code>resample</code> parameter in the
<code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.LevitImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to center crop the input to <code>(crop_size[&quot;height&quot;], crop_size[&quot;width&quot;])</code>. Can be overridden
by the <code>do_center_crop</code> parameter in the <code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.LevitImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Desired image size after <code>center_crop</code>. Can be overridden by the <code>crop_size</code> parameter in the <code>preprocess</code>
method.`,name:"crop_size"},{anchor:"transformers.LevitImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Controls 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.LevitImageProcessor.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.LevitImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Controls whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the
<code>preprocess</code> method.`,name:"do_normalize"},{anchor:"transformers.LevitImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0.485, 0.456, 0.406]</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.LevitImageProcessor.image_std",description:`<strong>image_std</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0.229, 0.224, 0.225]</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/levit/image_processing_levit.py#L46"}}),Te=new Z({props:{name:"preprocess",anchor:"transformers.LevitImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), list['PIL.Image.Image'], list[numpy.ndarray], list['torch.Tensor']]"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Optional[typing.Dict[str, int]] = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": typing.Optional[bool] = None"},{name:"crop_size",val:": typing.Optional[typing.Dict[str, int]] = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.Iterable[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.Iterable[float], NoneType] = None"},{name:"return_tensors",val:": typing.Optional[transformers.utils.generic.TensorType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"}],parametersDescription:[{anchor:"transformers.LevitImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image or batch of images 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.LevitImageProcessor.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.LevitImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the output image after resizing. If size is a dict with keys &#x201C;width&#x201D; and &#x201C;height&#x201D;, the image
will be resized to (height, width). If size is a dict with key &#x201C;shortest_edge&#x201D;, the shortest edge value
<code>c</code> is rescaled to int(<code>c</code> <em> (256/224)). The smaller edge of the image will be matched to this value
i.e, if height &gt; width, then image will be rescaled to (size </em> height / width, size).`,name:"size"},{anchor:"transformers.LevitImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BICUBIC</code>) &#x2014;
Resampling filter to use when resiizing the image.`,name:"resample"},{anchor:"transformers.LevitImageProcessor.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.LevitImageProcessor.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 output image after center cropping. Crops images to (crop_size[&#x201C;height&#x201D;],
crop_size[&#x201C;width&#x201D;]).`,name:"crop_size"},{anchor:"transformers.LevitImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image pixel values by <code>rescaling_factor</code> - typical to values between 0 and 1.`,name:"do_rescale"},{anchor:"transformers.LevitImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Factor to rescale the image pixel values by.`,name:"rescale_factor"},{anchor:"transformers.LevitImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image pixel values by <code>image_mean</code> and <code>image_std</code>.`,name:"do_normalize"},{anchor:"transformers.LevitImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Mean to normalize the image pixel values by.`,name:"image_mean"},{anchor:"transformers.LevitImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Standard deviation to normalize the image pixel values by.`,name:"image_std"},{anchor:"transformers.LevitImageProcessor.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.LevitImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. If unset, the channel dimension format of the input
image is used. 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>
</ul>`,name:"data_format"},{anchor:"transformers.LevitImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/levit/image_processing_levit.py#L174"}}),we=new V({props:{title:"LevitModel",local:"transformers.LevitModel",headingTag:"h2"}}),$e=new Z({props:{name:"class transformers.LevitModel",anchor:"transformers.LevitModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.LevitModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitConfig">LevitConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/levit/modeling_levit.py#L531"}}),Me=new Z({props:{name:"forward",anchor:"transformers.LevitModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.LevitModel.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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/vilt#transformers.ViltFeatureExtractor.__call__">LevitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.LevitModel.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.LevitModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/levit/modeling_levit.py#L544",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/main/en/model_doc/levit#transformers.LevitConfig"
>LevitConfig</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>
`}}),H=new Ot({props:{$$slots:{default:[Wo]},$$scope:{ctx:M}}}),X=new Ct({props:{anchor:"transformers.LevitModel.forward.example",$$slots:{default:[Jo]},$$scope:{ctx:M}}}),Ce=new V({props:{title:"LevitForImageClassification",local:"transformers.LevitForImageClassification",headingTag:"h2"}}),Le=new Z({props:{name:"class transformers.LevitForImageClassification",anchor:"transformers.LevitForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.LevitForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitConfig">LevitConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/levit/modeling_levit.py#L588"}}),xe=new Z({props:{name:"forward",anchor:"transformers.LevitForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.LevitForImageClassification.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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/vilt#transformers.ViltFeatureExtractor.__call__">LevitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.LevitForImageClassification.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.LevitForImageClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.LevitForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/levit/modeling_levit.py#L612",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/levit#transformers.LevitConfig"
>LevitConfig</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/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),q=new Ot({props:{$$slots:{default:[ko]},$$scope:{ctx:M}}}),Q=new Ct({props:{anchor:"transformers.LevitForImageClassification.forward.example",$$slots:{default:[Zo]},$$scope:{ctx:M}}}),Ie=new V({props:{title:"LevitForImageClassificationWithTeacher",local:"transformers.LevitForImageClassificationWithTeacher",headingTag:"h2"}}),je=new Z({props:{name:"class transformers.LevitForImageClassificationWithTeacher",anchor:"transformers.LevitForImageClassificationWithTeacher",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.LevitForImageClassificationWithTeacher.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitConfig">LevitConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/levit/modeling_levit.py#L673"}}),ze=new Z({props:{name:"forward",anchor:"transformers.LevitForImageClassificationWithTeacher.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.LevitForImageClassificationWithTeacher.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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/vilt#transformers.ViltFeatureExtractor.__call__">LevitImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.LevitForImageClassificationWithTeacher.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.LevitForImageClassificationWithTeacher.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/levit/modeling_levit.py#L704",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.levit.modeling_levit.LevitForImageClassificationWithTeacherOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/levit#transformers.LevitConfig"
>LevitConfig</a>) and inputs.</p>
<ul>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Prediction scores as the average of the <code>cls_logits</code> and <code>distillation_logits</code>.</li>
<li><strong>cls_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Prediction scores of the classification head (i.e. the linear layer on top of the final hidden state of the
class token).</li>
<li><strong>distillation_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Prediction scores of the distillation head (i.e. the linear layer on top of the final hidden state of the
distillation token).</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 + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer
plus the initial embedding outputs.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.levit.modeling_levit.LevitForImageClassificationWithTeacherOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Y=new Ot({props:{$$slots:{default:[Vo]},$$scope:{ctx:M}}}),D=new Ct({props:{anchor:"transformers.LevitForImageClassificationWithTeacher.forward.example",$$slots:{default:[Po]},$$scope:{ctx:M}}}),Fe=new Fo({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/levit.md"}}),{c(){a=l("meta"),T=r(),m=l("p"),p=r(),f(y.$$.fragment),n=r(),w=l("div"),w.innerHTML=Kt,De=r(),f(te.$$.fragment),Ae=r(),oe=l("p"),oe.innerHTML=eo,Oe=r(),ae=l("p"),ae.textContent=to,Ke=r(),ne=l("p"),ne.innerHTML=oo,et=r(),E=l("img"),tt=r(),se=l("small"),se.innerHTML=no,ot=r(),re=l("p"),re.innerHTML=so,at=r(),f(ie.$$.fragment),nt=r(),le=l("ul"),le.innerHTML=ro,st=r(),f(ce.$$.fragment),rt=r(),de=l("p"),de.textContent=io,it=r(),f(me.$$.fragment),lt=r(),pe=l("ul"),pe.innerHTML=lo,ct=r(),fe=l("p"),fe.textContent=co,dt=r(),f(he.$$.fragment),mt=r(),C=l("div"),f(ge.$$.fragment),xt=r(),Ze=l("p"),Ze.innerHTML=mo,It=r(),Ve=l("p"),Ve.innerHTML=po,jt=r(),f(G.$$.fragment),pt=r(),f(ue.$$.fragment),ft=r(),P=l("div"),f(ve.$$.fragment),zt=r(),B=l("div"),f(_e.$$.fragment),Ft=r(),Pe=l("p"),Pe.textContent=fo,ht=r(),f(be.$$.fragment),gt=r(),U=l("div"),f(ye.$$.fragment),Ut=r(),Ne=l("p"),Ne.textContent=ho,Wt=r(),S=l("div"),f(Te.$$.fragment),Jt=r(),Re=l("p"),Re.textContent=go,ut=r(),f(we.$$.fragment),vt=r(),W=l("div"),f($e.$$.fragment),kt=r(),Ee=l("p"),Ee.innerHTML=uo,Zt=r(),j=l("div"),f(Me.$$.fragment),Vt=r(),Ge=l("p"),Ge.innerHTML=vo,Pt=r(),f(H.$$.fragment),Nt=r(),f(X.$$.fragment),_t=r(),f(Ce.$$.fragment),bt=r(),L=l("div"),f(Le.$$.fragment),Rt=r(),Be=l("p"),Be.textContent=_o,Et=r(),Se=l("p"),Se.innerHTML=bo,Gt=r(),z=l("div"),f(xe.$$.fragment),Bt=r(),He=l("p"),He.innerHTML=yo,St=r(),f(q.$$.fragment),Ht=r(),f(Q.$$.fragment),yt=r(),f(Ie.$$.fragment),Tt=r(),x=l("div"),f(je.$$.fragment),Xt=r(),Xe=l("p"),Xe.textContent=To,qt=r(),qe=l("p"),qe.innerHTML=wo,Qt=r(),F=l("div"),f(ze.$$.fragment),Yt=r(),Qe=l("p"),Qe.innerHTML=$o,Dt=r(),f(Y.$$.fragment),At=r(),f(D.$$.fragment),wt=r(),f(Fe.$$.fragment),$t=r(),Ye=l("p"),this.h()},l(e){const t=jo("svelte-u9bgzb",document.head);a=c(t,"META",{name:!0,content:!0}),t.forEach(o),T=i(e),m=c(e,"P",{}),I(m).forEach(o),p=i(e),h(y.$$.fragment,e),n=i(e),w=c(e,"DIV",{class:!0,"data-svelte-h":!0}),b(w)!=="svelte-13t8s2t"&&(w.innerHTML=Kt),De=i(e),h(te.$$.fragment,e),Ae=i(e),oe=c(e,"P",{"data-svelte-h":!0}),b(oe)!=="svelte-1e0lmax"&&(oe.innerHTML=eo),Oe=i(e),ae=c(e,"P",{"data-svelte-h":!0}),b(ae)!=="svelte-vfdo9a"&&(ae.textContent=to),Ke=i(e),ne=c(e,"P",{"data-svelte-h":!0}),b(ne)!=="svelte-15x7iq1"&&(ne.innerHTML=oo),et=i(e),E=c(e,"IMG",{src:!0,alt:!0,width:!0}),tt=i(e),se=c(e,"SMALL",{"data-svelte-h":!0}),b(se)!=="svelte-cyksn2"&&(se.innerHTML=no),ot=i(e),re=c(e,"P",{"data-svelte-h":!0}),b(re)!=="svelte-1usurb6"&&(re.innerHTML=so),at=i(e),h(ie.$$.fragment,e),nt=i(e),le=c(e,"UL",{"data-svelte-h":!0}),b(le)!=="svelte-onwgjs"&&(le.innerHTML=ro),st=i(e),h(ce.$$.fragment,e),rt=i(e),de=c(e,"P",{"data-svelte-h":!0}),b(de)!=="svelte-nre2ah"&&(de.textContent=io),it=i(e),h(me.$$.fragment,e),lt=i(e),pe=c(e,"UL",{"data-svelte-h":!0}),b(pe)!=="svelte-pjejf9"&&(pe.innerHTML=lo),ct=i(e),fe=c(e,"P",{"data-svelte-h":!0}),b(fe)!=="svelte-1xesile"&&(fe.textContent=co),dt=i(e),h(he.$$.fragment,e),mt=i(e),C=c(e,"DIV",{class:!0});var J=I(C);h(ge.$$.fragment,J),xt=i(J),Ze=c(J,"P",{"data-svelte-h":!0}),b(Ze)!=="svelte-r7sfun"&&(Ze.innerHTML=mo),It=i(J),Ve=c(J,"P",{"data-svelte-h":!0}),b(Ve)!=="svelte-o55m63"&&(Ve.innerHTML=po),jt=i(J),h(G.$$.fragment,J),J.forEach(o),pt=i(e),h(ue.$$.fragment,e),ft=i(e),P=c(e,"DIV",{class:!0});var Ue=I(P);h(ve.$$.fragment,Ue),zt=i(Ue),B=c(Ue,"DIV",{class:!0});var We=I(B);h(_e.$$.fragment,We),Ft=i(We),Pe=c(We,"P",{"data-svelte-h":!0}),b(Pe)!=="svelte-khengj"&&(Pe.textContent=fo),We.forEach(o),Ue.forEach(o),ht=i(e),h(be.$$.fragment,e),gt=i(e),U=c(e,"DIV",{class:!0});var N=I(U);h(ye.$$.fragment,N),Ut=i(N),Ne=c(N,"P",{"data-svelte-h":!0}),b(Ne)!=="svelte-1qfdf74"&&(Ne.textContent=ho),Wt=i(N),S=c(N,"DIV",{class:!0});var Je=I(S);h(Te.$$.fragment,Je),Jt=i(Je),Re=c(Je,"P",{"data-svelte-h":!0}),b(Re)!=="svelte-1rdzd3o"&&(Re.textContent=go),Je.forEach(o),N.forEach(o),ut=i(e),h(we.$$.fragment,e),vt=i(e),W=c(e,"DIV",{class:!0});var R=I(W);h($e.$$.fragment,R),kt=i(R),Ee=c(R,"P",{"data-svelte-h":!0}),b(Ee)!=="svelte-f0023m"&&(Ee.innerHTML=uo),Zt=i(R),j=c(R,"DIV",{class:!0});var k=I(j);h(Me.$$.fragment,k),Vt=i(k),Ge=c(k,"P",{"data-svelte-h":!0}),b(Ge)!=="svelte-1y1i8qb"&&(Ge.innerHTML=vo),Pt=i(k),h(H.$$.fragment,k),Nt=i(k),h(X.$$.fragment,k),k.forEach(o),R.forEach(o),_t=i(e),h(Ce.$$.fragment,e),bt=i(e),L=c(e,"DIV",{class:!0});var A=I(L);h(Le.$$.fragment,A),Rt=i(A),Be=c(A,"P",{"data-svelte-h":!0}),b(Be)!=="svelte-17kpmci"&&(Be.textContent=_o),Et=i(A),Se=c(A,"P",{"data-svelte-h":!0}),b(Se)!=="svelte-1gjh92c"&&(Se.innerHTML=bo),Gt=i(A),z=c(A,"DIV",{class:!0});var O=I(z);h(xe.$$.fragment,O),Bt=i(O),He=c(O,"P",{"data-svelte-h":!0}),b(He)!=="svelte-k8kzwl"&&(He.innerHTML=yo),St=i(O),h(q.$$.fragment,O),Ht=i(O),h(Q.$$.fragment,O),O.forEach(o),A.forEach(o),yt=i(e),h(Ie.$$.fragment,e),Tt=i(e),x=c(e,"DIV",{class:!0});var K=I(x);h(je.$$.fragment,K),Xt=i(K),Xe=c(K,"P",{"data-svelte-h":!0}),b(Xe)!=="svelte-1xxb4nq"&&(Xe.textContent=To),qt=i(K),qe=c(K,"P",{"data-svelte-h":!0}),b(qe)!=="svelte-1gjh92c"&&(qe.innerHTML=wo),Qt=i(K),F=c(K,"DIV",{class:!0});var ee=I(F);h(ze.$$.fragment,ee),Yt=i(ee),Qe=c(ee,"P",{"data-svelte-h":!0}),b(Qe)!=="svelte-f5xuyt"&&(Qe.innerHTML=$o),Dt=i(ee),h(Y.$$.fragment,ee),At=i(ee),h(D.$$.fragment,ee),ee.forEach(o),K.forEach(o),wt=i(e),h(Fe.$$.fragment,e),$t=i(e),Ye=c(e,"P",{}),I(Ye).forEach(o),this.h()},h(){$(a,"name","hf:doc:metadata"),$(a,"content",Ro),$(w,"class","flex flex-wrap space-x-1"),Co(E.src,ao="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/levit_architecture.png")||$(E,"src",ao),$(E,"alt","drawing"),$(E,"width","600"),$(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){d(document.head,a),s(e,T,t),s(e,m,t),s(e,p,t),g(y,e,t),s(e,n,t),s(e,w,t),s(e,De,t),g(te,e,t),s(e,Ae,t),s(e,oe,t),s(e,Oe,t),s(e,ae,t),s(e,Ke,t),s(e,ne,t),s(e,et,t),s(e,E,t),s(e,tt,t),s(e,se,t),s(e,ot,t),s(e,re,t),s(e,at,t),g(ie,e,t),s(e,nt,t),s(e,le,t),s(e,st,t),g(ce,e,t),s(e,rt,t),s(e,de,t),s(e,it,t),g(me,e,t),s(e,lt,t),s(e,pe,t),s(e,ct,t),s(e,fe,t),s(e,dt,t),g(he,e,t),s(e,mt,t),s(e,C,t),g(ge,C,null),d(C,xt),d(C,Ze),d(C,It),d(C,Ve),d(C,jt),g(G,C,null),s(e,pt,t),g(ue,e,t),s(e,ft,t),s(e,P,t),g(ve,P,null),d(P,zt),d(P,B),g(_e,B,null),d(B,Ft),d(B,Pe),s(e,ht,t),g(be,e,t),s(e,gt,t),s(e,U,t),g(ye,U,null),d(U,Ut),d(U,Ne),d(U,Wt),d(U,S),g(Te,S,null),d(S,Jt),d(S,Re),s(e,ut,t),g(we,e,t),s(e,vt,t),s(e,W,t),g($e,W,null),d(W,kt),d(W,Ee),d(W,Zt),d(W,j),g(Me,j,null),d(j,Vt),d(j,Ge),d(j,Pt),g(H,j,null),d(j,Nt),g(X,j,null),s(e,_t,t),g(Ce,e,t),s(e,bt,t),s(e,L,t),g(Le,L,null),d(L,Rt),d(L,Be),d(L,Et),d(L,Se),d(L,Gt),d(L,z),g(xe,z,null),d(z,Bt),d(z,He),d(z,St),g(q,z,null),d(z,Ht),g(Q,z,null),s(e,yt,t),g(Ie,e,t),s(e,Tt,t),s(e,x,t),g(je,x,null),d(x,Xt),d(x,Xe),d(x,qt),d(x,qe),d(x,Qt),d(x,F),g(ze,F,null),d(F,Yt),d(F,Qe),d(F,Dt),g(Y,F,null),d(F,At),g(D,F,null),s(e,wt,t),g(Fe,e,t),s(e,$t,t),s(e,Ye,t),Mt=!0},p(e,[t]){const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),G.$set(J);const Ue={};t&2&&(Ue.$$scope={dirty:t,ctx:e}),H.$set(Ue);const We={};t&2&&(We.$$scope={dirty:t,ctx:e}),X.$set(We);const N={};t&2&&(N.$$scope={dirty:t,ctx:e}),q.$set(N);const Je={};t&2&&(Je.$$scope={dirty:t,ctx:e}),Q.$set(Je);const R={};t&2&&(R.$$scope={dirty:t,ctx:e}),Y.$set(R);const k={};t&2&&(k.$$scope={dirty:t,ctx:e}),D.$set(k)},i(e){Mt||(u(y.$$.fragment,e),u(te.$$.fragment,e),u(ie.$$.fragment,e),u(ce.$$.fragment,e),u(me.$$.fragment,e),u(he.$$.fragment,e),u(ge.$$.fragment,e),u(G.$$.fragment,e),u(ue.$$.fragment,e),u(ve.$$.fragment,e),u(_e.$$.fragment,e),u(be.$$.fragment,e),u(ye.$$.fragment,e),u(Te.$$.fragment,e),u(we.$$.fragment,e),u($e.$$.fragment,e),u(Me.$$.fragment,e),u(H.$$.fragment,e),u(X.$$.fragment,e),u(Ce.$$.fragment,e),u(Le.$$.fragment,e),u(xe.$$.fragment,e),u(q.$$.fragment,e),u(Q.$$.fragment,e),u(Ie.$$.fragment,e),u(je.$$.fragment,e),u(ze.$$.fragment,e),u(Y.$$.fragment,e),u(D.$$.fragment,e),u(Fe.$$.fragment,e),Mt=!0)},o(e){v(y.$$.fragment,e),v(te.$$.fragment,e),v(ie.$$.fragment,e),v(ce.$$.fragment,e),v(me.$$.fragment,e),v(he.$$.fragment,e),v(ge.$$.fragment,e),v(G.$$.fragment,e),v(ue.$$.fragment,e),v(ve.$$.fragment,e),v(_e.$$.fragment,e),v(be.$$.fragment,e),v(ye.$$.fragment,e),v(Te.$$.fragment,e),v(we.$$.fragment,e),v($e.$$.fragment,e),v(Me.$$.fragment,e),v(H.$$.fragment,e),v(X.$$.fragment,e),v(Ce.$$.fragment,e),v(Le.$$.fragment,e),v(xe.$$.fragment,e),v(q.$$.fragment,e),v(Q.$$.fragment,e),v(Ie.$$.fragment,e),v(je.$$.fragment,e),v(ze.$$.fragment,e),v(Y.$$.fragment,e),v(D.$$.fragment,e),v(Fe.$$.fragment,e),Mt=!1},d(e){e&&(o(T),o(m),o(p),o(n),o(w),o(De),o(Ae),o(oe),o(Oe),o(ae),o(Ke),o(ne),o(et),o(E),o(tt),o(se),o(ot),o(re),o(at),o(nt),o(le),o(st),o(rt),o(de),o(it),o(lt),o(pe),o(ct),o(fe),o(dt),o(mt),o(C),o(pt),o(ft),o(P),o(ht),o(gt),o(U),o(ut),o(vt),o(W),o(_t),o(bt),o(L),o(yt),o(Tt),o(x),o(wt),o($t),o(Ye)),o(a),_(y,e),_(te,e),_(ie,e),_(ce,e),_(me,e),_(he,e),_(ge),_(G),_(ue,e),_(ve),_(_e),_(be,e),_(ye),_(Te),_(we,e),_($e),_(Me),_(H),_(X),_(Ce,e),_(Le),_(xe),_(q),_(Q),_(Ie,e),_(je),_(ze),_(Y),_(D),_(Fe,e)}}}const Ro='{"title":"LeViT","local":"levit","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":"LevitConfig","local":"transformers.LevitConfig","sections":[],"depth":2},{"title":"LevitFeatureExtractor","local":"transformers.LevitFeatureExtractor","sections":[],"depth":2},{"title":"LevitImageProcessor","local":"transformers.LevitImageProcessor","sections":[],"depth":2},{"title":"LevitModel","local":"transformers.LevitModel","sections":[],"depth":2},{"title":"LevitForImageClassification","local":"transformers.LevitForImageClassification","sections":[],"depth":2},{"title":"LevitForImageClassificationWithTeacher","local":"transformers.LevitForImageClassificationWithTeacher","sections":[],"depth":2}],"depth":1}';function Eo(M){return Lo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Do extends xo{constructor(a){super(),Io(this,a,Eo,No,Mo,{})}}export{Do as component};
