import{S as ni,i as ii,s as li,e as a,k as d,w,t as s,M as ci,c as r,d as o,m,a as i,x as y,h as n,b as c,N as di,G as e,g as p,y as L,q as $,o as T,B as I,v as mi,L as ia}from"../../chunks/vendor-hf-doc-builder.js";import{T as Bs}from"../../chunks/Tip-hf-doc-builder.js";import{D as R}from"../../chunks/Docstring-hf-doc-builder.js";import{C as la}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ze}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as na}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function hi(z){let h,b,v,g,_;return g=new la({props:{code:`from transformers import LevitConfig, LevitModel

# Initializing a LeViT levit-128S style configuration
configuration = LevitConfig()

# Initializing a model (with random weights) from the levit-128S style configuration
model = LevitModel(configuration)

# Accessing the model configuration
configuration = model.config`,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`}}),{c(){h=a("p"),b=s("Example:"),v=d(),w(g.$$.fragment)},l(l){h=r(l,"P",{});var u=i(h);b=n(u,"Example:"),u.forEach(o),v=m(l),y(g.$$.fragment,l)},m(l,u){p(l,h,u),e(h,b),p(l,v,u),L(g,l,u),_=!0},p:ia,i(l){_||($(g.$$.fragment,l),_=!0)},o(l){T(g.$$.fragment,l),_=!1},d(l){l&&o(h),l&&o(v),I(g,l)}}}function fi(z){let h,b,v,g,_;return{c(){h=a("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a("code"),g=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){h=r(l,"P",{});var u=i(h);b=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=r(u,"CODE",{});var E=i(v);g=n(E,"Module"),E.forEach(o),_=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(l,u){p(l,h,u),e(h,b),e(h,v),e(v,g),e(h,_)},d(l){l&&o(h)}}}function pi(z){let h,b,v,g,_;return g=new la({props:{code:`from transformers import LevitImageProcessor, LevitModel
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = LevitImageProcessor.from_pretrained("facebook/levit-128S")
model = LevitModel.from_pretrained("facebook/levit-128S")

inputs = feature_extractor(image, return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LevitImageProcessor, 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>feature_extractor = LevitImageProcessor.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 = feature_extractor(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>]`}}),{c(){h=a("p"),b=s("Example:"),v=d(),w(g.$$.fragment)},l(l){h=r(l,"P",{});var u=i(h);b=n(u,"Example:"),u.forEach(o),v=m(l),y(g.$$.fragment,l)},m(l,u){p(l,h,u),e(h,b),p(l,v,u),L(g,l,u),_=!0},p:ia,i(l){_||($(g.$$.fragment,l),_=!0)},o(l){T(g.$$.fragment,l),_=!1},d(l){l&&o(h),l&&o(v),I(g,l)}}}function gi(z){let h,b,v,g,_;return{c(){h=a("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a("code"),g=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){h=r(l,"P",{});var u=i(h);b=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=r(u,"CODE",{});var E=i(v);g=n(E,"Module"),E.forEach(o),_=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(l,u){p(l,h,u),e(h,b),e(h,v),e(v,g),e(h,_)},d(l){l&&o(h)}}}function ui(z){let h,b,v,g,_;return g=new la({props:{code:`from transformers import LevitImageProcessor, LevitForImageClassification
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = LevitImageProcessor.from_pretrained("facebook/levit-128S")
model = LevitForImageClassification.from_pretrained("facebook/levit-128S")

inputs = feature_extractor(image, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# model predicts one of the 1000 ImageNet classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LevitImageProcessor, 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>feature_extractor = LevitImageProcessor.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 = feature_extractor(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`}}),{c(){h=a("p"),b=s("Example:"),v=d(),w(g.$$.fragment)},l(l){h=r(l,"P",{});var u=i(h);b=n(u,"Example:"),u.forEach(o),v=m(l),y(g.$$.fragment,l)},m(l,u){p(l,h,u),e(h,b),p(l,v,u),L(g,l,u),_=!0},p:ia,i(l){_||($(g.$$.fragment,l),_=!0)},o(l){T(g.$$.fragment,l),_=!1},d(l){l&&o(h),l&&o(v),I(g,l)}}}function vi(z){let h,b,v,g,_;return{c(){h=a("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a("code"),g=s("Module"),_=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){h=r(l,"P",{});var u=i(h);b=n(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=r(u,"CODE",{});var E=i(v);g=n(E,"Module"),E.forEach(o),_=n(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(l,u){p(l,h,u),e(h,b),e(h,v),e(v,g),e(h,_)},d(l){l&&o(h)}}}function _i(z){let h,b,v,g,_;return g=new la({props:{code:`from transformers import LevitImageProcessor, LevitForImageClassificationWithTeacher
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = LevitImageProcessor.from_pretrained("facebook/levit-128S")
model = LevitForImageClassificationWithTeacher.from_pretrained("facebook/levit-128S")

inputs = feature_extractor(image, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# model predicts one of the 1000 ImageNet classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LevitImageProcessor, 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>feature_extractor = LevitImageProcessor.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 = feature_extractor(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`}}),{c(){h=a("p"),b=s("Example:"),v=d(),w(g.$$.fragment)},l(l){h=r(l,"P",{});var u=i(h);b=n(u,"Example:"),u.forEach(o),v=m(l),y(g.$$.fragment,l)},m(l,u){p(l,h,u),e(h,b),p(l,v,u),L(g,l,u),_=!0},p:ia,i(l){_||($(g.$$.fragment,l),_=!0)},o(l){T(g.$$.fragment,l),_=!1},d(l){l&&o(h),l&&o(v),I(g,l)}}}function bi(z){let h,b,v,g,_,l,u,E,ca,Io,H,se,Rt,ke,da,Ut,ma,Co,U,ha,Ee,fa,pa,ct,ga,ua,xo,dt,va,Po,mt,Bt,_a,zo,ne,Hs,ko,ie,ba,ht,wa,ya,Eo,ft,La,Fo,k,Ht,$a,Ta,J,Ia,pt,Ca,xa,gt,Pa,za,ka,Fe,Ea,je,Fa,ja,Aa,C,Ma,ut,Na,qa,vt,Va,Sa,Jt,Da,Wa,Gt,Oa,Ra,Yt,Ua,Ba,Xt,Ha,Ja,Kt,Ga,Ya,_t,Xa,Ka,Qa,bt,wt,Za,er,tr,P,or,Ae,ar,rr,yt,sr,nr,Lt,ir,lr,$t,cr,dr,Tt,mr,hr,It,fr,pr,jo,B,gr,Me,ur,vr,Ne,_r,br,Ao,G,le,Qt,qe,wr,Zt,yr,Mo,j,Ve,Lr,Y,$r,Ct,Tr,Ir,Se,Cr,xr,Pr,X,zr,xt,kr,Er,Pt,Fr,jr,Ar,ce,No,K,de,eo,De,Mr,to,Nr,qo,D,We,qr,oo,Vr,Sr,me,Oe,Dr,ao,Wr,Vo,Q,he,ro,Re,Or,so,Rr,So,W,Ue,Ur,no,Br,Hr,fe,Be,Jr,io,Gr,Do,Z,pe,lo,He,Yr,co,Xr,Wo,O,Je,Kr,Ge,Qr,Ye,Zr,es,ts,N,Xe,os,ee,as,zt,rs,ss,mo,ns,is,ls,ge,cs,ue,Oo,te,ve,ho,Ke,ds,fo,ms,Ro,A,Qe,hs,po,fs,ps,Ze,gs,et,us,vs,_s,q,tt,bs,oe,ws,kt,ys,Ls,go,$s,Ts,Is,_e,Cs,be,Uo,ae,we,uo,ot,xs,vo,Ps,Bo,M,at,zs,_o,ks,Es,rt,Fs,st,js,As,Ms,V,nt,Ns,re,qs,Et,Vs,Ss,bo,Ds,Ws,Os,ye,Rs,Le,Ho;return l=new ze({}),ke=new ze({}),qe=new ze({}),Ve=new R({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.25.1/src/transformers/models/levit/configuration_levit.py#L35"}}),ce=new na({props:{anchor:"transformers.LevitConfig.example",$$slots:{default:[hi]},$$scope:{ctx:z}}}),De=new ze({}),We=new R({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>PILImageResampling.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>, defaults to <code>[0.229, 0.224, 0.225]</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>, defaults to <code>[0.485, 0.456, 0.406]</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.25.1/src/transformers/models/levit/image_processing_levit.py#L48"}}),Oe=new R({props:{name:"__call__",anchor:"transformers.LevitImageProcessor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/image_processing_utils.py#L435"}}),Re=new ze({}),Ue=new R({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>PILImageResampling.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>, defaults to <code>[0.229, 0.224, 0.225]</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>, defaults to <code>[0.485, 0.456, 0.406]</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.25.1/src/transformers/models/levit/image_processing_levit.py#L48"}}),Be=new R({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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.LevitImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image or batch of images to preprocess.`,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"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/levit/image_processing_levit.py#L232"}}),He=new ze({}),Je=new R({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.25.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.25.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.25.1/src/transformers/models/levit/modeling_levit.py#L541"}}),Xe=new R({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/v4.25.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<code>AutoImageProcessor.__call__()</code> 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.25.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.25.1/src/transformers/models/levit/modeling_levit.py#L550",returnDescription:`
<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.25.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>) \u2014 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>) \u2014 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>) \u2014 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:`
<p><code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ge=new Bs({props:{$$slots:{default:[fi]},$$scope:{ctx:z}}}),ue=new na({props:{anchor:"transformers.LevitModel.forward.example",$$slots:{default:[pi]},$$scope:{ctx:z}}}),Ke=new ze({}),Qe=new R({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.25.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.25.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.25.1/src/transformers/models/levit/modeling_levit.py#L602"}}),tt=new R({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/v4.25.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<code>AutoImageProcessor.__call__()</code> 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.25.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.25.1/src/transformers/models/levit/modeling_levit.py#L619",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.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.25.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) \u2014 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>) \u2014 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>) \u2014 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:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_e=new Bs({props:{$$slots:{default:[gi]},$$scope:{ctx:z}}}),be=new na({props:{anchor:"transformers.LevitForImageClassification.forward.example",$$slots:{default:[ui]},$$scope:{ctx:z}}}),ot=new ze({}),at=new R({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.25.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.25.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.25.1/src/transformers/models/levit/modeling_levit.py#L690"}}),nt=new R({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/v4.25.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<code>AutoImageProcessor.__call__()</code> 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.25.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.25.1/src/transformers/models/levit/modeling_levit.py#L712",returnDescription:`
<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.25.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>) \u2014 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>) \u2014 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>) \u2014 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>) \u2014 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:`
<p><code>transformers.models.levit.modeling_levit.LevitForImageClassificationWithTeacherOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ye=new Bs({props:{$$slots:{default:[vi]},$$scope:{ctx:z}}}),Le=new na({props:{anchor:"transformers.LevitForImageClassificationWithTeacher.forward.example",$$slots:{default:[_i]},$$scope:{ctx:z}}}),{c(){h=a("meta"),b=d(),v=a("h1"),g=a("a"),_=a("span"),w(l.$$.fragment),u=d(),E=a("span"),ca=s("LeViT"),Io=d(),H=a("h2"),se=a("a"),Rt=a("span"),w(ke.$$.fragment),da=d(),Ut=a("span"),ma=s("Overview"),Co=d(),U=a("p"),ha=s("The LeViT model was proposed in "),Ee=a("a"),fa=s("LeViT: Introducing Convolutions to Vision Transformers"),pa=s(" by Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Herv\xE9 J\xE9gou, Matthijs Douze. LeViT improves the "),ct=a("a"),ga=s("Vision Transformer (ViT)"),ua=s(" 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."),xo=d(),dt=a("p"),va=s("The abstract from the paper is the following:"),Po=d(),mt=a("p"),Bt=a("em"),_a=s(`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.`),zo=d(),ne=a("img"),ko=d(),ie=a("small"),ba=s("LeViT Architecture. Taken from the "),ht=a("a"),wa=s("original paper"),ya=s("."),Eo=d(),ft=a("p"),La=s("Tips:"),Fo=d(),k=a("ul"),Ht=a("li"),$a=s("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."),Ta=d(),J=a("li"),Ia=s(`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 \u201Cfine-tuning with distillation\u201D,
because one relies on a teacher that has already been fine-tuned on the downstream dataset. In terms of models, (1) corresponds
to `),pt=a("a"),Ca=s("LevitForImageClassification"),xa=s(" and (2) corresponds to "),gt=a("a"),Pa=s("LevitForImageClassificationWithTeacher"),za=s("."),ka=d(),Fe=a("li"),Ea=s("All released checkpoints were pre-trained and fine-tuned on  "),je=a("a"),Fa=s("ImageNet-1k"),ja=s(`
(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.`),Aa=d(),C=a("li"),Ma=s("The authors of LeViT released 5 trained LeViT models, which you can directly plug into "),ut=a("a"),Na=s("LevitModel"),qa=s(" or "),vt=a("a"),Va=s("LevitForImageClassification"),Sa=s(`.
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):
`),Jt=a("em"),Da=s("facebook/levit-128S"),Wa=s(", "),Gt=a("em"),Oa=s("facebook/levit-128"),Ra=s(", "),Yt=a("em"),Ua=s("facebook/levit-192"),Ba=s(", "),Xt=a("em"),Ha=s("facebook/levit-256"),Ja=s(` and
`),Kt=a("em"),Ga=s("facebook/levit-384"),Ya=s(". Note that one should use "),_t=a("a"),Xa=s("LevitImageProcessor"),Ka=s(` in order to
prepare images for the model.`),Qa=d(),bt=a("li"),wt=a("a"),Za=s("LevitForImageClassificationWithTeacher"),er=s(" currently supports only inference and not training or fine-tuning."),tr=d(),P=a("li"),or=s("You can check out demo notebooks regarding inference as well as fine-tuning on custom data "),Ae=a("a"),ar=s("here"),rr=s(`
(you can just replace `),yt=a("a"),sr=s("ViTFeatureExtractor"),nr=s(" by "),Lt=a("a"),ir=s("LevitImageProcessor"),lr=s(" and "),$t=a("a"),cr=s("ViTForImageClassification"),dr=s(" by "),Tt=a("a"),mr=s("LevitForImageClassification"),hr=s(" or "),It=a("a"),fr=s("LevitForImageClassificationWithTeacher"),pr=s(")."),jo=d(),B=a("p"),gr=s("This model was contributed by "),Me=a("a"),ur=s("anugunj"),vr=s(". The original code can be found "),Ne=a("a"),_r=s("here"),br=s("."),Ao=d(),G=a("h2"),le=a("a"),Qt=a("span"),w(qe.$$.fragment),wr=d(),Zt=a("span"),yr=s("LevitConfig"),Mo=d(),j=a("div"),w(Ve.$$.fragment),Lr=d(),Y=a("p"),$r=s("This is the configuration class to store the configuration of a "),Ct=a("a"),Tr=s("LevitModel"),Ir=s(`. 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
`),Se=a("a"),Cr=s("facebook/levit-128S"),xr=s(" architecture."),Pr=d(),X=a("p"),zr=s("Configuration objects inherit from "),xt=a("a"),kr=s("PretrainedConfig"),Er=s(` and can be used to control the model outputs. Read the
documentation from `),Pt=a("a"),Fr=s("PretrainedConfig"),jr=s(" for more information."),Ar=d(),w(ce.$$.fragment),No=d(),K=a("h2"),de=a("a"),eo=a("span"),w(De.$$.fragment),Mr=d(),to=a("span"),Nr=s("LevitFeatureExtractor"),qo=d(),D=a("div"),w(We.$$.fragment),qr=d(),oo=a("p"),Vr=s("Constructs a LeViT image processor."),Sr=d(),me=a("div"),w(Oe.$$.fragment),Dr=d(),ao=a("p"),Wr=s("Preprocess an image or a batch of images."),Vo=d(),Q=a("h2"),he=a("a"),ro=a("span"),w(Re.$$.fragment),Or=d(),so=a("span"),Rr=s("LevitImageProcessor"),So=d(),W=a("div"),w(Ue.$$.fragment),Ur=d(),no=a("p"),Br=s("Constructs a LeViT image processor."),Hr=d(),fe=a("div"),w(Be.$$.fragment),Jr=d(),io=a("p"),Gr=s("Preprocess an image or batch of images to be used as input to a LeViT model."),Do=d(),Z=a("h2"),pe=a("a"),lo=a("span"),w(He.$$.fragment),Yr=d(),co=a("span"),Xr=s("LevitModel"),Wo=d(),O=a("div"),w(Je.$$.fragment),Kr=d(),Ge=a("p"),Qr=s(`The bare Levit model outputting raw features without any specific head on top.
This model is a PyTorch `),Ye=a("a"),Zr=s("torch.nn.Module"),es=s(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ts=d(),N=a("div"),w(Xe.$$.fragment),os=d(),ee=a("p"),as=s("The "),zt=a("a"),rs=s("LevitModel"),ss=s(" forward method, overrides the "),mo=a("code"),ns=s("__call__"),is=s(" special method."),ls=d(),w(ge.$$.fragment),cs=d(),w(ue.$$.fragment),Oo=d(),te=a("h2"),ve=a("a"),ho=a("span"),w(Ke.$$.fragment),ds=d(),fo=a("span"),ms=s("LevitForImageClassification"),Ro=d(),A=a("div"),w(Qe.$$.fragment),hs=d(),po=a("p"),fs=s(`Levit Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),ps=d(),Ze=a("p"),gs=s("This model is a PyTorch "),et=a("a"),us=s("torch.nn.Module"),vs=s(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),_s=d(),q=a("div"),w(tt.$$.fragment),bs=d(),oe=a("p"),ws=s("The "),kt=a("a"),ys=s("LevitForImageClassification"),Ls=s(" forward method, overrides the "),go=a("code"),$s=s("__call__"),Ts=s(" special method."),Is=d(),w(_e.$$.fragment),Cs=d(),w(be.$$.fragment),Uo=d(),ae=a("h2"),we=a("a"),uo=a("span"),w(ot.$$.fragment),xs=d(),vo=a("span"),Ps=s("LevitForImageClassificationWithTeacher"),Bo=d(),M=a("div"),w(at.$$.fragment),zs=d(),_o=a("p"),ks=s(`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.`),Es=d(),rt=a("p"),Fs=s("This model is a PyTorch "),st=a("a"),js=s("torch.nn.Module"),As=s(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ms=d(),V=a("div"),w(nt.$$.fragment),Ns=d(),re=a("p"),qs=s("The "),Et=a("a"),Vs=s("LevitForImageClassificationWithTeacher"),Ss=s(" forward method, overrides the "),bo=a("code"),Ds=s("__call__"),Ws=s(" special method."),Os=d(),w(ye.$$.fragment),Rs=d(),w(Le.$$.fragment),this.h()},l(t){const f=ci('[data-svelte="svelte-1phssyn"]',document.head);h=r(f,"META",{name:!0,content:!0}),f.forEach(o),b=m(t),v=r(t,"H1",{class:!0});var it=i(v);g=r(it,"A",{id:!0,class:!0,href:!0});var wo=i(g);_=r(wo,"SPAN",{});var yo=i(_);y(l.$$.fragment,yo),yo.forEach(o),wo.forEach(o),u=m(it),E=r(it,"SPAN",{});var Lo=i(E);ca=n(Lo,"LeViT"),Lo.forEach(o),it.forEach(o),Io=m(t),H=r(t,"H2",{class:!0});var lt=i(H);se=r(lt,"A",{id:!0,class:!0,href:!0});var $o=i(se);Rt=r($o,"SPAN",{});var To=i(Rt);y(ke.$$.fragment,To),To.forEach(o),$o.forEach(o),da=m(lt),Ut=r(lt,"SPAN",{});var Js=i(Ut);ma=n(Js,"Overview"),Js.forEach(o),lt.forEach(o),Co=m(t),U=r(t,"P",{});var Ft=i(U);ha=n(Ft,"The LeViT model was proposed in "),Ee=r(Ft,"A",{href:!0,rel:!0});var Gs=i(Ee);fa=n(Gs,"LeViT: Introducing Convolutions to Vision Transformers"),Gs.forEach(o),pa=n(Ft," by Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Herv\xE9 J\xE9gou, Matthijs Douze. LeViT improves the "),ct=r(Ft,"A",{href:!0});var Ys=i(ct);ga=n(Ys,"Vision Transformer (ViT)"),Ys.forEach(o),ua=n(Ft," 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."),Ft.forEach(o),xo=m(t),dt=r(t,"P",{});var Xs=i(dt);va=n(Xs,"The abstract from the paper is the following:"),Xs.forEach(o),Po=m(t),mt=r(t,"P",{});var Ks=i(mt);Bt=r(Ks,"EM",{});var Qs=i(Bt);_a=n(Qs,`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.`),Qs.forEach(o),Ks.forEach(o),zo=m(t),ne=r(t,"IMG",{src:!0,alt:!0,width:!0}),ko=m(t),ie=r(t,"SMALL",{});var Jo=i(ie);ba=n(Jo,"LeViT Architecture. Taken from the "),ht=r(Jo,"A",{href:!0});var Zs=i(ht);wa=n(Zs,"original paper"),Zs.forEach(o),ya=n(Jo,"."),Jo.forEach(o),Eo=m(t),ft=r(t,"P",{});var en=i(ft);La=n(en,"Tips:"),en.forEach(o),Fo=m(t),k=r(t,"UL",{});var S=i(k);Ht=r(S,"LI",{});var tn=i(Ht);$a=n(tn,"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."),tn.forEach(o),Ta=m(S),J=r(S,"LI",{});var jt=i(J);Ia=n(jt,`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 \u201Cfine-tuning with distillation\u201D,
because one relies on a teacher that has already been fine-tuned on the downstream dataset. In terms of models, (1) corresponds
to `),pt=r(jt,"A",{href:!0});var on=i(pt);Ca=n(on,"LevitForImageClassification"),on.forEach(o),xa=n(jt," and (2) corresponds to "),gt=r(jt,"A",{href:!0});var an=i(gt);Pa=n(an,"LevitForImageClassificationWithTeacher"),an.forEach(o),za=n(jt,"."),jt.forEach(o),ka=m(S),Fe=r(S,"LI",{});var Go=i(Fe);Ea=n(Go,"All released checkpoints were pre-trained and fine-tuned on  "),je=r(Go,"A",{href:!0,rel:!0});var rn=i(je);Fa=n(rn,"ImageNet-1k"),rn.forEach(o),ja=n(Go,`
(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.`),Go.forEach(o),Aa=m(S),C=r(S,"LI",{});var x=i(C);Ma=n(x,"The authors of LeViT released 5 trained LeViT models, which you can directly plug into "),ut=r(x,"A",{href:!0});var sn=i(ut);Na=n(sn,"LevitModel"),sn.forEach(o),qa=n(x," or "),vt=r(x,"A",{href:!0});var nn=i(vt);Va=n(nn,"LevitForImageClassification"),nn.forEach(o),Sa=n(x,`.
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):
`),Jt=r(x,"EM",{});var ln=i(Jt);Da=n(ln,"facebook/levit-128S"),ln.forEach(o),Wa=n(x,", "),Gt=r(x,"EM",{});var cn=i(Gt);Oa=n(cn,"facebook/levit-128"),cn.forEach(o),Ra=n(x,", "),Yt=r(x,"EM",{});var dn=i(Yt);Ua=n(dn,"facebook/levit-192"),dn.forEach(o),Ba=n(x,", "),Xt=r(x,"EM",{});var mn=i(Xt);Ha=n(mn,"facebook/levit-256"),mn.forEach(o),Ja=n(x,` and
`),Kt=r(x,"EM",{});var hn=i(Kt);Ga=n(hn,"facebook/levit-384"),hn.forEach(o),Ya=n(x,". Note that one should use "),_t=r(x,"A",{href:!0});var fn=i(_t);Xa=n(fn,"LevitImageProcessor"),fn.forEach(o),Ka=n(x,` in order to
prepare images for the model.`),x.forEach(o),Qa=m(S),bt=r(S,"LI",{});var Us=i(bt);wt=r(Us,"A",{href:!0});var pn=i(wt);Za=n(pn,"LevitForImageClassificationWithTeacher"),pn.forEach(o),er=n(Us," currently supports only inference and not training or fine-tuning."),Us.forEach(o),tr=m(S),P=r(S,"LI",{});var F=i(P);or=n(F,"You can check out demo notebooks regarding inference as well as fine-tuning on custom data "),Ae=r(F,"A",{href:!0,rel:!0});var gn=i(Ae);ar=n(gn,"here"),gn.forEach(o),rr=n(F,`
(you can just replace `),yt=r(F,"A",{href:!0});var un=i(yt);sr=n(un,"ViTFeatureExtractor"),un.forEach(o),nr=n(F," by "),Lt=r(F,"A",{href:!0});var vn=i(Lt);ir=n(vn,"LevitImageProcessor"),vn.forEach(o),lr=n(F," and "),$t=r(F,"A",{href:!0});var _n=i($t);cr=n(_n,"ViTForImageClassification"),_n.forEach(o),dr=n(F," by "),Tt=r(F,"A",{href:!0});var bn=i(Tt);mr=n(bn,"LevitForImageClassification"),bn.forEach(o),hr=n(F," or "),It=r(F,"A",{href:!0});var wn=i(It);fr=n(wn,"LevitForImageClassificationWithTeacher"),wn.forEach(o),pr=n(F,")."),F.forEach(o),S.forEach(o),jo=m(t),B=r(t,"P",{});var At=i(B);gr=n(At,"This model was contributed by "),Me=r(At,"A",{href:!0,rel:!0});var yn=i(Me);ur=n(yn,"anugunj"),yn.forEach(o),vr=n(At,". The original code can be found "),Ne=r(At,"A",{href:!0,rel:!0});var Ln=i(Ne);_r=n(Ln,"here"),Ln.forEach(o),br=n(At,"."),At.forEach(o),Ao=m(t),G=r(t,"H2",{class:!0});var Yo=i(G);le=r(Yo,"A",{id:!0,class:!0,href:!0});var $n=i(le);Qt=r($n,"SPAN",{});var Tn=i(Qt);y(qe.$$.fragment,Tn),Tn.forEach(o),$n.forEach(o),wr=m(Yo),Zt=r(Yo,"SPAN",{});var In=i(Zt);yr=n(In,"LevitConfig"),In.forEach(o),Yo.forEach(o),Mo=m(t),j=r(t,"DIV",{class:!0});var $e=i(j);y(Ve.$$.fragment,$e),Lr=m($e),Y=r($e,"P",{});var Mt=i(Y);$r=n(Mt,"This is the configuration class to store the configuration of a "),Ct=r(Mt,"A",{href:!0});var Cn=i(Ct);Tr=n(Cn,"LevitModel"),Cn.forEach(o),Ir=n(Mt,`. 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
`),Se=r(Mt,"A",{href:!0,rel:!0});var xn=i(Se);Cr=n(xn,"facebook/levit-128S"),xn.forEach(o),xr=n(Mt," architecture."),Mt.forEach(o),Pr=m($e),X=r($e,"P",{});var Nt=i(X);zr=n(Nt,"Configuration objects inherit from "),xt=r(Nt,"A",{href:!0});var Pn=i(xt);kr=n(Pn,"PretrainedConfig"),Pn.forEach(o),Er=n(Nt,` and can be used to control the model outputs. Read the
documentation from `),Pt=r(Nt,"A",{href:!0});var zn=i(Pt);Fr=n(zn,"PretrainedConfig"),zn.forEach(o),jr=n(Nt," for more information."),Nt.forEach(o),Ar=m($e),y(ce.$$.fragment,$e),$e.forEach(o),No=m(t),K=r(t,"H2",{class:!0});var Xo=i(K);de=r(Xo,"A",{id:!0,class:!0,href:!0});var kn=i(de);eo=r(kn,"SPAN",{});var En=i(eo);y(De.$$.fragment,En),En.forEach(o),kn.forEach(o),Mr=m(Xo),to=r(Xo,"SPAN",{});var Fn=i(to);Nr=n(Fn,"LevitFeatureExtractor"),Fn.forEach(o),Xo.forEach(o),qo=m(t),D=r(t,"DIV",{class:!0});var qt=i(D);y(We.$$.fragment,qt),qr=m(qt),oo=r(qt,"P",{});var jn=i(oo);Vr=n(jn,"Constructs a LeViT image processor."),jn.forEach(o),Sr=m(qt),me=r(qt,"DIV",{class:!0});var Ko=i(me);y(Oe.$$.fragment,Ko),Dr=m(Ko),ao=r(Ko,"P",{});var An=i(ao);Wr=n(An,"Preprocess an image or a batch of images."),An.forEach(o),Ko.forEach(o),qt.forEach(o),Vo=m(t),Q=r(t,"H2",{class:!0});var Qo=i(Q);he=r(Qo,"A",{id:!0,class:!0,href:!0});var Mn=i(he);ro=r(Mn,"SPAN",{});var Nn=i(ro);y(Re.$$.fragment,Nn),Nn.forEach(o),Mn.forEach(o),Or=m(Qo),so=r(Qo,"SPAN",{});var qn=i(so);Rr=n(qn,"LevitImageProcessor"),qn.forEach(o),Qo.forEach(o),So=m(t),W=r(t,"DIV",{class:!0});var Vt=i(W);y(Ue.$$.fragment,Vt),Ur=m(Vt),no=r(Vt,"P",{});var Vn=i(no);Br=n(Vn,"Constructs a LeViT image processor."),Vn.forEach(o),Hr=m(Vt),fe=r(Vt,"DIV",{class:!0});var Zo=i(fe);y(Be.$$.fragment,Zo),Jr=m(Zo),io=r(Zo,"P",{});var Sn=i(io);Gr=n(Sn,"Preprocess an image or batch of images to be used as input to a LeViT model."),Sn.forEach(o),Zo.forEach(o),Vt.forEach(o),Do=m(t),Z=r(t,"H2",{class:!0});var ea=i(Z);pe=r(ea,"A",{id:!0,class:!0,href:!0});var Dn=i(pe);lo=r(Dn,"SPAN",{});var Wn=i(lo);y(He.$$.fragment,Wn),Wn.forEach(o),Dn.forEach(o),Yr=m(ea),co=r(ea,"SPAN",{});var On=i(co);Xr=n(On,"LevitModel"),On.forEach(o),ea.forEach(o),Wo=m(t),O=r(t,"DIV",{class:!0});var St=i(O);y(Je.$$.fragment,St),Kr=m(St),Ge=r(St,"P",{});var ta=i(Ge);Qr=n(ta,`The bare Levit model outputting raw features without any specific head on top.
This model is a PyTorch `),Ye=r(ta,"A",{href:!0,rel:!0});var Rn=i(Ye);Zr=n(Rn,"torch.nn.Module"),Rn.forEach(o),es=n(ta,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ta.forEach(o),ts=m(St),N=r(St,"DIV",{class:!0});var Te=i(N);y(Xe.$$.fragment,Te),os=m(Te),ee=r(Te,"P",{});var Dt=i(ee);as=n(Dt,"The "),zt=r(Dt,"A",{href:!0});var Un=i(zt);rs=n(Un,"LevitModel"),Un.forEach(o),ss=n(Dt," forward method, overrides the "),mo=r(Dt,"CODE",{});var Bn=i(mo);ns=n(Bn,"__call__"),Bn.forEach(o),is=n(Dt," special method."),Dt.forEach(o),ls=m(Te),y(ge.$$.fragment,Te),cs=m(Te),y(ue.$$.fragment,Te),Te.forEach(o),St.forEach(o),Oo=m(t),te=r(t,"H2",{class:!0});var oa=i(te);ve=r(oa,"A",{id:!0,class:!0,href:!0});var Hn=i(ve);ho=r(Hn,"SPAN",{});var Jn=i(ho);y(Ke.$$.fragment,Jn),Jn.forEach(o),Hn.forEach(o),ds=m(oa),fo=r(oa,"SPAN",{});var Gn=i(fo);ms=n(Gn,"LevitForImageClassification"),Gn.forEach(o),oa.forEach(o),Ro=m(t),A=r(t,"DIV",{class:!0});var Ie=i(A);y(Qe.$$.fragment,Ie),hs=m(Ie),po=r(Ie,"P",{});var Yn=i(po);fs=n(Yn,`Levit Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Yn.forEach(o),ps=m(Ie),Ze=r(Ie,"P",{});var aa=i(Ze);gs=n(aa,"This model is a PyTorch "),et=r(aa,"A",{href:!0,rel:!0});var Xn=i(et);us=n(Xn,"torch.nn.Module"),Xn.forEach(o),vs=n(aa,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),aa.forEach(o),_s=m(Ie),q=r(Ie,"DIV",{class:!0});var Ce=i(q);y(tt.$$.fragment,Ce),bs=m(Ce),oe=r(Ce,"P",{});var Wt=i(oe);ws=n(Wt,"The "),kt=r(Wt,"A",{href:!0});var Kn=i(kt);ys=n(Kn,"LevitForImageClassification"),Kn.forEach(o),Ls=n(Wt," forward method, overrides the "),go=r(Wt,"CODE",{});var Qn=i(go);$s=n(Qn,"__call__"),Qn.forEach(o),Ts=n(Wt," special method."),Wt.forEach(o),Is=m(Ce),y(_e.$$.fragment,Ce),Cs=m(Ce),y(be.$$.fragment,Ce),Ce.forEach(o),Ie.forEach(o),Uo=m(t),ae=r(t,"H2",{class:!0});var ra=i(ae);we=r(ra,"A",{id:!0,class:!0,href:!0});var Zn=i(we);uo=r(Zn,"SPAN",{});var ei=i(uo);y(ot.$$.fragment,ei),ei.forEach(o),Zn.forEach(o),xs=m(ra),vo=r(ra,"SPAN",{});var ti=i(vo);Ps=n(ti,"LevitForImageClassificationWithTeacher"),ti.forEach(o),ra.forEach(o),Bo=m(t),M=r(t,"DIV",{class:!0});var xe=i(M);y(at.$$.fragment,xe),zs=m(xe),_o=r(xe,"P",{});var oi=i(_o);ks=n(oi,`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.`),oi.forEach(o),Es=m(xe),rt=r(xe,"P",{});var sa=i(rt);Fs=n(sa,"This model is a PyTorch "),st=r(sa,"A",{href:!0,rel:!0});var ai=i(st);js=n(ai,"torch.nn.Module"),ai.forEach(o),As=n(sa,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),sa.forEach(o),Ms=m(xe),V=r(xe,"DIV",{class:!0});var Pe=i(V);y(nt.$$.fragment,Pe),Ns=m(Pe),re=r(Pe,"P",{});var Ot=i(re);qs=n(Ot,"The "),Et=r(Ot,"A",{href:!0});var ri=i(Et);Vs=n(ri,"LevitForImageClassificationWithTeacher"),ri.forEach(o),Ss=n(Ot," forward method, overrides the "),bo=r(Ot,"CODE",{});var si=i(bo);Ds=n(si,"__call__"),si.forEach(o),Ws=n(Ot," special method."),Ot.forEach(o),Os=m(Pe),y(ye.$$.fragment,Pe),Rs=m(Pe),y(Le.$$.fragment,Pe),Pe.forEach(o),xe.forEach(o),this.h()},h(){c(h,"name","hf:doc:metadata"),c(h,"content",JSON.stringify(wi)),c(g,"id","levit"),c(g,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(g,"href","#levit"),c(v,"class","relative group"),c(se,"id","overview"),c(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(se,"href","#overview"),c(H,"class","relative group"),c(Ee,"href","https://arxiv.org/abs/2104.01136"),c(Ee,"rel","nofollow"),c(ct,"href","vit"),di(ne.src,Hs="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/levit_architecture.png")||c(ne,"src",Hs),c(ne,"alt","drawing"),c(ne,"width","600"),c(ht,"href","https://arxiv.org/abs/2104.01136"),c(pt,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitForImageClassification"),c(gt,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher"),c(je,"href","https://huggingface.co/datasets/imagenet-1k"),c(je,"rel","nofollow"),c(ut,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitModel"),c(vt,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitForImageClassification"),c(_t,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitImageProcessor"),c(wt,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher"),c(Ae,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/VisionTransformer"),c(Ae,"rel","nofollow"),c(yt,"href","/docs/transformers/v4.25.1/en/model_doc/vit#transformers.ViTImageProcessor"),c(Lt,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitImageProcessor"),c($t,"href","/docs/transformers/v4.25.1/en/model_doc/vit#transformers.ViTForImageClassification"),c(Tt,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitForImageClassification"),c(It,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher"),c(Me,"href","https://huggingface.co/anugunj"),c(Me,"rel","nofollow"),c(Ne,"href","https://github.com/facebookresearch/LeViT"),c(Ne,"rel","nofollow"),c(le,"id","transformers.LevitConfig"),c(le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(le,"href","#transformers.LevitConfig"),c(G,"class","relative group"),c(Ct,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitModel"),c(Se,"href","https://huggingface.co/facebook/levit-128S"),c(Se,"rel","nofollow"),c(xt,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(Pt,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(de,"id","transformers.LevitImageProcessor"),c(de,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(de,"href","#transformers.LevitImageProcessor"),c(K,"class","relative group"),c(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(he,"id","transformers.LevitImageProcessor"),c(he,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(he,"href","#transformers.LevitImageProcessor"),c(Q,"class","relative group"),c(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pe,"id","transformers.LevitModel"),c(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(pe,"href","#transformers.LevitModel"),c(Z,"class","relative group"),c(Ye,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ye,"rel","nofollow"),c(zt,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitModel"),c(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ve,"id","transformers.LevitForImageClassification"),c(ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ve,"href","#transformers.LevitForImageClassification"),c(te,"class","relative group"),c(et,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(et,"rel","nofollow"),c(kt,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitForImageClassification"),c(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(we,"id","transformers.LevitForImageClassificationWithTeacher"),c(we,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(we,"href","#transformers.LevitForImageClassificationWithTeacher"),c(ae,"class","relative group"),c(st,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(st,"rel","nofollow"),c(Et,"href","/docs/transformers/v4.25.1/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher"),c(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,f){e(document.head,h),p(t,b,f),p(t,v,f),e(v,g),e(g,_),L(l,_,null),e(v,u),e(v,E),e(E,ca),p(t,Io,f),p(t,H,f),e(H,se),e(se,Rt),L(ke,Rt,null),e(H,da),e(H,Ut),e(Ut,ma),p(t,Co,f),p(t,U,f),e(U,ha),e(U,Ee),e(Ee,fa),e(U,pa),e(U,ct),e(ct,ga),e(U,ua),p(t,xo,f),p(t,dt,f),e(dt,va),p(t,Po,f),p(t,mt,f),e(mt,Bt),e(Bt,_a),p(t,zo,f),p(t,ne,f),p(t,ko,f),p(t,ie,f),e(ie,ba),e(ie,ht),e(ht,wa),e(ie,ya),p(t,Eo,f),p(t,ft,f),e(ft,La),p(t,Fo,f),p(t,k,f),e(k,Ht),e(Ht,$a),e(k,Ta),e(k,J),e(J,Ia),e(J,pt),e(pt,Ca),e(J,xa),e(J,gt),e(gt,Pa),e(J,za),e(k,ka),e(k,Fe),e(Fe,Ea),e(Fe,je),e(je,Fa),e(Fe,ja),e(k,Aa),e(k,C),e(C,Ma),e(C,ut),e(ut,Na),e(C,qa),e(C,vt),e(vt,Va),e(C,Sa),e(C,Jt),e(Jt,Da),e(C,Wa),e(C,Gt),e(Gt,Oa),e(C,Ra),e(C,Yt),e(Yt,Ua),e(C,Ba),e(C,Xt),e(Xt,Ha),e(C,Ja),e(C,Kt),e(Kt,Ga),e(C,Ya),e(C,_t),e(_t,Xa),e(C,Ka),e(k,Qa),e(k,bt),e(bt,wt),e(wt,Za),e(bt,er),e(k,tr),e(k,P),e(P,or),e(P,Ae),e(Ae,ar),e(P,rr),e(P,yt),e(yt,sr),e(P,nr),e(P,Lt),e(Lt,ir),e(P,lr),e(P,$t),e($t,cr),e(P,dr),e(P,Tt),e(Tt,mr),e(P,hr),e(P,It),e(It,fr),e(P,pr),p(t,jo,f),p(t,B,f),e(B,gr),e(B,Me),e(Me,ur),e(B,vr),e(B,Ne),e(Ne,_r),e(B,br),p(t,Ao,f),p(t,G,f),e(G,le),e(le,Qt),L(qe,Qt,null),e(G,wr),e(G,Zt),e(Zt,yr),p(t,Mo,f),p(t,j,f),L(Ve,j,null),e(j,Lr),e(j,Y),e(Y,$r),e(Y,Ct),e(Ct,Tr),e(Y,Ir),e(Y,Se),e(Se,Cr),e(Y,xr),e(j,Pr),e(j,X),e(X,zr),e(X,xt),e(xt,kr),e(X,Er),e(X,Pt),e(Pt,Fr),e(X,jr),e(j,Ar),L(ce,j,null),p(t,No,f),p(t,K,f),e(K,de),e(de,eo),L(De,eo,null),e(K,Mr),e(K,to),e(to,Nr),p(t,qo,f),p(t,D,f),L(We,D,null),e(D,qr),e(D,oo),e(oo,Vr),e(D,Sr),e(D,me),L(Oe,me,null),e(me,Dr),e(me,ao),e(ao,Wr),p(t,Vo,f),p(t,Q,f),e(Q,he),e(he,ro),L(Re,ro,null),e(Q,Or),e(Q,so),e(so,Rr),p(t,So,f),p(t,W,f),L(Ue,W,null),e(W,Ur),e(W,no),e(no,Br),e(W,Hr),e(W,fe),L(Be,fe,null),e(fe,Jr),e(fe,io),e(io,Gr),p(t,Do,f),p(t,Z,f),e(Z,pe),e(pe,lo),L(He,lo,null),e(Z,Yr),e(Z,co),e(co,Xr),p(t,Wo,f),p(t,O,f),L(Je,O,null),e(O,Kr),e(O,Ge),e(Ge,Qr),e(Ge,Ye),e(Ye,Zr),e(Ge,es),e(O,ts),e(O,N),L(Xe,N,null),e(N,os),e(N,ee),e(ee,as),e(ee,zt),e(zt,rs),e(ee,ss),e(ee,mo),e(mo,ns),e(ee,is),e(N,ls),L(ge,N,null),e(N,cs),L(ue,N,null),p(t,Oo,f),p(t,te,f),e(te,ve),e(ve,ho),L(Ke,ho,null),e(te,ds),e(te,fo),e(fo,ms),p(t,Ro,f),p(t,A,f),L(Qe,A,null),e(A,hs),e(A,po),e(po,fs),e(A,ps),e(A,Ze),e(Ze,gs),e(Ze,et),e(et,us),e(Ze,vs),e(A,_s),e(A,q),L(tt,q,null),e(q,bs),e(q,oe),e(oe,ws),e(oe,kt),e(kt,ys),e(oe,Ls),e(oe,go),e(go,$s),e(oe,Ts),e(q,Is),L(_e,q,null),e(q,Cs),L(be,q,null),p(t,Uo,f),p(t,ae,f),e(ae,we),e(we,uo),L(ot,uo,null),e(ae,xs),e(ae,vo),e(vo,Ps),p(t,Bo,f),p(t,M,f),L(at,M,null),e(M,zs),e(M,_o),e(_o,ks),e(M,Es),e(M,rt),e(rt,Fs),e(rt,st),e(st,js),e(rt,As),e(M,Ms),e(M,V),L(nt,V,null),e(V,Ns),e(V,re),e(re,qs),e(re,Et),e(Et,Vs),e(re,Ss),e(re,bo),e(bo,Ds),e(re,Ws),e(V,Os),L(ye,V,null),e(V,Rs),L(Le,V,null),Ho=!0},p(t,[f]){const it={};f&2&&(it.$$scope={dirty:f,ctx:t}),ce.$set(it);const wo={};f&2&&(wo.$$scope={dirty:f,ctx:t}),ge.$set(wo);const yo={};f&2&&(yo.$$scope={dirty:f,ctx:t}),ue.$set(yo);const Lo={};f&2&&(Lo.$$scope={dirty:f,ctx:t}),_e.$set(Lo);const lt={};f&2&&(lt.$$scope={dirty:f,ctx:t}),be.$set(lt);const $o={};f&2&&($o.$$scope={dirty:f,ctx:t}),ye.$set($o);const To={};f&2&&(To.$$scope={dirty:f,ctx:t}),Le.$set(To)},i(t){Ho||($(l.$$.fragment,t),$(ke.$$.fragment,t),$(qe.$$.fragment,t),$(Ve.$$.fragment,t),$(ce.$$.fragment,t),$(De.$$.fragment,t),$(We.$$.fragment,t),$(Oe.$$.fragment,t),$(Re.$$.fragment,t),$(Ue.$$.fragment,t),$(Be.$$.fragment,t),$(He.$$.fragment,t),$(Je.$$.fragment,t),$(Xe.$$.fragment,t),$(ge.$$.fragment,t),$(ue.$$.fragment,t),$(Ke.$$.fragment,t),$(Qe.$$.fragment,t),$(tt.$$.fragment,t),$(_e.$$.fragment,t),$(be.$$.fragment,t),$(ot.$$.fragment,t),$(at.$$.fragment,t),$(nt.$$.fragment,t),$(ye.$$.fragment,t),$(Le.$$.fragment,t),Ho=!0)},o(t){T(l.$$.fragment,t),T(ke.$$.fragment,t),T(qe.$$.fragment,t),T(Ve.$$.fragment,t),T(ce.$$.fragment,t),T(De.$$.fragment,t),T(We.$$.fragment,t),T(Oe.$$.fragment,t),T(Re.$$.fragment,t),T(Ue.$$.fragment,t),T(Be.$$.fragment,t),T(He.$$.fragment,t),T(Je.$$.fragment,t),T(Xe.$$.fragment,t),T(ge.$$.fragment,t),T(ue.$$.fragment,t),T(Ke.$$.fragment,t),T(Qe.$$.fragment,t),T(tt.$$.fragment,t),T(_e.$$.fragment,t),T(be.$$.fragment,t),T(ot.$$.fragment,t),T(at.$$.fragment,t),T(nt.$$.fragment,t),T(ye.$$.fragment,t),T(Le.$$.fragment,t),Ho=!1},d(t){o(h),t&&o(b),t&&o(v),I(l),t&&o(Io),t&&o(H),I(ke),t&&o(Co),t&&o(U),t&&o(xo),t&&o(dt),t&&o(Po),t&&o(mt),t&&o(zo),t&&o(ne),t&&o(ko),t&&o(ie),t&&o(Eo),t&&o(ft),t&&o(Fo),t&&o(k),t&&o(jo),t&&o(B),t&&o(Ao),t&&o(G),I(qe),t&&o(Mo),t&&o(j),I(Ve),I(ce),t&&o(No),t&&o(K),I(De),t&&o(qo),t&&o(D),I(We),I(Oe),t&&o(Vo),t&&o(Q),I(Re),t&&o(So),t&&o(W),I(Ue),I(Be),t&&o(Do),t&&o(Z),I(He),t&&o(Wo),t&&o(O),I(Je),I(Xe),I(ge),I(ue),t&&o(Oo),t&&o(te),I(Ke),t&&o(Ro),t&&o(A),I(Qe),I(tt),I(_e),I(be),t&&o(Uo),t&&o(ae),I(ot),t&&o(Bo),t&&o(M),I(at),I(nt),I(ye),I(Le)}}}const wi={local:"levit",sections:[{local:"overview",title:"Overview"},{local:"transformers.LevitConfig",title:"LevitConfig"},{local:"transformers.LevitImageProcessor",title:"LevitFeatureExtractor"},{local:"transformers.LevitImageProcessor",title:"LevitImageProcessor"},{local:"transformers.LevitModel",title:"LevitModel"},{local:"transformers.LevitForImageClassification",title:"LevitForImageClassification"},{local:"transformers.LevitForImageClassificationWithTeacher",title:"LevitForImageClassificationWithTeacher"}],title:"LeViT"};function yi(z){return mi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Pi extends ni{constructor(h){super();ii(this,h,yi,bi,li,{})}}export{Pi as default,wi as metadata};
