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