import{s as bo,f as yo,o as To,n as Ue}from"../chunks/scheduler.9bc65507.js";import{S as wo,i as $o,g as c,s as n,r as h,A as Mo,h as d,f as o,c as r,j as I,u as f,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 P}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=n(),h(p.$$.fragment)},l(s){a=d(s,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=r(s),f(p.$$.fragment,s)},m(s,w){i(s,a,w),i(s,m,w),g(p,s,w),y=!0},p:Ue,i(s){y||(u(p.$$.fragment,s),y=!0)},o(s){v(p.$$.fragment,s),y=!1},d(s){s&&(o(a),o(m)),_(p,s)}}}function xo($){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:Ue,d(m){m&&o(a)}}}function Io($){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=n(),h(p.$$.fragment)},l(s){a=d(s,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=r(s),f(p.$$.fragment,s)},m(s,w){i(s,a,w),i(s,m,w),g(p,s,w),y=!0},p:Ue,i(s){y||(u(p.$$.fragment,s),y=!0)},o(s){v(p.$$.fragment,s),y=!1},d(s){s&&(o(a),o(m)),_(p,s)}}}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:Ue,d(m){m&&o(a)}}}function zo($){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=n(),h(p.$$.fragment)},l(s){a=d(s,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=r(s),f(p.$$.fragment,s)},m(s,w){i(s,a,w),i(s,m,w),g(p,s,w),y=!0},p:Ue,i(s){y||(u(p.$$.fragment,s),y=!0)},o(s){v(p.$$.fragment,s),y=!1},d(s){s&&(o(a),o(m)),_(p,s)}}}function Fo($){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:Ue,d(m){m&&o(a)}}}function Wo($){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=n(),h(p.$$.fragment)},l(s){a=d(s,"P",{"data-svelte-h":!0}),b(a)!=="svelte-11lpom8"&&(a.textContent=T),m=r(s),f(p.$$.fragment,s)},m(s,w){i(s,a,w),i(s,m,w),g(p,s,w),y=!0},p:Ue,i(s){y||(u(p.$$.fragment,s),y=!0)},o(s){v(p.$$.fragment,s),y=!1},d(s){s&&(o(a),o(m)),_(p,s)}}}function Uo($){let a,T,m,p,y,s,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,se,Kt='LeViT Architecture. Taken from the <a href="https://arxiv.org/abs/2104.01136">original paper</a>.',Ke,ne,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/v4.37.1/en/model_doc/levit#transformers.LevitForImageClassification">LevitForImageClassification</a> and (2) corresponds to <a href="/docs/transformers/v4.37.1/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/v4.37.1/en/model_doc/levit#transformers.LevitModel">LevitModel</a> or <a href="/docs/transformers/v4.37.1/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/v4.37.1/en/model_doc/levit#transformers.LevitImageProcessor">LevitImageProcessor</a> in order to
prepare images for the model.</li> <li><a href="/docs/transformers/v4.37.1/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/v4.37.1/en/model_doc/vit#transformers.ViTFeatureExtractor">ViTFeatureExtractor</a> by <a href="/docs/transformers/v4.37.1/en/model_doc/levit#transformers.LevitImageProcessor">LevitImageProcessor</a> and <a href="/docs/transformers/v4.37.1/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</a> by <a href="/docs/transformers/v4.37.1/en/model_doc/levit#transformers.LevitForImageClassification">LevitForImageClassification</a> or <a href="/docs/transformers/v4.37.1/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.",st,de,nt,me,ao='<li><a href="/docs/transformers/v4.37.1/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,so="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,he,lt,C,fe,$t,Je,no=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.37.1/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/v4.37.1/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.37.1/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ct,G,ct,ge,dt,V,ue,Lt,B,ve,xt,Ze,io="Preprocess an image or a batch of images.",mt,_e,pt,W,be,It,Pe,lo="Constructs a LeViT image processor.",jt,S,ye,zt,Ve,co="Preprocess an image or batch of images to be used as input to a LeViT model.",ht,Te,ft,U,we,Ft,Ne,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.`,Wt,j,$e,Ut,Re,po='The <a href="/docs/transformers/v4.37.1/en/model_doc/levit#transformers.LevitModel">LevitModel</a> forward method, overrides the <code>__call__</code> special method.',Jt,H,kt,X,gt,Me,ut,L,Ce,Zt,Ee,ho=`Levit Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,Pt,Ge,fo=`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.`,Vt,z,Le,Nt,Be,go='The <a href="/docs/transformers/v4.37.1/en/model_doc/levit#transformers.LevitForImageClassification">LevitForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Rt,q,Et,Q,vt,xe,_t,x,Ie,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,F,je,Ht,Xe,_o='The <a href="/docs/transformers/v4.37.1/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher">LevitForImageClassificationWithTeacher</a> forward method, overrides the <code>__call__</code> special method.',Xt,Y,qt,D,bt,qe,yt;return y=new P({props:{title:"LeViT",local:"levit",headingTag:"h1"}}),w=new P({props:{title:"Overview",local:"overview",headingTag:"h2"}}),re=new P({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),le=new P({props:{title:"Resources",local:"resources",headingTag:"h2"}}),de=new Co({props:{pipeline:"image-classification"}}),he=new P({props:{title:"LevitConfig",local:"transformers.LevitConfig",headingTag:"h2"}}),fe=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/v4.37.1/src/transformers/models/levit/configuration_levit.py#L35"}}),G=new Tt({props:{anchor:"transformers.LevitConfig.example",$$slots:{default:[Lo]},$$scope:{ctx:$}}}),ge=new P({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/v4.37.1/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/v4.37.1/src/transformers/image_processing_utils.py#L550"}}),_e=new P({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:": Dict = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": Dict = None"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": Union = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": Union = [0.485, 0.456, 0.406]"},{name:"image_std",val:": Union = [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/v4.37.1/src/transformers/models/levit/image_processing_levit.py#L45"}}),ye=new Z({props:{name:"preprocess",anchor:"transformers.LevitImageProcessor.preprocess",parameters:[{name:"images",val:": Union"},{name:"do_resize",val:": Optional = None"},{name:"size",val:": Optional = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": Optional = None"},{name:"crop_size",val:": Optional = None"},{name:"do_rescale",val:": Optional = None"},{name:"rescale_factor",val:": Optional = None"},{name:"do_normalize",val:": Optional = None"},{name:"image_mean",val:": Union = None"},{name:"image_std",val:": Union = None"},{name:"return_tensors",val:": Optional = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": Union = 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/v4.37.1/src/transformers/models/levit/image_processing_levit.py#L173"}}),Te=new P({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/v4.37.1/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/v4.37.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.37.1/src/transformers/models/levit/modeling_levit.py#L535"}}),$e=new Z({props:{name:"forward",anchor:"transformers.LevitModel.forward",parameters:[{name:"pixel_values",val:": FloatTensor = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/v4.37.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.37.1/en/model_doc/glpn#transformers.GLPNFeatureExtractor.__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/v4.37.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.37.1/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/v4.37.1/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:[xo]},$$scope:{ctx:$}}}),X=new Tt({props:{anchor:"transformers.LevitModel.forward.example",$$slots:{default:[Io]},$$scope:{ctx:$}}}),Me=new P({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/v4.37.1/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/v4.37.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.37.1/src/transformers/models/levit/modeling_levit.py#L592"}}),Le=new Z({props:{name:"forward",anchor:"transformers.LevitForImageClassification.forward",parameters:[{name:"pixel_values",val:": FloatTensor = None"},{name:"labels",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/v4.37.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.37.1/en/model_doc/glpn#transformers.GLPNFeatureExtractor.__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/v4.37.1/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/v4.37.1/src/transformers/models/levit/modeling_levit.py#L616",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.37.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.37.1/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/v4.37.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),q=new Qt({props:{$$slots:{default:[jo]},$$scope:{ctx:$}}}),Q=new Tt({props:{anchor:"transformers.LevitForImageClassification.forward.example",$$slots:{default:[zo]},$$scope:{ctx:$}}}),xe=new P({props:{title:"LevitForImageClassificationWithTeacher",local:"transformers.LevitForImageClassificationWithTeacher",headingTag:"h2"}}),Ie=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/v4.37.1/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/v4.37.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.37.1/src/transformers/models/levit/modeling_levit.py#L677"}}),je=new Z({props:{name:"forward",anchor:"transformers.LevitForImageClassificationWithTeacher.forward",parameters:[{name:"pixel_values",val:": FloatTensor = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/v4.37.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.37.1/en/model_doc/glpn#transformers.GLPNFeatureExtractor.__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/v4.37.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.37.1/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/v4.37.1/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:[Fo]},$$scope:{ctx:$}}}),D=new Tt({props:{anchor:"transformers.LevitForImageClassificationWithTeacher.forward.example",$$slots:{default:[Wo]},$$scope:{ctx:$}}}),{c(){a=c("meta"),T=n(),m=c("p"),p=n(),h(y.$$.fragment),s=n(),h(w.$$.fragment),Qe=n(),te=c("p"),te.innerHTML=Yt,Ye=n(),oe=c("p"),oe.textContent=Dt,De=n(),ae=c("p"),ae.innerHTML=At,Ae=n(),E=c("img"),Oe=n(),se=c("small"),se.innerHTML=Kt,Ke=n(),ne=c("p"),ne.innerHTML=eo,et=n(),h(re.$$.fragment),tt=n(),ie=c("ul"),ie.innerHTML=to,ot=n(),h(le.$$.fragment),at=n(),ce=c("p"),ce.textContent=oo,st=n(),h(de.$$.fragment),nt=n(),me=c("ul"),me.innerHTML=ao,rt=n(),pe=c("p"),pe.textContent=so,it=n(),h(he.$$.fragment),lt=n(),C=c("div"),h(fe.$$.fragment),$t=n(),Je=c("p"),Je.innerHTML=no,Mt=n(),ke=c("p"),ke.innerHTML=ro,Ct=n(),h(G.$$.fragment),ct=n(),h(ge.$$.fragment),dt=n(),V=c("div"),h(ue.$$.fragment),Lt=n(),B=c("div"),h(ve.$$.fragment),xt=n(),Ze=c("p"),Ze.textContent=io,mt=n(),h(_e.$$.fragment),pt=n(),W=c("div"),h(be.$$.fragment),It=n(),Pe=c("p"),Pe.textContent=lo,jt=n(),S=c("div"),h(ye.$$.fragment),zt=n(),Ve=c("p"),Ve.textContent=co,ht=n(),h(Te.$$.fragment),ft=n(),U=c("div"),h(we.$$.fragment),Ft=n(),Ne=c("p"),Ne.innerHTML=mo,Wt=n(),j=c("div"),h($e.$$.fragment),Ut=n(),Re=c("p"),Re.innerHTML=po,Jt=n(),h(H.$$.fragment),kt=n(),h(X.$$.fragment),gt=n(),h(Me.$$.fragment),ut=n(),L=c("div"),h(Ce.$$.fragment),Zt=n(),Ee=c("p"),Ee.textContent=ho,Pt=n(),Ge=c("p"),Ge.innerHTML=fo,Vt=n(),z=c("div"),h(Le.$$.fragment),Nt=n(),Be=c("p"),Be.innerHTML=go,Rt=n(),h(q.$$.fragment),Et=n(),h(Q.$$.fragment),vt=n(),h(xe.$$.fragment),_t=n(),x=c("div"),h(Ie.$$.fragment),Gt=n(),Se=c("p"),Se.textContent=uo,Bt=n(),He=c("p"),He.innerHTML=vo,St=n(),F=c("div"),h(je.$$.fragment),Ht=n(),Xe=c("p"),Xe.innerHTML=_o,Xt=n(),h(Y.$$.fragment),qt=n(),h(D.$$.fragment),bt=n(),qe=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",{}),I(m).forEach(o),p=r(e),f(y.$$.fragment,e),s=r(e),f(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),se=d(e,"SMALL",{"data-svelte-h":!0}),b(se)!=="svelte-cyksn2"&&(se.innerHTML=Kt),Ke=r(e),ne=d(e,"P",{"data-svelte-h":!0}),b(ne)!=="svelte-1usurb6"&&(ne.innerHTML=eo),et=r(e),f(re.$$.fragment,e),tt=r(e),ie=d(e,"UL",{"data-svelte-h":!0}),b(ie)!=="svelte-1cubyie"&&(ie.innerHTML=to),ot=r(e),f(le.$$.fragment,e),at=r(e),ce=d(e,"P",{"data-svelte-h":!0}),b(ce)!=="svelte-nre2ah"&&(ce.textContent=oo),st=r(e),f(de.$$.fragment,e),nt=r(e),me=d(e,"UL",{"data-svelte-h":!0}),b(me)!=="svelte-xv5z4f"&&(me.innerHTML=ao),rt=r(e),pe=d(e,"P",{"data-svelte-h":!0}),b(pe)!=="svelte-1xesile"&&(pe.textContent=so),it=r(e),f(he.$$.fragment,e),lt=r(e),C=d(e,"DIV",{class:!0});var J=I(C);f(fe.$$.fragment,J),$t=r(J),Je=d(J,"P",{"data-svelte-h":!0}),b(Je)!=="svelte-7ymp41"&&(Je.innerHTML=no),Mt=r(J),ke=d(J,"P",{"data-svelte-h":!0}),b(ke)!=="svelte-1chy751"&&(ke.innerHTML=ro),Ct=r(J),f(G.$$.fragment,J),J.forEach(o),ct=r(e),f(ge.$$.fragment,e),dt=r(e),V=d(e,"DIV",{class:!0});var ze=I(V);f(ue.$$.fragment,ze),Lt=r(ze),B=d(ze,"DIV",{class:!0});var Fe=I(B);f(ve.$$.fragment,Fe),xt=r(Fe),Ze=d(Fe,"P",{"data-svelte-h":!0}),b(Ze)!=="svelte-khengj"&&(Ze.textContent=io),Fe.forEach(o),ze.forEach(o),mt=r(e),f(_e.$$.fragment,e),pt=r(e),W=d(e,"DIV",{class:!0});var N=I(W);f(be.$$.fragment,N),It=r(N),Pe=d(N,"P",{"data-svelte-h":!0}),b(Pe)!=="svelte-1qfdf74"&&(Pe.textContent=lo),jt=r(N),S=d(N,"DIV",{class:!0});var We=I(S);f(ye.$$.fragment,We),zt=r(We),Ve=d(We,"P",{"data-svelte-h":!0}),b(Ve)!=="svelte-1rdzd3o"&&(Ve.textContent=co),We.forEach(o),N.forEach(o),ht=r(e),f(Te.$$.fragment,e),ft=r(e),U=d(e,"DIV",{class:!0});var R=I(U);f(we.$$.fragment,R),Ft=r(R),Ne=d(R,"P",{"data-svelte-h":!0}),b(Ne)!=="svelte-f0023m"&&(Ne.innerHTML=mo),Wt=r(R),j=d(R,"DIV",{class:!0});var k=I(j);f($e.$$.fragment,k),Ut=r(k),Re=d(k,"P",{"data-svelte-h":!0}),b(Re)!=="svelte-h7lyj"&&(Re.innerHTML=po),Jt=r(k),f(H.$$.fragment,k),kt=r(k),f(X.$$.fragment,k),k.forEach(o),R.forEach(o),gt=r(e),f(Me.$$.fragment,e),ut=r(e),L=d(e,"DIV",{class:!0});var A=I(L);f(Ce.$$.fragment,A),Zt=r(A),Ee=d(A,"P",{"data-svelte-h":!0}),b(Ee)!=="svelte-17kpmci"&&(Ee.textContent=ho),Pt=r(A),Ge=d(A,"P",{"data-svelte-h":!0}),b(Ge)!=="svelte-1gjh92c"&&(Ge.innerHTML=fo),Vt=r(A),z=d(A,"DIV",{class:!0});var O=I(z);f(Le.$$.fragment,O),Nt=r(O),Be=d(O,"P",{"data-svelte-h":!0}),b(Be)!=="svelte-gotimx"&&(Be.innerHTML=go),Rt=r(O),f(q.$$.fragment,O),Et=r(O),f(Q.$$.fragment,O),O.forEach(o),A.forEach(o),vt=r(e),f(xe.$$.fragment,e),_t=r(e),x=d(e,"DIV",{class:!0});var K=I(x);f(Ie.$$.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),F=d(K,"DIV",{class:!0});var ee=I(F);f(je.$$.fragment,ee),Ht=r(ee),Xe=d(ee,"P",{"data-svelte-h":!0}),b(Xe)!=="svelte-fv6cbd"&&(Xe.innerHTML=_o),Xt=r(ee),f(Y.$$.fragment,ee),qt=r(ee),f(D.$$.fragment,ee),ee.forEach(o),K.forEach(o),bt=r(e),qe=d(e,"P",{}),I(qe).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(V,"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(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(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(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(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(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(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(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){l(document.head,a),i(e,T,t),i(e,m,t),i(e,p,t),g(y,e,t),i(e,s,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,se,t),i(e,Ke,t),i(e,ne,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,st,t),g(de,e,t),i(e,nt,t),i(e,me,t),i(e,rt,t),i(e,pe,t),i(e,it,t),g(he,e,t),i(e,lt,t),i(e,C,t),g(fe,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,V,t),g(ue,V,null),l(V,Lt),l(V,B),g(ve,B,null),l(B,xt),l(B,Ze),i(e,mt,t),g(_e,e,t),i(e,pt,t),i(e,W,t),g(be,W,null),l(W,It),l(W,Pe),l(W,jt),l(W,S),g(ye,S,null),l(S,zt),l(S,Ve),i(e,ht,t),g(Te,e,t),i(e,ft,t),i(e,U,t),g(we,U,null),l(U,Ft),l(U,Ne),l(U,Wt),l(U,j),g($e,j,null),l(j,Ut),l(j,Re),l(j,Jt),g(H,j,null),l(j,kt),g(X,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,Pt),l(L,Ge),l(L,Vt),l(L,z),g(Le,z,null),l(z,Nt),l(z,Be),l(z,Rt),g(q,z,null),l(z,Et),g(Q,z,null),i(e,vt,t),g(xe,e,t),i(e,_t,t),i(e,x,t),g(Ie,x,null),l(x,Gt),l(x,Se),l(x,Bt),l(x,He),l(x,St),l(x,F),g(je,F,null),l(F,Ht),l(F,Xe),l(F,Xt),g(Y,F,null),l(F,qt),g(D,F,null),i(e,bt,t),i(e,qe,t),yt=!0},p(e,[t]){const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),G.$set(J);const ze={};t&2&&(ze.$$scope={dirty:t,ctx:e}),H.$set(ze);const Fe={};t&2&&(Fe.$$scope={dirty:t,ctx:e}),X.$set(Fe);const N={};t&2&&(N.$$scope={dirty:t,ctx:e}),q.$set(N);const We={};t&2&&(We.$$scope={dirty:t,ctx:e}),Q.$set(We);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(he.$$.fragment,e),u(fe.$$.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(X.$$.fragment,e),u(Me.$$.fragment,e),u(Ce.$$.fragment,e),u(Le.$$.fragment,e),u(q.$$.fragment,e),u(Q.$$.fragment,e),u(xe.$$.fragment,e),u(Ie.$$.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(he.$$.fragment,e),v(fe.$$.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(X.$$.fragment,e),v(Me.$$.fragment,e),v(Ce.$$.fragment,e),v(Le.$$.fragment,e),v(q.$$.fragment,e),v(Q.$$.fragment,e),v(xe.$$.fragment,e),v(Ie.$$.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(s),o(Qe),o(te),o(Ye),o(oe),o(De),o(ae),o(Ae),o(E),o(Oe),o(se),o(Ke),o(ne),o(et),o(tt),o(ie),o(ot),o(at),o(ce),o(st),o(nt),o(me),o(rt),o(pe),o(it),o(lt),o(C),o(ct),o(dt),o(V),o(mt),o(pt),o(W),o(ht),o(ft),o(U),o(gt),o(ut),o(L),o(vt),o(_t),o(x),o(bt),o(qe)),o(a),_(y,e),_(w,e),_(re,e),_(le,e),_(de,e),_(he,e),_(fe),_(G),_(ge,e),_(ue),_(ve),_(_e,e),_(be),_(ye),_(Te,e),_(we),_($e),_(H),_(X),_(Me,e),_(Ce),_(Le),_(q),_(Q),_(xe,e),_(Ie),_(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,Uo,bo,{})}}export{So as component};
