import{S as Qi,i as Yi,s as Di,e as a,k as m,w as y,t as n,M as Hi,c as r,d as o,m as h,a as s,x as w,h as i,b as l,N as Oi,G as e,g as p,y as T,q as $,o as I,B as L,v as Ki,L as ka}from"../../chunks/vendor-hf-doc-builder.js";import{T as Mn}from"../../chunks/Tip-hf-doc-builder.js";import{D as R}from"../../chunks/Docstring-hf-doc-builder.js";import{C as xa}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ie}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ea}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as el}from"../../chunks/PipelineTag-hf-doc-builder.js";function tl(k){let f,b,v,g,_;return g=new xa({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`}}),{c(){f=a("p"),b=n("Example:"),v=m(),y(g.$$.fragment)},l(c){f=r(c,"P",{});var u=s(f);b=i(u,"Example:"),u.forEach(o),v=h(c),w(g.$$.fragment,c)},m(c,u){p(c,f,u),e(f,b),p(c,v,u),T(g,c,u),_=!0},p:ka,i(c){_||($(g.$$.fragment,c),_=!0)},o(c){I(g.$$.fragment,c),_=!1},d(c){c&&o(f),c&&o(v),L(g,c)}}}function ol(k){let f,b,v,g,_;return{c(){f=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a("code"),g=n("Module"),_=n(`
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(c){f=r(c,"P",{});var u=s(f);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=r(u,"CODE",{});var F=s(v);g=i(F,"Module"),F.forEach(o),_=i(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(c,u){p(c,f,u),e(f,b),e(f,v),e(v,g),e(f,_)},d(c){c&&o(f)}}}function al(k){let f,b,v,g,_;return g=new xa({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>]`}}),{c(){f=a("p"),b=n("Example:"),v=m(),y(g.$$.fragment)},l(c){f=r(c,"P",{});var u=s(f);b=i(u,"Example:"),u.forEach(o),v=h(c),w(g.$$.fragment,c)},m(c,u){p(c,f,u),e(f,b),p(c,v,u),T(g,c,u),_=!0},p:ka,i(c){_||($(g.$$.fragment,c),_=!0)},o(c){I(g.$$.fragment,c),_=!1},d(c){c&&o(f),c&&o(v),L(g,c)}}}function rl(k){let f,b,v,g,_;return{c(){f=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a("code"),g=n("Module"),_=n(`
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(c){f=r(c,"P",{});var u=s(f);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=r(u,"CODE",{});var F=s(v);g=i(F,"Module"),F.forEach(o),_=i(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(c,u){p(c,f,u),e(f,b),e(f,v),e(v,g),e(f,_)},d(c){c&&o(f)}}}function sl(k){let f,b,v,g,_;return g=new xa({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`}}),{c(){f=a("p"),b=n("Example:"),v=m(),y(g.$$.fragment)},l(c){f=r(c,"P",{});var u=s(f);b=i(u,"Example:"),u.forEach(o),v=h(c),w(g.$$.fragment,c)},m(c,u){p(c,f,u),e(f,b),p(c,v,u),T(g,c,u),_=!0},p:ka,i(c){_||($(g.$$.fragment,c),_=!0)},o(c){I(g.$$.fragment,c),_=!1},d(c){c&&o(f),c&&o(v),L(g,c)}}}function nl(k){let f,b,v,g,_;return{c(){f=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a("code"),g=n("Module"),_=n(`
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(c){f=r(c,"P",{});var u=s(f);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=r(u,"CODE",{});var F=s(v);g=i(F,"Module"),F.forEach(o),_=i(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(c,u){p(c,f,u),e(f,b),e(f,v),e(v,g),e(f,_)},d(c){c&&o(f)}}}function il(k){let f,b,v,g,_;return g=new xa({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`}}),{c(){f=a("p"),b=n("Example:"),v=m(),y(g.$$.fragment)},l(c){f=r(c,"P",{});var u=s(f);b=i(u,"Example:"),u.forEach(o),v=h(c),w(g.$$.fragment,c)},m(c,u){p(c,f,u),e(f,b),p(c,v,u),T(g,c,u),_=!0},p:ka,i(c){_||($(g.$$.fragment,c),_=!0)},o(c){I(g.$$.fragment,c),_=!1},d(c){c&&o(f),c&&o(v),L(g,c)}}}function ll(k){let f,b,v,g,_,c,u,F,Fa,Vo,X,le,oo,We,ja,ao,za,Zo,S,Wa,Pe,Pa,Ua,_t,Ja,Na,Ao,bt,Va,Ro,yt,ro,Za,So,ce,Cn,Go,de,Aa,wt,Ra,Sa,Bo,Tt,Ga,Xo,x,so,Ba,Xa,q,qa,$t,Qa,Ya,It,Da,Ha,Oa,Ue,Ka,Je,er,tr,or,M,ar,Lt,rr,sr,Mt,nr,ir,no,lr,cr,io,dr,mr,lo,hr,fr,co,pr,gr,mo,ur,vr,Ct,_r,br,yr,Et,kt,wr,Tr,$r,E,Ir,Ne,Lr,Mr,xt,Cr,Er,Ft,kr,xr,jt,Fr,jr,zt,zr,Wr,Wt,Pr,Ur,qo,G,Jr,Ve,Nr,Vr,Ze,Zr,Ar,Qo,Q,me,ho,Ae,Rr,fo,Sr,Yo,Pt,Gr,Do,Re,Ho,he,B,Ut,Br,Xr,Se,qr,Qr,Ge,Yr,Dr,Hr,Jt,Or,Nt,Kr,Oo,Vt,es,Ko,Y,fe,po,Be,ts,go,os,ea,z,Xe,as,D,rs,Zt,ss,ns,qe,is,ls,cs,H,ds,At,ms,hs,Rt,fs,ps,gs,pe,ta,O,ge,uo,Qe,us,vo,vs,oa,K,Ye,_s,ue,De,bs,_o,ys,aa,ee,ve,bo,He,ws,yo,Ts,ra,Z,Oe,$s,wo,Is,Ls,_e,Ke,Ms,To,Cs,sa,te,be,$o,et,Es,Io,ks,na,A,tt,xs,ot,Fs,at,js,zs,Ws,U,rt,Ps,oe,Us,St,Js,Ns,Lo,Vs,Zs,As,ye,Rs,we,ia,ae,Te,Mo,st,Ss,Co,Gs,la,W,nt,Bs,Eo,Xs,qs,it,Qs,lt,Ys,Ds,Hs,J,ct,Os,re,Ks,Gt,en,tn,ko,on,an,rn,$e,sn,Ie,ca,se,Le,xo,dt,nn,Fo,ln,da,P,mt,cn,jo,dn,mn,ht,hn,ft,fn,pn,gn,N,pt,un,ne,vn,Bt,_n,bn,zo,yn,wn,Tn,Me,$n,Ce,ma;return c=new ie({}),We=new ie({}),Ae=new ie({}),Re=new el({props:{pipeline:"image-classification"}}),Be=new ie({}),Xe=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.31.0/src/transformers/models/levit/configuration_levit.py#L35"}}),pe=new Ea({props:{anchor:"transformers.LevitConfig.example",$$slots:{default:[tl]},$$scope:{ctx:k}}}),Qe=new ie({}),Ye=new R({props:{name:"class transformers.LevitFeatureExtractor",anchor:"transformers.LevitFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/levit/feature_extraction_levit.py#L26"}}),De=new R({props:{name:"__call__",anchor:"transformers.LevitFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/image_processing_utils.py#L492"}}),He=new ie({}),Oe=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.31.0/src/transformers/models/levit/image_processing_levit.py#L46"}}),Ke=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.31.0/src/transformers/models/levit/image_processing_levit.py#L230"}}),et=new ie({}),tt=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.31.0/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.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/levit/modeling_levit.py#L544"}}),rt=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.31.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.31.0/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/levit/modeling_levit.py#L553",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.31.0/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>
`}}),ye=new Mn({props:{$$slots:{default:[ol]},$$scope:{ctx:k}}}),we=new Ea({props:{anchor:"transformers.LevitModel.forward.example",$$slots:{default:[al]},$$scope:{ctx:k}}}),st=new ie({}),nt=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.31.0/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.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/levit/modeling_levit.py#L604"}}),ct=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.31.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.31.0/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__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.31.0/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.31.0/src/transformers/models/levit/modeling_levit.py#L621",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/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.31.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$e=new Mn({props:{$$slots:{default:[rl]},$$scope:{ctx:k}}}),Ie=new Ea({props:{anchor:"transformers.LevitForImageClassification.forward.example",$$slots:{default:[sl]},$$scope:{ctx:k}}}),dt=new ie({}),mt=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.31.0/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.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/levit/modeling_levit.py#L691"}}),pt=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.31.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.31.0/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__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.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/levit/modeling_levit.py#L713",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.31.0/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>
`}}),Me=new Mn({props:{$$slots:{default:[nl]},$$scope:{ctx:k}}}),Ce=new Ea({props:{anchor:"transformers.LevitForImageClassificationWithTeacher.forward.example",$$slots:{default:[il]},$$scope:{ctx:k}}}),{c(){f=a("meta"),b=m(),v=a("h1"),g=a("a"),_=a("span"),y(c.$$.fragment),u=m(),F=a("span"),Fa=n("LeViT"),Vo=m(),X=a("h2"),le=a("a"),oo=a("span"),y(We.$$.fragment),ja=m(),ao=a("span"),za=n("Overview"),Zo=m(),S=a("p"),Wa=n("The LeViT model was proposed in "),Pe=a("a"),Pa=n("LeViT: Introducing Convolutions to Vision Transformers"),Ua=n(" by Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Herv\xE9 J\xE9gou, Matthijs Douze. LeViT improves the "),_t=a("a"),Ja=n("Vision Transformer (ViT)"),Na=n(" 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."),Ao=m(),bt=a("p"),Va=n("The abstract from the paper is the following:"),Ro=m(),yt=a("p"),ro=a("em"),Za=n(`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.`),So=m(),ce=a("img"),Go=m(),de=a("small"),Aa=n("LeViT Architecture. Taken from the "),wt=a("a"),Ra=n("original paper"),Sa=n("."),Bo=m(),Tt=a("p"),Ga=n("Tips:"),Xo=m(),x=a("ul"),so=a("li"),Ba=n("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."),Xa=m(),q=a("li"),qa=n(`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 `),$t=a("a"),Qa=n("LevitForImageClassification"),Ya=n(" and (2) corresponds to "),It=a("a"),Da=n("LevitForImageClassificationWithTeacher"),Ha=n("."),Oa=m(),Ue=a("li"),Ka=n("All released checkpoints were pre-trained and fine-tuned on  "),Je=a("a"),er=n("ImageNet-1k"),tr=n(`
(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.`),or=m(),M=a("li"),ar=n("The authors of LeViT released 5 trained LeViT models, which you can directly plug into "),Lt=a("a"),rr=n("LevitModel"),sr=n(" or "),Mt=a("a"),nr=n("LevitForImageClassification"),ir=n(`.
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):
`),no=a("em"),lr=n("facebook/levit-128S"),cr=n(", "),io=a("em"),dr=n("facebook/levit-128"),mr=n(", "),lo=a("em"),hr=n("facebook/levit-192"),fr=n(", "),co=a("em"),pr=n("facebook/levit-256"),gr=n(` and
`),mo=a("em"),ur=n("facebook/levit-384"),vr=n(". Note that one should use "),Ct=a("a"),_r=n("LevitImageProcessor"),br=n(` in order to
prepare images for the model.`),yr=m(),Et=a("li"),kt=a("a"),wr=n("LevitForImageClassificationWithTeacher"),Tr=n(" currently supports only inference and not training or fine-tuning."),$r=m(),E=a("li"),Ir=n("You can check out demo notebooks regarding inference as well as fine-tuning on custom data "),Ne=a("a"),Lr=n("here"),Mr=n(`
(you can just replace `),xt=a("a"),Cr=n("ViTFeatureExtractor"),Er=n(" by "),Ft=a("a"),kr=n("LevitImageProcessor"),xr=n(" and "),jt=a("a"),Fr=n("ViTForImageClassification"),jr=n(" by "),zt=a("a"),zr=n("LevitForImageClassification"),Wr=n(" or "),Wt=a("a"),Pr=n("LevitForImageClassificationWithTeacher"),Ur=n(")."),qo=m(),G=a("p"),Jr=n("This model was contributed by "),Ve=a("a"),Nr=n("anugunj"),Vr=n(". The original code can be found "),Ze=a("a"),Zr=n("here"),Ar=n("."),Qo=m(),Q=a("h2"),me=a("a"),ho=a("span"),y(Ae.$$.fragment),Rr=m(),fo=a("span"),Sr=n("Resources"),Yo=m(),Pt=a("p"),Gr=n("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with LeViT."),Do=m(),y(Re.$$.fragment),Ho=m(),he=a("ul"),B=a("li"),Ut=a("a"),Br=n("LevitForImageClassification"),Xr=n(" is supported by this "),Se=a("a"),qr=n("example script"),Qr=n(" and "),Ge=a("a"),Yr=n("notebook"),Dr=n("."),Hr=m(),Jt=a("li"),Or=n("See also: "),Nt=a("a"),Kr=n("Image classification task guide"),Oo=m(),Vt=a("p"),es=n("If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Ko=m(),Y=a("h2"),fe=a("a"),po=a("span"),y(Be.$$.fragment),ts=m(),go=a("span"),os=n("LevitConfig"),ea=m(),z=a("div"),y(Xe.$$.fragment),as=m(),D=a("p"),rs=n("This is the configuration class to store the configuration of a "),Zt=a("a"),ss=n("LevitModel"),ns=n(`. 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
`),qe=a("a"),is=n("facebook/levit-128S"),ls=n(" architecture."),cs=m(),H=a("p"),ds=n("Configuration objects inherit from "),At=a("a"),ms=n("PretrainedConfig"),hs=n(` and can be used to control the model outputs. Read the
documentation from `),Rt=a("a"),fs=n("PretrainedConfig"),ps=n(" for more information."),gs=m(),y(pe.$$.fragment),ta=m(),O=a("h2"),ge=a("a"),uo=a("span"),y(Qe.$$.fragment),us=m(),vo=a("span"),vs=n("LevitFeatureExtractor"),oa=m(),K=a("div"),y(Ye.$$.fragment),_s=m(),ue=a("div"),y(De.$$.fragment),bs=m(),_o=a("p"),ys=n("Preprocess an image or a batch of images."),aa=m(),ee=a("h2"),ve=a("a"),bo=a("span"),y(He.$$.fragment),ws=m(),yo=a("span"),Ts=n("LevitImageProcessor"),ra=m(),Z=a("div"),y(Oe.$$.fragment),$s=m(),wo=a("p"),Is=n("Constructs a LeViT image processor."),Ls=m(),_e=a("div"),y(Ke.$$.fragment),Ms=m(),To=a("p"),Cs=n("Preprocess an image or batch of images to be used as input to a LeViT model."),sa=m(),te=a("h2"),be=a("a"),$o=a("span"),y(et.$$.fragment),Es=m(),Io=a("span"),ks=n("LevitModel"),na=m(),A=a("div"),y(tt.$$.fragment),xs=m(),ot=a("p"),Fs=n(`The bare Levit model outputting raw features without any specific head on top.
This model is a PyTorch `),at=a("a"),js=n("torch.nn.Module"),zs=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ws=m(),U=a("div"),y(rt.$$.fragment),Ps=m(),oe=a("p"),Us=n("The "),St=a("a"),Js=n("LevitModel"),Ns=n(" forward method, overrides the "),Lo=a("code"),Vs=n("__call__"),Zs=n(" special method."),As=m(),y(ye.$$.fragment),Rs=m(),y(we.$$.fragment),ia=m(),ae=a("h2"),Te=a("a"),Mo=a("span"),y(st.$$.fragment),Ss=m(),Co=a("span"),Gs=n("LevitForImageClassification"),la=m(),W=a("div"),y(nt.$$.fragment),Bs=m(),Eo=a("p"),Xs=n(`Levit Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),qs=m(),it=a("p"),Qs=n("This model is a PyTorch "),lt=a("a"),Ys=n("torch.nn.Module"),Ds=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Hs=m(),J=a("div"),y(ct.$$.fragment),Os=m(),re=a("p"),Ks=n("The "),Gt=a("a"),en=n("LevitForImageClassification"),tn=n(" forward method, overrides the "),ko=a("code"),on=n("__call__"),an=n(" special method."),rn=m(),y($e.$$.fragment),sn=m(),y(Ie.$$.fragment),ca=m(),se=a("h2"),Le=a("a"),xo=a("span"),y(dt.$$.fragment),nn=m(),Fo=a("span"),ln=n("LevitForImageClassificationWithTeacher"),da=m(),P=a("div"),y(mt.$$.fragment),cn=m(),jo=a("p"),dn=n(`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.`),mn=m(),ht=a("p"),hn=n("This model is a PyTorch "),ft=a("a"),fn=n("torch.nn.Module"),pn=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),gn=m(),N=a("div"),y(pt.$$.fragment),un=m(),ne=a("p"),vn=n("The "),Bt=a("a"),_n=n("LevitForImageClassificationWithTeacher"),bn=n(" forward method, overrides the "),zo=a("code"),yn=n("__call__"),wn=n(" special method."),Tn=m(),y(Me.$$.fragment),$n=m(),y(Ce.$$.fragment),this.h()},l(t){const d=Hi('[data-svelte="svelte-1phssyn"]',document.head);f=r(d,"META",{name:!0,content:!0}),d.forEach(o),b=h(t),v=r(t,"H1",{class:!0});var gt=s(v);g=r(gt,"A",{id:!0,class:!0,href:!0});var Wo=s(g);_=r(Wo,"SPAN",{});var Po=s(_);w(c.$$.fragment,Po),Po.forEach(o),Wo.forEach(o),u=h(gt),F=r(gt,"SPAN",{});var Uo=s(F);Fa=i(Uo,"LeViT"),Uo.forEach(o),gt.forEach(o),Vo=h(t),X=r(t,"H2",{class:!0});var ut=s(X);le=r(ut,"A",{id:!0,class:!0,href:!0});var Jo=s(le);oo=r(Jo,"SPAN",{});var No=s(oo);w(We.$$.fragment,No),No.forEach(o),Jo.forEach(o),ja=h(ut),ao=r(ut,"SPAN",{});var En=s(ao);za=i(En,"Overview"),En.forEach(o),ut.forEach(o),Zo=h(t),S=r(t,"P",{});var Xt=s(S);Wa=i(Xt,"The LeViT model was proposed in "),Pe=r(Xt,"A",{href:!0,rel:!0});var kn=s(Pe);Pa=i(kn,"LeViT: Introducing Convolutions to Vision Transformers"),kn.forEach(o),Ua=i(Xt," by Ben Graham, Alaaeldin El-Nouby, Hugo Touvron, Pierre Stock, Armand Joulin, Herv\xE9 J\xE9gou, Matthijs Douze. LeViT improves the "),_t=r(Xt,"A",{href:!0});var xn=s(_t);Ja=i(xn,"Vision Transformer (ViT)"),xn.forEach(o),Na=i(Xt," 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."),Xt.forEach(o),Ao=h(t),bt=r(t,"P",{});var Fn=s(bt);Va=i(Fn,"The abstract from the paper is the following:"),Fn.forEach(o),Ro=h(t),yt=r(t,"P",{});var jn=s(yt);ro=r(jn,"EM",{});var zn=s(ro);Za=i(zn,`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.`),zn.forEach(o),jn.forEach(o),So=h(t),ce=r(t,"IMG",{src:!0,alt:!0,width:!0}),Go=h(t),de=r(t,"SMALL",{});var ha=s(de);Aa=i(ha,"LeViT Architecture. Taken from the "),wt=r(ha,"A",{href:!0});var Wn=s(wt);Ra=i(Wn,"original paper"),Wn.forEach(o),Sa=i(ha,"."),ha.forEach(o),Bo=h(t),Tt=r(t,"P",{});var Pn=s(Tt);Ga=i(Pn,"Tips:"),Pn.forEach(o),Xo=h(t),x=r(t,"UL",{});var V=s(x);so=r(V,"LI",{});var Un=s(so);Ba=i(Un,"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."),Un.forEach(o),Xa=h(V),q=r(V,"LI",{});var qt=s(q);qa=i(qt,`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 `),$t=r(qt,"A",{href:!0});var Jn=s($t);Qa=i(Jn,"LevitForImageClassification"),Jn.forEach(o),Ya=i(qt," and (2) corresponds to "),It=r(qt,"A",{href:!0});var Nn=s(It);Da=i(Nn,"LevitForImageClassificationWithTeacher"),Nn.forEach(o),Ha=i(qt,"."),qt.forEach(o),Oa=h(V),Ue=r(V,"LI",{});var fa=s(Ue);Ka=i(fa,"All released checkpoints were pre-trained and fine-tuned on  "),Je=r(fa,"A",{href:!0,rel:!0});var Vn=s(Je);er=i(Vn,"ImageNet-1k"),Vn.forEach(o),tr=i(fa,`
(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.`),fa.forEach(o),or=h(V),M=r(V,"LI",{});var C=s(M);ar=i(C,"The authors of LeViT released 5 trained LeViT models, which you can directly plug into "),Lt=r(C,"A",{href:!0});var Zn=s(Lt);rr=i(Zn,"LevitModel"),Zn.forEach(o),sr=i(C," or "),Mt=r(C,"A",{href:!0});var An=s(Mt);nr=i(An,"LevitForImageClassification"),An.forEach(o),ir=i(C,`.
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):
`),no=r(C,"EM",{});var Rn=s(no);lr=i(Rn,"facebook/levit-128S"),Rn.forEach(o),cr=i(C,", "),io=r(C,"EM",{});var Sn=s(io);dr=i(Sn,"facebook/levit-128"),Sn.forEach(o),mr=i(C,", "),lo=r(C,"EM",{});var Gn=s(lo);hr=i(Gn,"facebook/levit-192"),Gn.forEach(o),fr=i(C,", "),co=r(C,"EM",{});var Bn=s(co);pr=i(Bn,"facebook/levit-256"),Bn.forEach(o),gr=i(C,` and
`),mo=r(C,"EM",{});var Xn=s(mo);ur=i(Xn,"facebook/levit-384"),Xn.forEach(o),vr=i(C,". Note that one should use "),Ct=r(C,"A",{href:!0});var qn=s(Ct);_r=i(qn,"LevitImageProcessor"),qn.forEach(o),br=i(C,` in order to
prepare images for the model.`),C.forEach(o),yr=h(V),Et=r(V,"LI",{});var In=s(Et);kt=r(In,"A",{href:!0});var Qn=s(kt);wr=i(Qn,"LevitForImageClassificationWithTeacher"),Qn.forEach(o),Tr=i(In," currently supports only inference and not training or fine-tuning."),In.forEach(o),$r=h(V),E=r(V,"LI",{});var j=s(E);Ir=i(j,"You can check out demo notebooks regarding inference as well as fine-tuning on custom data "),Ne=r(j,"A",{href:!0,rel:!0});var Yn=s(Ne);Lr=i(Yn,"here"),Yn.forEach(o),Mr=i(j,`
(you can just replace `),xt=r(j,"A",{href:!0});var Dn=s(xt);Cr=i(Dn,"ViTFeatureExtractor"),Dn.forEach(o),Er=i(j," by "),Ft=r(j,"A",{href:!0});var Hn=s(Ft);kr=i(Hn,"LevitImageProcessor"),Hn.forEach(o),xr=i(j," and "),jt=r(j,"A",{href:!0});var On=s(jt);Fr=i(On,"ViTForImageClassification"),On.forEach(o),jr=i(j," by "),zt=r(j,"A",{href:!0});var Kn=s(zt);zr=i(Kn,"LevitForImageClassification"),Kn.forEach(o),Wr=i(j," or "),Wt=r(j,"A",{href:!0});var ei=s(Wt);Pr=i(ei,"LevitForImageClassificationWithTeacher"),ei.forEach(o),Ur=i(j,")."),j.forEach(o),V.forEach(o),qo=h(t),G=r(t,"P",{});var Qt=s(G);Jr=i(Qt,"This model was contributed by "),Ve=r(Qt,"A",{href:!0,rel:!0});var ti=s(Ve);Nr=i(ti,"anugunj"),ti.forEach(o),Vr=i(Qt,". The original code can be found "),Ze=r(Qt,"A",{href:!0,rel:!0});var oi=s(Ze);Zr=i(oi,"here"),oi.forEach(o),Ar=i(Qt,"."),Qt.forEach(o),Qo=h(t),Q=r(t,"H2",{class:!0});var pa=s(Q);me=r(pa,"A",{id:!0,class:!0,href:!0});var ai=s(me);ho=r(ai,"SPAN",{});var ri=s(ho);w(Ae.$$.fragment,ri),ri.forEach(o),ai.forEach(o),Rr=h(pa),fo=r(pa,"SPAN",{});var si=s(fo);Sr=i(si,"Resources"),si.forEach(o),pa.forEach(o),Yo=h(t),Pt=r(t,"P",{});var ni=s(Pt);Gr=i(ni,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with LeViT."),ni.forEach(o),Do=h(t),w(Re.$$.fragment,t),Ho=h(t),he=r(t,"UL",{});var ga=s(he);B=r(ga,"LI",{});var vt=s(B);Ut=r(vt,"A",{href:!0});var ii=s(Ut);Br=i(ii,"LevitForImageClassification"),ii.forEach(o),Xr=i(vt," is supported by this "),Se=r(vt,"A",{href:!0,rel:!0});var li=s(Se);qr=i(li,"example script"),li.forEach(o),Qr=i(vt," and "),Ge=r(vt,"A",{href:!0,rel:!0});var ci=s(Ge);Yr=i(ci,"notebook"),ci.forEach(o),Dr=i(vt,"."),vt.forEach(o),Hr=h(ga),Jt=r(ga,"LI",{});var Ln=s(Jt);Or=i(Ln,"See also: "),Nt=r(Ln,"A",{href:!0});var di=s(Nt);Kr=i(di,"Image classification task guide"),di.forEach(o),Ln.forEach(o),ga.forEach(o),Oo=h(t),Vt=r(t,"P",{});var mi=s(Vt);es=i(mi,"If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),mi.forEach(o),Ko=h(t),Y=r(t,"H2",{class:!0});var ua=s(Y);fe=r(ua,"A",{id:!0,class:!0,href:!0});var hi=s(fe);po=r(hi,"SPAN",{});var fi=s(po);w(Be.$$.fragment,fi),fi.forEach(o),hi.forEach(o),ts=h(ua),go=r(ua,"SPAN",{});var pi=s(go);os=i(pi,"LevitConfig"),pi.forEach(o),ua.forEach(o),ea=h(t),z=r(t,"DIV",{class:!0});var Ee=s(z);w(Xe.$$.fragment,Ee),as=h(Ee),D=r(Ee,"P",{});var Yt=s(D);rs=i(Yt,"This is the configuration class to store the configuration of a "),Zt=r(Yt,"A",{href:!0});var gi=s(Zt);ss=i(gi,"LevitModel"),gi.forEach(o),ns=i(Yt,`. 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
`),qe=r(Yt,"A",{href:!0,rel:!0});var ui=s(qe);is=i(ui,"facebook/levit-128S"),ui.forEach(o),ls=i(Yt," architecture."),Yt.forEach(o),cs=h(Ee),H=r(Ee,"P",{});var Dt=s(H);ds=i(Dt,"Configuration objects inherit from "),At=r(Dt,"A",{href:!0});var vi=s(At);ms=i(vi,"PretrainedConfig"),vi.forEach(o),hs=i(Dt,` and can be used to control the model outputs. Read the
documentation from `),Rt=r(Dt,"A",{href:!0});var _i=s(Rt);fs=i(_i,"PretrainedConfig"),_i.forEach(o),ps=i(Dt," for more information."),Dt.forEach(o),gs=h(Ee),w(pe.$$.fragment,Ee),Ee.forEach(o),ta=h(t),O=r(t,"H2",{class:!0});var va=s(O);ge=r(va,"A",{id:!0,class:!0,href:!0});var bi=s(ge);uo=r(bi,"SPAN",{});var yi=s(uo);w(Qe.$$.fragment,yi),yi.forEach(o),bi.forEach(o),us=h(va),vo=r(va,"SPAN",{});var wi=s(vo);vs=i(wi,"LevitFeatureExtractor"),wi.forEach(o),va.forEach(o),oa=h(t),K=r(t,"DIV",{class:!0});var _a=s(K);w(Ye.$$.fragment,_a),_s=h(_a),ue=r(_a,"DIV",{class:!0});var ba=s(ue);w(De.$$.fragment,ba),bs=h(ba),_o=r(ba,"P",{});var Ti=s(_o);ys=i(Ti,"Preprocess an image or a batch of images."),Ti.forEach(o),ba.forEach(o),_a.forEach(o),aa=h(t),ee=r(t,"H2",{class:!0});var ya=s(ee);ve=r(ya,"A",{id:!0,class:!0,href:!0});var $i=s(ve);bo=r($i,"SPAN",{});var Ii=s(bo);w(He.$$.fragment,Ii),Ii.forEach(o),$i.forEach(o),ws=h(ya),yo=r(ya,"SPAN",{});var Li=s(yo);Ts=i(Li,"LevitImageProcessor"),Li.forEach(o),ya.forEach(o),ra=h(t),Z=r(t,"DIV",{class:!0});var Ht=s(Z);w(Oe.$$.fragment,Ht),$s=h(Ht),wo=r(Ht,"P",{});var Mi=s(wo);Is=i(Mi,"Constructs a LeViT image processor."),Mi.forEach(o),Ls=h(Ht),_e=r(Ht,"DIV",{class:!0});var wa=s(_e);w(Ke.$$.fragment,wa),Ms=h(wa),To=r(wa,"P",{});var Ci=s(To);Cs=i(Ci,"Preprocess an image or batch of images to be used as input to a LeViT model."),Ci.forEach(o),wa.forEach(o),Ht.forEach(o),sa=h(t),te=r(t,"H2",{class:!0});var Ta=s(te);be=r(Ta,"A",{id:!0,class:!0,href:!0});var Ei=s(be);$o=r(Ei,"SPAN",{});var ki=s($o);w(et.$$.fragment,ki),ki.forEach(o),Ei.forEach(o),Es=h(Ta),Io=r(Ta,"SPAN",{});var xi=s(Io);ks=i(xi,"LevitModel"),xi.forEach(o),Ta.forEach(o),na=h(t),A=r(t,"DIV",{class:!0});var Ot=s(A);w(tt.$$.fragment,Ot),xs=h(Ot),ot=r(Ot,"P",{});var $a=s(ot);Fs=i($a,`The bare Levit model outputting raw features without any specific head on top.
This model is a PyTorch `),at=r($a,"A",{href:!0,rel:!0});var Fi=s(at);js=i(Fi,"torch.nn.Module"),Fi.forEach(o),zs=i($a,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),$a.forEach(o),Ws=h(Ot),U=r(Ot,"DIV",{class:!0});var ke=s(U);w(rt.$$.fragment,ke),Ps=h(ke),oe=r(ke,"P",{});var Kt=s(oe);Us=i(Kt,"The "),St=r(Kt,"A",{href:!0});var ji=s(St);Js=i(ji,"LevitModel"),ji.forEach(o),Ns=i(Kt," forward method, overrides the "),Lo=r(Kt,"CODE",{});var zi=s(Lo);Vs=i(zi,"__call__"),zi.forEach(o),Zs=i(Kt," special method."),Kt.forEach(o),As=h(ke),w(ye.$$.fragment,ke),Rs=h(ke),w(we.$$.fragment,ke),ke.forEach(o),Ot.forEach(o),ia=h(t),ae=r(t,"H2",{class:!0});var Ia=s(ae);Te=r(Ia,"A",{id:!0,class:!0,href:!0});var Wi=s(Te);Mo=r(Wi,"SPAN",{});var Pi=s(Mo);w(st.$$.fragment,Pi),Pi.forEach(o),Wi.forEach(o),Ss=h(Ia),Co=r(Ia,"SPAN",{});var Ui=s(Co);Gs=i(Ui,"LevitForImageClassification"),Ui.forEach(o),Ia.forEach(o),la=h(t),W=r(t,"DIV",{class:!0});var xe=s(W);w(nt.$$.fragment,xe),Bs=h(xe),Eo=r(xe,"P",{});var Ji=s(Eo);Xs=i(Ji,`Levit Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Ji.forEach(o),qs=h(xe),it=r(xe,"P",{});var La=s(it);Qs=i(La,"This model is a PyTorch "),lt=r(La,"A",{href:!0,rel:!0});var Ni=s(lt);Ys=i(Ni,"torch.nn.Module"),Ni.forEach(o),Ds=i(La,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),La.forEach(o),Hs=h(xe),J=r(xe,"DIV",{class:!0});var Fe=s(J);w(ct.$$.fragment,Fe),Os=h(Fe),re=r(Fe,"P",{});var eo=s(re);Ks=i(eo,"The "),Gt=r(eo,"A",{href:!0});var Vi=s(Gt);en=i(Vi,"LevitForImageClassification"),Vi.forEach(o),tn=i(eo," forward method, overrides the "),ko=r(eo,"CODE",{});var Zi=s(ko);on=i(Zi,"__call__"),Zi.forEach(o),an=i(eo," special method."),eo.forEach(o),rn=h(Fe),w($e.$$.fragment,Fe),sn=h(Fe),w(Ie.$$.fragment,Fe),Fe.forEach(o),xe.forEach(o),ca=h(t),se=r(t,"H2",{class:!0});var Ma=s(se);Le=r(Ma,"A",{id:!0,class:!0,href:!0});var Ai=s(Le);xo=r(Ai,"SPAN",{});var Ri=s(xo);w(dt.$$.fragment,Ri),Ri.forEach(o),Ai.forEach(o),nn=h(Ma),Fo=r(Ma,"SPAN",{});var Si=s(Fo);ln=i(Si,"LevitForImageClassificationWithTeacher"),Si.forEach(o),Ma.forEach(o),da=h(t),P=r(t,"DIV",{class:!0});var je=s(P);w(mt.$$.fragment,je),cn=h(je),jo=r(je,"P",{});var Gi=s(jo);dn=i(Gi,`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.`),Gi.forEach(o),mn=h(je),ht=r(je,"P",{});var Ca=s(ht);hn=i(Ca,"This model is a PyTorch "),ft=r(Ca,"A",{href:!0,rel:!0});var Bi=s(ft);fn=i(Bi,"torch.nn.Module"),Bi.forEach(o),pn=i(Ca,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ca.forEach(o),gn=h(je),N=r(je,"DIV",{class:!0});var ze=s(N);w(pt.$$.fragment,ze),un=h(ze),ne=r(ze,"P",{});var to=s(ne);vn=i(to,"The "),Bt=r(to,"A",{href:!0});var Xi=s(Bt);_n=i(Xi,"LevitForImageClassificationWithTeacher"),Xi.forEach(o),bn=i(to," forward method, overrides the "),zo=r(to,"CODE",{});var qi=s(zo);yn=i(qi,"__call__"),qi.forEach(o),wn=i(to," special method."),to.forEach(o),Tn=h(ze),w(Me.$$.fragment,ze),$n=h(ze),w(Ce.$$.fragment,ze),ze.forEach(o),je.forEach(o),this.h()},h(){l(f,"name","hf:doc:metadata"),l(f,"content",JSON.stringify(cl)),l(g,"id","levit"),l(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"),l(g,"href","#levit"),l(v,"class","relative group"),l(le,"id","overview"),l(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"),l(le,"href","#overview"),l(X,"class","relative group"),l(Pe,"href","https://arxiv.org/abs/2104.01136"),l(Pe,"rel","nofollow"),l(_t,"href","vit"),Oi(ce.src,Cn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/levit_architecture.png")||l(ce,"src",Cn),l(ce,"alt","drawing"),l(ce,"width","600"),l(wt,"href","https://arxiv.org/abs/2104.01136"),l($t,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitForImageClassification"),l(It,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher"),l(Je,"href","https://huggingface.co/datasets/imagenet-1k"),l(Je,"rel","nofollow"),l(Lt,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitModel"),l(Mt,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitForImageClassification"),l(Ct,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitImageProcessor"),l(kt,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher"),l(Ne,"href","https://github.com/NielsRogge/Transformers-Tutorials/tree/master/VisionTransformer"),l(Ne,"rel","nofollow"),l(xt,"href","/docs/transformers/v4.31.0/en/model_doc/vit#transformers.ViTFeatureExtractor"),l(Ft,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitImageProcessor"),l(jt,"href","/docs/transformers/v4.31.0/en/model_doc/vit#transformers.ViTForImageClassification"),l(zt,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitForImageClassification"),l(Wt,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher"),l(Ve,"href","https://huggingface.co/anugunj"),l(Ve,"rel","nofollow"),l(Ze,"href","https://github.com/facebookresearch/LeViT"),l(Ze,"rel","nofollow"),l(me,"id","resources"),l(me,"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"),l(me,"href","#resources"),l(Q,"class","relative group"),l(Ut,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitForImageClassification"),l(Se,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification"),l(Se,"rel","nofollow"),l(Ge,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb"),l(Ge,"rel","nofollow"),l(Nt,"href","../tasks/image_classification"),l(fe,"id","transformers.LevitConfig"),l(fe,"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"),l(fe,"href","#transformers.LevitConfig"),l(Y,"class","relative group"),l(Zt,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitModel"),l(qe,"href","https://huggingface.co/facebook/levit-128S"),l(qe,"rel","nofollow"),l(At,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(Rt,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ge,"id","transformers.LevitFeatureExtractor"),l(ge,"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"),l(ge,"href","#transformers.LevitFeatureExtractor"),l(O,"class","relative group"),l(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ve,"id","transformers.LevitImageProcessor"),l(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"),l(ve,"href","#transformers.LevitImageProcessor"),l(ee,"class","relative group"),l(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(be,"id","transformers.LevitModel"),l(be,"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"),l(be,"href","#transformers.LevitModel"),l(te,"class","relative group"),l(at,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(at,"rel","nofollow"),l(St,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitModel"),l(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Te,"id","transformers.LevitForImageClassification"),l(Te,"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"),l(Te,"href","#transformers.LevitForImageClassification"),l(ae,"class","relative group"),l(lt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(lt,"rel","nofollow"),l(Gt,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitForImageClassification"),l(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Le,"id","transformers.LevitForImageClassificationWithTeacher"),l(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"),l(Le,"href","#transformers.LevitForImageClassificationWithTeacher"),l(se,"class","relative group"),l(ft,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(ft,"rel","nofollow"),l(Bt,"href","/docs/transformers/v4.31.0/en/model_doc/levit#transformers.LevitForImageClassificationWithTeacher"),l(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(P,"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,d){e(document.head,f),p(t,b,d),p(t,v,d),e(v,g),e(g,_),T(c,_,null),e(v,u),e(v,F),e(F,Fa),p(t,Vo,d),p(t,X,d),e(X,le),e(le,oo),T(We,oo,null),e(X,ja),e(X,ao),e(ao,za),p(t,Zo,d),p(t,S,d),e(S,Wa),e(S,Pe),e(Pe,Pa),e(S,Ua),e(S,_t),e(_t,Ja),e(S,Na),p(t,Ao,d),p(t,bt,d),e(bt,Va),p(t,Ro,d),p(t,yt,d),e(yt,ro),e(ro,Za),p(t,So,d),p(t,ce,d),p(t,Go,d),p(t,de,d),e(de,Aa),e(de,wt),e(wt,Ra),e(de,Sa),p(t,Bo,d),p(t,Tt,d),e(Tt,Ga),p(t,Xo,d),p(t,x,d),e(x,so),e(so,Ba),e(x,Xa),e(x,q),e(q,qa),e(q,$t),e($t,Qa),e(q,Ya),e(q,It),e(It,Da),e(q,Ha),e(x,Oa),e(x,Ue),e(Ue,Ka),e(Ue,Je),e(Je,er),e(Ue,tr),e(x,or),e(x,M),e(M,ar),e(M,Lt),e(Lt,rr),e(M,sr),e(M,Mt),e(Mt,nr),e(M,ir),e(M,no),e(no,lr),e(M,cr),e(M,io),e(io,dr),e(M,mr),e(M,lo),e(lo,hr),e(M,fr),e(M,co),e(co,pr),e(M,gr),e(M,mo),e(mo,ur),e(M,vr),e(M,Ct),e(Ct,_r),e(M,br),e(x,yr),e(x,Et),e(Et,kt),e(kt,wr),e(Et,Tr),e(x,$r),e(x,E),e(E,Ir),e(E,Ne),e(Ne,Lr),e(E,Mr),e(E,xt),e(xt,Cr),e(E,Er),e(E,Ft),e(Ft,kr),e(E,xr),e(E,jt),e(jt,Fr),e(E,jr),e(E,zt),e(zt,zr),e(E,Wr),e(E,Wt),e(Wt,Pr),e(E,Ur),p(t,qo,d),p(t,G,d),e(G,Jr),e(G,Ve),e(Ve,Nr),e(G,Vr),e(G,Ze),e(Ze,Zr),e(G,Ar),p(t,Qo,d),p(t,Q,d),e(Q,me),e(me,ho),T(Ae,ho,null),e(Q,Rr),e(Q,fo),e(fo,Sr),p(t,Yo,d),p(t,Pt,d),e(Pt,Gr),p(t,Do,d),T(Re,t,d),p(t,Ho,d),p(t,he,d),e(he,B),e(B,Ut),e(Ut,Br),e(B,Xr),e(B,Se),e(Se,qr),e(B,Qr),e(B,Ge),e(Ge,Yr),e(B,Dr),e(he,Hr),e(he,Jt),e(Jt,Or),e(Jt,Nt),e(Nt,Kr),p(t,Oo,d),p(t,Vt,d),e(Vt,es),p(t,Ko,d),p(t,Y,d),e(Y,fe),e(fe,po),T(Be,po,null),e(Y,ts),e(Y,go),e(go,os),p(t,ea,d),p(t,z,d),T(Xe,z,null),e(z,as),e(z,D),e(D,rs),e(D,Zt),e(Zt,ss),e(D,ns),e(D,qe),e(qe,is),e(D,ls),e(z,cs),e(z,H),e(H,ds),e(H,At),e(At,ms),e(H,hs),e(H,Rt),e(Rt,fs),e(H,ps),e(z,gs),T(pe,z,null),p(t,ta,d),p(t,O,d),e(O,ge),e(ge,uo),T(Qe,uo,null),e(O,us),e(O,vo),e(vo,vs),p(t,oa,d),p(t,K,d),T(Ye,K,null),e(K,_s),e(K,ue),T(De,ue,null),e(ue,bs),e(ue,_o),e(_o,ys),p(t,aa,d),p(t,ee,d),e(ee,ve),e(ve,bo),T(He,bo,null),e(ee,ws),e(ee,yo),e(yo,Ts),p(t,ra,d),p(t,Z,d),T(Oe,Z,null),e(Z,$s),e(Z,wo),e(wo,Is),e(Z,Ls),e(Z,_e),T(Ke,_e,null),e(_e,Ms),e(_e,To),e(To,Cs),p(t,sa,d),p(t,te,d),e(te,be),e(be,$o),T(et,$o,null),e(te,Es),e(te,Io),e(Io,ks),p(t,na,d),p(t,A,d),T(tt,A,null),e(A,xs),e(A,ot),e(ot,Fs),e(ot,at),e(at,js),e(ot,zs),e(A,Ws),e(A,U),T(rt,U,null),e(U,Ps),e(U,oe),e(oe,Us),e(oe,St),e(St,Js),e(oe,Ns),e(oe,Lo),e(Lo,Vs),e(oe,Zs),e(U,As),T(ye,U,null),e(U,Rs),T(we,U,null),p(t,ia,d),p(t,ae,d),e(ae,Te),e(Te,Mo),T(st,Mo,null),e(ae,Ss),e(ae,Co),e(Co,Gs),p(t,la,d),p(t,W,d),T(nt,W,null),e(W,Bs),e(W,Eo),e(Eo,Xs),e(W,qs),e(W,it),e(it,Qs),e(it,lt),e(lt,Ys),e(it,Ds),e(W,Hs),e(W,J),T(ct,J,null),e(J,Os),e(J,re),e(re,Ks),e(re,Gt),e(Gt,en),e(re,tn),e(re,ko),e(ko,on),e(re,an),e(J,rn),T($e,J,null),e(J,sn),T(Ie,J,null),p(t,ca,d),p(t,se,d),e(se,Le),e(Le,xo),T(dt,xo,null),e(se,nn),e(se,Fo),e(Fo,ln),p(t,da,d),p(t,P,d),T(mt,P,null),e(P,cn),e(P,jo),e(jo,dn),e(P,mn),e(P,ht),e(ht,hn),e(ht,ft),e(ft,fn),e(ht,pn),e(P,gn),e(P,N),T(pt,N,null),e(N,un),e(N,ne),e(ne,vn),e(ne,Bt),e(Bt,_n),e(ne,bn),e(ne,zo),e(zo,yn),e(ne,wn),e(N,Tn),T(Me,N,null),e(N,$n),T(Ce,N,null),ma=!0},p(t,[d]){const gt={};d&2&&(gt.$$scope={dirty:d,ctx:t}),pe.$set(gt);const Wo={};d&2&&(Wo.$$scope={dirty:d,ctx:t}),ye.$set(Wo);const Po={};d&2&&(Po.$$scope={dirty:d,ctx:t}),we.$set(Po);const Uo={};d&2&&(Uo.$$scope={dirty:d,ctx:t}),$e.$set(Uo);const ut={};d&2&&(ut.$$scope={dirty:d,ctx:t}),Ie.$set(ut);const Jo={};d&2&&(Jo.$$scope={dirty:d,ctx:t}),Me.$set(Jo);const No={};d&2&&(No.$$scope={dirty:d,ctx:t}),Ce.$set(No)},i(t){ma||($(c.$$.fragment,t),$(We.$$.fragment,t),$(Ae.$$.fragment,t),$(Re.$$.fragment,t),$(Be.$$.fragment,t),$(Xe.$$.fragment,t),$(pe.$$.fragment,t),$(Qe.$$.fragment,t),$(Ye.$$.fragment,t),$(De.$$.fragment,t),$(He.$$.fragment,t),$(Oe.$$.fragment,t),$(Ke.$$.fragment,t),$(et.$$.fragment,t),$(tt.$$.fragment,t),$(rt.$$.fragment,t),$(ye.$$.fragment,t),$(we.$$.fragment,t),$(st.$$.fragment,t),$(nt.$$.fragment,t),$(ct.$$.fragment,t),$($e.$$.fragment,t),$(Ie.$$.fragment,t),$(dt.$$.fragment,t),$(mt.$$.fragment,t),$(pt.$$.fragment,t),$(Me.$$.fragment,t),$(Ce.$$.fragment,t),ma=!0)},o(t){I(c.$$.fragment,t),I(We.$$.fragment,t),I(Ae.$$.fragment,t),I(Re.$$.fragment,t),I(Be.$$.fragment,t),I(Xe.$$.fragment,t),I(pe.$$.fragment,t),I(Qe.$$.fragment,t),I(Ye.$$.fragment,t),I(De.$$.fragment,t),I(He.$$.fragment,t),I(Oe.$$.fragment,t),I(Ke.$$.fragment,t),I(et.$$.fragment,t),I(tt.$$.fragment,t),I(rt.$$.fragment,t),I(ye.$$.fragment,t),I(we.$$.fragment,t),I(st.$$.fragment,t),I(nt.$$.fragment,t),I(ct.$$.fragment,t),I($e.$$.fragment,t),I(Ie.$$.fragment,t),I(dt.$$.fragment,t),I(mt.$$.fragment,t),I(pt.$$.fragment,t),I(Me.$$.fragment,t),I(Ce.$$.fragment,t),ma=!1},d(t){o(f),t&&o(b),t&&o(v),L(c),t&&o(Vo),t&&o(X),L(We),t&&o(Zo),t&&o(S),t&&o(Ao),t&&o(bt),t&&o(Ro),t&&o(yt),t&&o(So),t&&o(ce),t&&o(Go),t&&o(de),t&&o(Bo),t&&o(Tt),t&&o(Xo),t&&o(x),t&&o(qo),t&&o(G),t&&o(Qo),t&&o(Q),L(Ae),t&&o(Yo),t&&o(Pt),t&&o(Do),L(Re,t),t&&o(Ho),t&&o(he),t&&o(Oo),t&&o(Vt),t&&o(Ko),t&&o(Y),L(Be),t&&o(ea),t&&o(z),L(Xe),L(pe),t&&o(ta),t&&o(O),L(Qe),t&&o(oa),t&&o(K),L(Ye),L(De),t&&o(aa),t&&o(ee),L(He),t&&o(ra),t&&o(Z),L(Oe),L(Ke),t&&o(sa),t&&o(te),L(et),t&&o(na),t&&o(A),L(tt),L(rt),L(ye),L(we),t&&o(ia),t&&o(ae),L(st),t&&o(la),t&&o(W),L(nt),L(ct),L($e),L(Ie),t&&o(ca),t&&o(se),L(dt),t&&o(da),t&&o(P),L(mt),L(pt),L(Me),L(Ce)}}}const cl={local:"levit",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.LevitConfig",title:"LevitConfig"},{local:"transformers.LevitFeatureExtractor",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 dl(k){return Ki(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _l extends Qi{constructor(f){super();Yi(this,f,dl,ll,Di,{})}}export{_l as default,cl as metadata};
