import{S as Gi,i as Yi,s as Xi,e as a,k as m,w,t as n,M as Ki,c as r,d as o,m as h,a as s,x as y,h as i,b as l,N as Qi,G as e,g as p,y as $,q as L,o as T,B as I,v as Zi,L as ka}from"../../chunks/vendor-hf-doc-builder.js";import{T as Cn}from"../../chunks/Tip-hf-doc-builder.js";import{D as O}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Pa}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 Pa({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(){f=a("p"),b=n("Example:"),v=m(),w(g.$$.fragment)},l(c){f=r(c,"P",{});var u=s(f);b=i(u,"Example:"),u.forEach(o),v=h(c),y(g.$$.fragment,c)},m(c,u){p(c,f,u),e(f,b),p(c,v,u),$(g,c,u),_=!0},p:ka,i(c){_||(L(g.$$.fragment,c),_=!0)},o(c){T(g.$$.fragment,c),_=!1},d(c){c&&o(f),c&&o(v),I(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 z=s(v);g=i(z,"Module"),z.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 Pa({props:{code:`from transformers import AutoImageProcessor, LevitModel
import torch
from datasets import load_dataset

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

image_processor = AutoImageProcessor.from_pretrained("facebook/levit-128S")
model = LevitModel.from_pretrained("facebook/levit-128S")

inputs = image_processor(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> 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(),w(g.$$.fragment)},l(c){f=r(c,"P",{});var u=s(f);b=i(u,"Example:"),u.forEach(o),v=h(c),y(g.$$.fragment,c)},m(c,u){p(c,f,u),e(f,b),p(c,v,u),$(g,c,u),_=!0},p:ka,i(c){_||(L(g.$$.fragment,c),_=!0)},o(c){T(g.$$.fragment,c),_=!1},d(c){c&&o(f),c&&o(v),I(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 z=s(v);g=i(z,"Module"),z.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 Pa({props:{code:`from transformers import AutoImageProcessor, LevitForImageClassification
import torch
from datasets import load_dataset

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

image_processor = AutoImageProcessor.from_pretrained("facebook/levit-128S")
model = LevitForImageClassification.from_pretrained("facebook/levit-128S")

inputs = image_processor(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> 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(),w(g.$$.fragment)},l(c){f=r(c,"P",{});var u=s(f);b=i(u,"Example:"),u.forEach(o),v=h(c),y(g.$$.fragment,c)},m(c,u){p(c,f,u),e(f,b),p(c,v,u),$(g,c,u),_=!0},p:ka,i(c){_||(L(g.$$.fragment,c),_=!0)},o(c){T(g.$$.fragment,c),_=!1},d(c){c&&o(f),c&&o(v),I(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 z=s(v);g=i(z,"Module"),z.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 Pa({props:{code:`from transformers import AutoImageProcessor, LevitForImageClassificationWithTeacher
import torch
from datasets import load_dataset

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

image_processor = AutoImageProcessor.from_pretrained("facebook/levit-128S")
model = LevitForImageClassificationWithTeacher.from_pretrained("facebook/levit-128S")

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