import{s as bo,f as yo,o as To,n as We}from"../chunks/scheduler.9bc65507.js";import{S as wo,i as $o,g as c,s,r as f,A as Mo,h as d,f as o,c as r,j as x,u as h,x as b,k as M,y as l,a as i,v as g,d as u,t as v,w as _}from"../chunks/index.707bf1b6.js";import{T as Qt}from"../chunks/Tip.c2ecdbf4.js";import{D as Z}from"../chunks/Docstring.17db21ae.js";import{C as wt}from"../chunks/CodeBlock.54a9f38d.js";import{E as Tt}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{P as Co}from"../chunks/PipelineTag.44585822.js";import{H as V}from"../chunks/Heading.342b1fa6.js";function Lo($){let a,T="Example:",m,p,y;return p=new wt({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=c("p"),a.textContent=T,m=s(),f(p.$$.fragment)},l(n){a=d(n,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=r(n),h(p.$$.fragment,n)},m(n,w){i(n,a,w),i(n,m,w),g(p,n,w),y=!0},p:We,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 Io($){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=c("p"),a.innerHTML=T},l(m){a=d(m,"P",{"data-svelte-h":!0}),b(a)!=="svelte-fincs2"&&(a.innerHTML=T)},m(m,p){i(m,a,p)},p:We,d(m){m&&o(a)}}}function xo($){let a,T="Example:",m,p,y;return p=new wt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMExldml0TW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbGV2aXQtMTI4UyUyMiklMEFtb2RlbCUyMCUzRCUyMExldml0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGbGV2aXQtMTI4UyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",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>)
<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=c("p"),a.textContent=T,m=s(),f(p.$$.fragment)},l(n){a=d(n,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=r(n),h(p.$$.fragment,n)},m(n,w){i(n,a,w),i(n,m,w),g(p,n,w),y=!0},p:We,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 jo($){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=c("p"),a.innerHTML=T},l(m){a=d(m,"P",{"data-svelte-h":!0}),b(a)!=="svelte-fincs2"&&(a.innerHTML=T)},m(m,p){i(m,a,p)},p:We,d(m){m&&o(a)}}}function Fo($){let a,T="Example:",m,p,y;return p=new wt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMExldml0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZsZXZpdC0xMjhTJTIyKSUwQW1vZGVsJTIwJTNEJTIwTGV2aXRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmxldml0LTEyOFMlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",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>)
<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=c("p"),a.textContent=T,m=s(),f(p.$$.fragment)},l(n){a=d(n,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=r(n),h(p.$$.fragment,n)},m(n,w){i(n,a,w),i(n,m,w),g(p,n,w),y=!0},p:We,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 zo($){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=c("p"),a.innerHTML=T},l(m){a=d(m,"P",{"data-svelte-h":!0}),b(a)!=="svelte-fincs2"&&(a.innerHTML=T)},m(m,p){i(m,a,p)},p:We,d(m){m&&o(a)}}}function Uo($){let a,T="Example:",m,p,y;return p=new wt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMExldml0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbldpdGhUZWFjaGVyJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmxldml0LTEyOFMlMjIpJTBBbW9kZWwlMjAlM0QlMjBMZXZpdEZvckltYWdlQ2xhc3NpZmljYXRpb25XaXRoVGVhY2hlci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZsZXZpdC0xMjhTJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",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>)
<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=c("p"),a.textContent=T,m=s(),f(p.$$.fragment)},l(n){a=d(n,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=r(n),h(p.$$.fragment,n)},m(n,w){i(n,a,w),i(n,m,w),g(p,n,w),y=!0},p:We,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($){let a,T,m,p,y,n,w,Qe,te,Yt='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.',Ye,oe,Dt="The abstract from the paper is the following:",De,ae,At=`<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>`,Ae,E,Ot,Oe,ne,Kt='LeViT Architecture. Taken from the <a href="https://arxiv.org/abs/2104.01136">original paper</a>.',Ke,se,eo='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>.',et,re,tt,ie,to=`<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>`,ot,le,at,ce,oo="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with LeViT.",nt,de,st,me,ao='<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>',rt,pe,no="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.",it,fe,lt,C,he,$t,Je,so=`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.`,Mt,ke,ro=`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.`,Ct,G,ct,ge,dt,N,ue,Lt,B,ve,It,Ze,io="Preprocess an image or a batch of images.",mt,_e,pt,U,be,xt,Ve,lo="Constructs a LeViT image processor.",jt,S,ye,Ft,Ne,co="Preprocess an image or batch of images to be used as input to a LeViT model.",ft,Te,ht,W,we,zt,Pe,mo=`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.`,Ut,j,$e,Wt,Re,po='The <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitModel">LevitModel</a> forward method, overrides the <code>__call__</code> special method.',Jt,H,kt,q,gt,Me,ut,L,Ce,Zt,Ee,fo=`Levit Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,Vt,Ge,ho=`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.`,Nt,F,Le,Pt,Be,go='The <a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitForImageClassification">LevitForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Rt,X,Et,Q,vt,Ie,_t,I,xe,Gt,Se,uo=`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.`,Bt,He,vo=`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.`,St,z,je,Ht,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.',qt,Y,Xt,D,bt,Xe,yt;return y=new V({props:{title:"LeViT",local:"levit",headingTag:"h1"}}),w=new V({props:{title:"Overview",local:"overview",headingTag:"h2"}}),re=new V({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),le=new V({props:{title:"Resources",local:"resources",headingTag:"h2"}}),de=new Co({props:{pipeline:"image-classification"}}),fe=new V({props:{title:"LevitConfig",local:"transformers.LevitConfig",headingTag:"h2"}}),he=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#L35"}}),G=new Tt({props:{anchor:"transformers.LevitConfig.example",$$slots:{default:[Lo]},$$scope:{ctx:$}}}),ge=new V({props:{title:"LevitFeatureExtractor",local:"transformers.LevitFeatureExtractor",headingTag:"h2"}}),ue=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"}}),ve=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#L550"}}),_e=new V({props:{title:"LevitImageProcessor",local:"transformers.LevitImageProcessor",headingTag:"h2"}}),be=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#L45"}}),ye=new Z({props:{name:"preprocess",anchor:"transformers.LevitImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": typing.Optional[bool] = None"},{name:"crop_size",val:": typing.Union[typing.Dict[str, int], NoneType] = 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"},{name:"**kwargs",val:""}],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#L173"}}),Te=new V({props:{title:"LevitModel",local:"transformers.LevitModel",headingTag:"h2"}}),we=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#L539"}}),$e=new Z({props:{name:"forward",anchor:"transformers.LevitModel.forward",parameters:[{name:"pixel_values",val:": 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#L548",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 Qt({props:{$$slots:{default:[Io]},$$scope:{ctx:$}}}),q=new Tt({props:{anchor:"transformers.LevitModel.forward.example",$$slots:{default:[xo]},$$scope:{ctx:$}}}),Me=new V({props:{title:"LevitForImageClassification",local:"transformers.LevitForImageClassification",headingTag:"h2"}}),Ce=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#L599"}}),Le=new Z({props:{name:"forward",anchor:"transformers.LevitForImageClassification.forward",parameters:[{name:"pixel_values",val:": 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#L616",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>
`}}),X=new Qt({props:{$$slots:{default:[jo]},$$scope:{ctx:$}}}),Q=new Tt({props:{anchor:"transformers.LevitForImageClassification.forward.example",$$slots:{default:[Fo]},$$scope:{ctx:$}}}),Ie=new V({props:{title:"LevitForImageClassificationWithTeacher",local:"transformers.LevitForImageClassificationWithTeacher",headingTag:"h2"}}),xe=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#L686"}}),je=new Z({props:{name:"forward",anchor:"transformers.LevitForImageClassificationWithTeacher.forward",parameters:[{name:"pixel_values",val:": 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#L708",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 Qt({props:{$$slots:{default:[zo]},$$scope:{ctx:$}}}),D=new Tt({props:{anchor:"transformers.LevitForImageClassificationWithTeacher.forward.example",$$slots:{default:[Uo]},$$scope:{ctx:$}}}),{c(){a=c("meta"),T=s(),m=c("p"),p=s(),f(y.$$.fragment),n=s(),f(w.$$.fragment),Qe=s(),te=c("p"),te.innerHTML=Yt,Ye=s(),oe=c("p"),oe.textContent=Dt,De=s(),ae=c("p"),ae.innerHTML=At,Ae=s(),E=c("img"),Oe=s(),ne=c("small"),ne.innerHTML=Kt,Ke=s(),se=c("p"),se.innerHTML=eo,et=s(),f(re.$$.fragment),tt=s(),ie=c("ul"),ie.innerHTML=to,ot=s(),f(le.$$.fragment),at=s(),ce=c("p"),ce.textContent=oo,nt=s(),f(de.$$.fragment),st=s(),me=c("ul"),me.innerHTML=ao,rt=s(),pe=c("p"),pe.textContent=no,it=s(),f(fe.$$.fragment),lt=s(),C=c("div"),f(he.$$.fragment),$t=s(),Je=c("p"),Je.innerHTML=so,Mt=s(),ke=c("p"),ke.innerHTML=ro,Ct=s(),f(G.$$.fragment),ct=s(),f(ge.$$.fragment),dt=s(),N=c("div"),f(ue.$$.fragment),Lt=s(),B=c("div"),f(ve.$$.fragment),It=s(),Ze=c("p"),Ze.textContent=io,mt=s(),f(_e.$$.fragment),pt=s(),U=c("div"),f(be.$$.fragment),xt=s(),Ve=c("p"),Ve.textContent=lo,jt=s(),S=c("div"),f(ye.$$.fragment),Ft=s(),Ne=c("p"),Ne.textContent=co,ft=s(),f(Te.$$.fragment),ht=s(),W=c("div"),f(we.$$.fragment),zt=s(),Pe=c("p"),Pe.innerHTML=mo,Ut=s(),j=c("div"),f($e.$$.fragment),Wt=s(),Re=c("p"),Re.innerHTML=po,Jt=s(),f(H.$$.fragment),kt=s(),f(q.$$.fragment),gt=s(),f(Me.$$.fragment),ut=s(),L=c("div"),f(Ce.$$.fragment),Zt=s(),Ee=c("p"),Ee.textContent=fo,Vt=s(),Ge=c("p"),Ge.innerHTML=ho,Nt=s(),F=c("div"),f(Le.$$.fragment),Pt=s(),Be=c("p"),Be.innerHTML=go,Rt=s(),f(X.$$.fragment),Et=s(),f(Q.$$.fragment),vt=s(),f(Ie.$$.fragment),_t=s(),I=c("div"),f(xe.$$.fragment),Gt=s(),Se=c("p"),Se.textContent=uo,Bt=s(),He=c("p"),He.innerHTML=vo,St=s(),z=c("div"),f(je.$$.fragment),Ht=s(),qe=c("p"),qe.innerHTML=_o,qt=s(),f(Y.$$.fragment),Xt=s(),f(D.$$.fragment),bt=s(),Xe=c("p"),this.h()},l(e){const t=Mo("svelte-u9bgzb",document.head);a=d(t,"META",{name:!0,content:!0}),t.forEach(o),T=r(e),m=d(e,"P",{}),x(m).forEach(o),p=r(e),h(y.$$.fragment,e),n=r(e),h(w.$$.fragment,e),Qe=r(e),te=d(e,"P",{"data-svelte-h":!0}),b(te)!=="svelte-1e0lmax"&&(te.innerHTML=Yt),Ye=r(e),oe=d(e,"P",{"data-svelte-h":!0}),b(oe)!=="svelte-vfdo9a"&&(oe.textContent=Dt),De=r(e),ae=d(e,"P",{"data-svelte-h":!0}),b(ae)!=="svelte-15x7iq1"&&(ae.innerHTML=At),Ae=r(e),E=d(e,"IMG",{src:!0,alt:!0,width:!0}),Oe=r(e),ne=d(e,"SMALL",{"data-svelte-h":!0}),b(ne)!=="svelte-cyksn2"&&(ne.innerHTML=Kt),Ke=r(e),se=d(e,"P",{"data-svelte-h":!0}),b(se)!=="svelte-1usurb6"&&(se.innerHTML=eo),et=r(e),h(re.$$.fragment,e),tt=r(e),ie=d(e,"UL",{"data-svelte-h":!0}),b(ie)!=="svelte-onwgjs"&&(ie.innerHTML=to),ot=r(e),h(le.$$.fragment,e),at=r(e),ce=d(e,"P",{"data-svelte-h":!0}),b(ce)!=="svelte-nre2ah"&&(ce.textContent=oo),nt=r(e),h(de.$$.fragment,e),st=r(e),me=d(e,"UL",{"data-svelte-h":!0}),b(me)!=="svelte-pjejf9"&&(me.innerHTML=ao),rt=r(e),pe=d(e,"P",{"data-svelte-h":!0}),b(pe)!=="svelte-1xesile"&&(pe.textContent=no),it=r(e),h(fe.$$.fragment,e),lt=r(e),C=d(e,"DIV",{class:!0});var J=x(C);h(he.$$.fragment,J),$t=r(J),Je=d(J,"P",{"data-svelte-h":!0}),b(Je)!=="svelte-r7sfun"&&(Je.innerHTML=so),Mt=r(J),ke=d(J,"P",{"data-svelte-h":!0}),b(ke)!=="svelte-o55m63"&&(ke.innerHTML=ro),Ct=r(J),h(G.$$.fragment,J),J.forEach(o),ct=r(e),h(ge.$$.fragment,e),dt=r(e),N=d(e,"DIV",{class:!0});var Fe=x(N);h(ue.$$.fragment,Fe),Lt=r(Fe),B=d(Fe,"DIV",{class:!0});var ze=x(B);h(ve.$$.fragment,ze),It=r(ze),Ze=d(ze,"P",{"data-svelte-h":!0}),b(Ze)!=="svelte-khengj"&&(Ze.textContent=io),ze.forEach(o),Fe.forEach(o),mt=r(e),h(_e.$$.fragment,e),pt=r(e),U=d(e,"DIV",{class:!0});var P=x(U);h(be.$$.fragment,P),xt=r(P),Ve=d(P,"P",{"data-svelte-h":!0}),b(Ve)!=="svelte-1qfdf74"&&(Ve.textContent=lo),jt=r(P),S=d(P,"DIV",{class:!0});var Ue=x(S);h(ye.$$.fragment,Ue),Ft=r(Ue),Ne=d(Ue,"P",{"data-svelte-h":!0}),b(Ne)!=="svelte-1rdzd3o"&&(Ne.textContent=co),Ue.forEach(o),P.forEach(o),ft=r(e),h(Te.$$.fragment,e),ht=r(e),W=d(e,"DIV",{class:!0});var R=x(W);h(we.$$.fragment,R),zt=r(R),Pe=d(R,"P",{"data-svelte-h":!0}),b(Pe)!=="svelte-f0023m"&&(Pe.innerHTML=mo),Ut=r(R),j=d(R,"DIV",{class:!0});var k=x(j);h($e.$$.fragment,k),Wt=r(k),Re=d(k,"P",{"data-svelte-h":!0}),b(Re)!=="svelte-1y1i8qb"&&(Re.innerHTML=po),Jt=r(k),h(H.$$.fragment,k),kt=r(k),h(q.$$.fragment,k),k.forEach(o),R.forEach(o),gt=r(e),h(Me.$$.fragment,e),ut=r(e),L=d(e,"DIV",{class:!0});var A=x(L);h(Ce.$$.fragment,A),Zt=r(A),Ee=d(A,"P",{"data-svelte-h":!0}),b(Ee)!=="svelte-17kpmci"&&(Ee.textContent=fo),Vt=r(A),Ge=d(A,"P",{"data-svelte-h":!0}),b(Ge)!=="svelte-1gjh92c"&&(Ge.innerHTML=ho),Nt=r(A),F=d(A,"DIV",{class:!0});var O=x(F);h(Le.$$.fragment,O),Pt=r(O),Be=d(O,"P",{"data-svelte-h":!0}),b(Be)!=="svelte-k8kzwl"&&(Be.innerHTML=go),Rt=r(O),h(X.$$.fragment,O),Et=r(O),h(Q.$$.fragment,O),O.forEach(o),A.forEach(o),vt=r(e),h(Ie.$$.fragment,e),_t=r(e),I=d(e,"DIV",{class:!0});var K=x(I);h(xe.$$.fragment,K),Gt=r(K),Se=d(K,"P",{"data-svelte-h":!0}),b(Se)!=="svelte-1xxb4nq"&&(Se.textContent=uo),Bt=r(K),He=d(K,"P",{"data-svelte-h":!0}),b(He)!=="svelte-1gjh92c"&&(He.innerHTML=vo),St=r(K),z=d(K,"DIV",{class:!0});var ee=x(z);h(je.$$.fragment,ee),Ht=r(ee),qe=d(ee,"P",{"data-svelte-h":!0}),b(qe)!=="svelte-f5xuyt"&&(qe.innerHTML=_o),qt=r(ee),h(Y.$$.fragment,ee),Xt=r(ee),h(D.$$.fragment,ee),ee.forEach(o),K.forEach(o),bt=r(e),Xe=d(e,"P",{}),x(Xe).forEach(o),this.h()},h(){M(a,"name","hf:doc:metadata"),M(a,"content",Jo),yo(E.src,Ot="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/levit_architecture.png")||M(E,"src",Ot),M(E,"alt","drawing"),M(E,"width","600"),M(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){l(document.head,a),i(e,T,t),i(e,m,t),i(e,p,t),g(y,e,t),i(e,n,t),g(w,e,t),i(e,Qe,t),i(e,te,t),i(e,Ye,t),i(e,oe,t),i(e,De,t),i(e,ae,t),i(e,Ae,t),i(e,E,t),i(e,Oe,t),i(e,ne,t),i(e,Ke,t),i(e,se,t),i(e,et,t),g(re,e,t),i(e,tt,t),i(e,ie,t),i(e,ot,t),g(le,e,t),i(e,at,t),i(e,ce,t),i(e,nt,t),g(de,e,t),i(e,st,t),i(e,me,t),i(e,rt,t),i(e,pe,t),i(e,it,t),g(fe,e,t),i(e,lt,t),i(e,C,t),g(he,C,null),l(C,$t),l(C,Je),l(C,Mt),l(C,ke),l(C,Ct),g(G,C,null),i(e,ct,t),g(ge,e,t),i(e,dt,t),i(e,N,t),g(ue,N,null),l(N,Lt),l(N,B),g(ve,B,null),l(B,It),l(B,Ze),i(e,mt,t),g(_e,e,t),i(e,pt,t),i(e,U,t),g(be,U,null),l(U,xt),l(U,Ve),l(U,jt),l(U,S),g(ye,S,null),l(S,Ft),l(S,Ne),i(e,ft,t),g(Te,e,t),i(e,ht,t),i(e,W,t),g(we,W,null),l(W,zt),l(W,Pe),l(W,Ut),l(W,j),g($e,j,null),l(j,Wt),l(j,Re),l(j,Jt),g(H,j,null),l(j,kt),g(q,j,null),i(e,gt,t),g(Me,e,t),i(e,ut,t),i(e,L,t),g(Ce,L,null),l(L,Zt),l(L,Ee),l(L,Vt),l(L,Ge),l(L,Nt),l(L,F),g(Le,F,null),l(F,Pt),l(F,Be),l(F,Rt),g(X,F,null),l(F,Et),g(Q,F,null),i(e,vt,t),g(Ie,e,t),i(e,_t,t),i(e,I,t),g(xe,I,null),l(I,Gt),l(I,Se),l(I,Bt),l(I,He),l(I,St),l(I,z),g(je,z,null),l(z,Ht),l(z,qe),l(z,qt),g(Y,z,null),l(z,Xt),g(D,z,null),i(e,bt,t),i(e,Xe,t),yt=!0},p(e,[t]){const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),G.$set(J);const Fe={};t&2&&(Fe.$$scope={dirty:t,ctx:e}),H.$set(Fe);const ze={};t&2&&(ze.$$scope={dirty:t,ctx:e}),q.$set(ze);const P={};t&2&&(P.$$scope={dirty:t,ctx:e}),X.$set(P);const Ue={};t&2&&(Ue.$$scope={dirty:t,ctx:e}),Q.$set(Ue);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){yt||(u(y.$$.fragment,e),u(w.$$.fragment,e),u(re.$$.fragment,e),u(le.$$.fragment,e),u(de.$$.fragment,e),u(fe.$$.fragment,e),u(he.$$.fragment,e),u(G.$$.fragment,e),u(ge.$$.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(H.$$.fragment,e),u(q.$$.fragment,e),u(Me.$$.fragment,e),u(Ce.$$.fragment,e),u(Le.$$.fragment,e),u(X.$$.fragment,e),u(Q.$$.fragment,e),u(Ie.$$.fragment,e),u(xe.$$.fragment,e),u(je.$$.fragment,e),u(Y.$$.fragment,e),u(D.$$.fragment,e),yt=!0)},o(e){v(y.$$.fragment,e),v(w.$$.fragment,e),v(re.$$.fragment,e),v(le.$$.fragment,e),v(de.$$.fragment,e),v(fe.$$.fragment,e),v(he.$$.fragment,e),v(G.$$.fragment,e),v(ge.$$.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(H.$$.fragment,e),v(q.$$.fragment,e),v(Me.$$.fragment,e),v(Ce.$$.fragment,e),v(Le.$$.fragment,e),v(X.$$.fragment,e),v(Q.$$.fragment,e),v(Ie.$$.fragment,e),v(xe.$$.fragment,e),v(je.$$.fragment,e),v(Y.$$.fragment,e),v(D.$$.fragment,e),yt=!1},d(e){e&&(o(T),o(m),o(p),o(n),o(Qe),o(te),o(Ye),o(oe),o(De),o(ae),o(Ae),o(E),o(Oe),o(ne),o(Ke),o(se),o(et),o(tt),o(ie),o(ot),o(at),o(ce),o(nt),o(st),o(me),o(rt),o(pe),o(it),o(lt),o(C),o(ct),o(dt),o(N),o(mt),o(pt),o(U),o(ft),o(ht),o(W),o(gt),o(ut),o(L),o(vt),o(_t),o(I),o(bt),o(Xe)),o(a),_(y,e),_(w,e),_(re,e),_(le,e),_(de,e),_(fe,e),_(he),_(G),_(ge,e),_(ue),_(ve),_(_e,e),_(be),_(ye),_(Te,e),_(we),_($e),_(H),_(q),_(Me,e),_(Ce),_(Le),_(X),_(Q),_(Ie,e),_(xe),_(je),_(Y),_(D)}}}const Jo='{"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 ko($){return To(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class So extends wo{constructor(a){super(),$o(this,a,ko,Wo,bo,{})}}export{So as component};
