import{S as Wl,i as Yl,s as Jl,e as r,k as i,w as g,t as n,M as Kl,c as a,d as t,m as c,a as s,x as _,h as l,b as d,N as Xl,F as e,g as f,y as v,q as F,o as P,B as w}from"../../chunks/vendor-4833417e.js";import{T as hn}from"../../chunks/Tip-fffd6df1.js";import{D as fe}from"../../chunks/Docstring-4f315ed9.js";import{C as pn}from"../../chunks/CodeBlock-6a3d1b46.js";import{I as no}from"../../chunks/IconCopyLink-4b81c553.js";import"../../chunks/CopyButton-dacfbfaf.js";function Zl(Q){let h,$;return{c(){h=r("p"),$=n(`NumPy arrays and PyTorch tensors are converted to PIL images when resizing, so the most efficient is to pass
PIL images.`)},l(p){h=a(p,"P",{});var u=s(h);$=l(u,`NumPy arrays and PyTorch tensors are converted to PIL images when resizing, so the most efficient is to pass
PIL images.`),u.forEach(t)},m(p,u){f(p,h,u),e(h,$)},d(p){p&&t(h)}}}function Ql(Q){let h,$,p,u,C;return{c(){h=r("p"),$=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r("code"),u=n("Module"),C=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(b){h=a(b,"P",{});var T=s(h);$=l(T,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a(T,"CODE",{});var O=s(p);u=l(O,"Module"),O.forEach(t),C=l(T,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),T.forEach(t)},m(b,T){f(b,h,T),e(h,$),e(h,p),e(p,u),e(h,C)},d(b){b&&t(h)}}}function ei(Q){let h,$,p,u,C;return{c(){h=r("p"),$=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r("code"),u=n("Module"),C=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(b){h=a(b,"P",{});var T=s(h);$=l(T,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a(T,"CODE",{});var O=s(p);u=l(O,"Module"),O.forEach(t),C=l(T,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),T.forEach(t)},m(b,T){f(b,h,T),e(h,$),e(h,p),e(p,u),e(h,C)},d(b){b&&t(h)}}}function oi(Q){let h,$,p,u,C,b,T,O,vr,At,ee,he,Uo,xe,Fr,Vo,Pr,Dt,pe,wr,Ce,br,$r,Lt,lo,Tr,Nt,io,Go,yr,Ot,ue,Er,Ie,xr,Cr,qt,Me,un,St,co,Ir,Ht,S,ke,Mr,je,kr,jr,zr,ze,Ar,mo,Dr,Lr,Nr,Wo,Or,Rt,ge,Yo,I,fo,Jo,qr,Sr,Ko,Xo,Hr,Rr,Zo,Qo,Br,Ur,ho,et,Vr,Gr,po,ot,Wr,Yr,M,k,uo,Jr,Kr,tt,Xr,Zr,rt,Qr,ea,go,oa,ta,_o,ra,aa,j,vo,sa,na,at,la,ia,st,ca,da,Fo,ma,fa,Po,ha,pa,z,wo,ua,ga,nt,_a,va,lt,Fa,Pa,bo,wa,ba,$o,$a,Ta,A,To,ya,Ea,it,xa,Ca,ct,Ia,Ma,yo,ka,ja,Eo,za,Aa,D,xo,Da,La,dt,Na,Oa,mt,qa,Sa,Co,Ha,Ra,Io,Ba,Bt,H,Ua,Ae,Va,Ga,De,Wa,Ya,Ut,oe,_e,ft,Le,Ja,ht,Ka,Vt,te,Ne,Xa,pt,Za,Gt,re,Oe,Qa,ut,es,Wt,ae,ve,gt,qe,os,_t,ts,Yt,y,Se,rs,se,as,Mo,ss,ns,He,ls,is,cs,ne,ds,ko,ms,fs,jo,hs,ps,us,vt,gs,_s,Re,Jt,le,Fe,Ft,Be,vs,Pt,Fs,Kt,L,Ue,Ps,wt,ws,bs,Ve,$s,zo,Ts,ys,Es,R,Ge,xs,bt,Cs,Is,Pe,Xt,ie,we,$t,We,Ms,Tt,ks,Zt,q,Ye,js,Je,zs,Ke,As,Ds,Ls,E,Xe,Ns,ce,Os,Ao,qs,Ss,yt,Hs,Rs,Bs,be,Us,Et,Vs,Gs,Ze,Qt,de,$e,xt,Qe,Ws,Ct,Ys,er,N,eo,Js,It,Ks,Xs,oo,Zs,to,Qs,en,on,x,ro,tn,me,rn,Do,an,sn,Mt,nn,ln,cn,Te,dn,kt,mn,fn,ao,or;return b=new no({}),xe=new no({}),Le=new no({}),Ne=new fe({props:{name:"class transformers.models.poolformer.modeling_poolformer.PoolFormerModelOutput",anchor:"transformers.models.poolformer.modeling_poolformer.PoolFormerModelOutput",parameters:[{name:"last_hidden_state",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/poolformer/modeling_poolformer.py#L67",parametersDescription:[{anchor:"transformers.models.poolformer.modeling_poolformer.PoolFormerModelOutput.last_hidden_state",description:`<strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) &#x2014;
Sequence of hidden-states at the output of the last layer of the model.`,name:"last_hidden_state"},{anchor:"transformers.models.poolformer.modeling_poolformer.PoolFormerModelOutput.hidden_states",description:`<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>) &#x2014;
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.`,name:"hidden_states"}]}}),Oe=new fe({props:{name:"class transformers.models.poolformer.modeling_poolformer.PoolFormerClassifierOutput",anchor:"transformers.models.poolformer.modeling_poolformer.PoolFormerClassifierOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"logits",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/poolformer/modeling_poolformer.py#L86",parametersDescription:[{anchor:"transformers.models.poolformer.modeling_poolformer.PoolFormerClassifierOutput.loss",description:`<strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) &#x2014;
Classification (or regression if config.num_labels==1) loss.`,name:"loss"},{anchor:"transformers.models.poolformer.modeling_poolformer.PoolFormerClassifierOutput.logits",description:`<strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) &#x2014;
Classification (or regression if config.num_labels==1) scores (before SoftMax).`,name:"logits"},{anchor:"transformers.models.poolformer.modeling_poolformer.PoolFormerClassifierOutput.hidden_states",description:`<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>) &#x2014;
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, num_channels, height, width)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"}]}}),qe=new no({}),Se=new fe({props:{name:"class transformers.PoolFormerConfig",anchor:"transformers.PoolFormerConfig",parameters:[{name:"num_channels",val:" = 3"},{name:"patch_size",val:" = 16"},{name:"stride",val:" = 16"},{name:"pool_size",val:" = 3"},{name:"mlp_ratio",val:" = 4.0"},{name:"depths",val:" = [2, 2, 6, 2]"},{name:"hidden_sizes",val:" = [64, 128, 320, 512]"},{name:"patch_sizes",val:" = [7, 3, 3, 3]"},{name:"strides",val:" = [4, 2, 2, 2]"},{name:"padding",val:" = [2, 1, 1, 1]"},{name:"num_encoder_blocks",val:" = 4"},{name:"drop_path_rate",val:" = 0.0"},{name:"hidden_act",val:" = 'gelu'"},{name:"use_layer_scale",val:" = True"},{name:"layer_scale_init_value",val:" = 1e-05"},{name:"initializer_range",val:" = 0.02"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/poolformer/configuration_poolformer.py#L29",parametersDescription:[{anchor:"transformers.PoolFormerConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of channels in the input image.`,name:"num_channels"},{anchor:"transformers.PoolFormerConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size of the input patch.`,name:"patch_size"},{anchor:"transformers.PoolFormerConfig.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The stride of the input patch.`,name:"stride"},{anchor:"transformers.PoolFormerConfig.pool_size",description:`<strong>pool_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The size of the pooling window.`,name:"pool_size"},{anchor:"transformers.PoolFormerConfig.mlp_ratio",description:`<strong>mlp_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#x2014;
The ratio of the number of channels in the output of the MLP to the number of channels in the input.`,name:"mlp_ratio"},{anchor:"transformers.PoolFormerConfig.depths",description:`<strong>depths</strong> (<code>list</code>, <em>optional</em>, defaults to <code>[2, 2, 6, 2]</code>) &#x2014;
The depth of each encoder block.`,name:"depths"},{anchor:"transformers.PoolFormerConfig.hidden_sizes",description:`<strong>hidden_sizes</strong> (<code>list</code>, <em>optional</em>, defaults to <code>[64, 128, 320, 512]</code>) &#x2014;
The hidden sizes of each encoder block.`,name:"hidden_sizes"},{anchor:"transformers.PoolFormerConfig.patch_sizes",description:`<strong>patch_sizes</strong> (<code>list</code>, <em>optional</em>, defaults to <code>[7, 3, 3, 3]</code>) &#x2014;
The size of the input patch for each encoder block.`,name:"patch_sizes"},{anchor:"transformers.PoolFormerConfig.strides",description:`<strong>strides</strong> (<code>list</code>, <em>optional</em>, defaults to <code>[4, 2, 2, 2]</code>) &#x2014;
The stride of the input patch for each encoder block.`,name:"strides"},{anchor:"transformers.PoolFormerConfig.padding",description:`<strong>padding</strong> (<code>list</code>, <em>optional</em>, defaults to <code>[2, 1, 1, 1]</code>) &#x2014;
The padding of the input patch for each encoder block.`,name:"padding"},{anchor:"transformers.PoolFormerConfig.num_encoder_blocks",description:`<strong>num_encoder_blocks</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of encoder blocks.`,name:"num_encoder_blocks"},{anchor:"transformers.PoolFormerConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout rate for the dropout layers.`,name:"drop_path_rate"},{anchor:"transformers.PoolFormerConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The activation function for the hidden layers.`,name:"hidden_act"},{anchor:"transformers.PoolFormerConfig.use_layer_scale",description:`<strong>use_layer_scale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use layer scale.`,name:"use_layer_scale"},{anchor:"transformers.PoolFormerConfig.layer_scale_init_value",description:`<strong>layer_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The initial value for the layer scale.`,name:"layer_scale_init_value"},{anchor:"transformers.PoolFormerConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The initializer range for the weights.`,name:"initializer_range"}]}}),Re=new pn({props:{code:`from transformers import PoolFormerModel, PoolFormerConfig

# Initializing a PoolFormer sail/poolformer_s12 style configuration
configuration = PoolFormerConfig()

# Initializing a model from the sail/poolformer_s12 style configuration
model = PoolFormerModel(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> PoolFormerModel, PoolFormerConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a PoolFormer sail/poolformer_s12 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = PoolFormerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the sail/poolformer_s12 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = PoolFormerModel(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`}}),Be=new no({}),Ue=new fe({props:{name:"class transformers.PoolFormerFeatureExtractor",anchor:"transformers.PoolFormerFeatureExtractor",parameters:[{name:"do_resize_and_center_crop",val:" = True"},{name:"size",val:" = 224"},{name:"resample",val:" = 3"},{name:"crop_pct",val:" = 0.9"},{name:"do_normalize",val:" = True"},{name:"image_mean",val:" = None"},{name:"image_std",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/poolformer/feature_extraction_poolformer.py#L38",parametersDescription:[{anchor:"transformers.PoolFormerFeatureExtractor.do_resize_and_center_crop",description:`<strong>do_resize_and_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the shortest edge of the image and center crop the input to a certain <code>size</code>.`,name:"do_resize_and_center_crop"},{anchor:"transformers.PoolFormerFeatureExtractor.size",description:`<strong>size</strong> (<code>int</code> or <code>Tuple(int)</code>, <em>optional</em>, defaults to 224) &#x2014;
Center crop the input to the given size. If a tuple is provided, it should be (width, height). If only an
integer is provided, then the input will be center cropped to (size, size). Only has an effect if
<code>do_resize_and_center_crop</code> is set to <code>True</code>.`,name:"size"},{anchor:"transformers.PoolFormerFeatureExtractor.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>PIL.Image.BICUBIC</code>) &#x2014;
An optional resampling filter. This can be one of <code>PIL.Image.NEAREST</code>, <code>PIL.Image.BOX</code>,
<code>PIL.Image.BILINEAR</code>, <code>PIL.Image.HAMMING</code>, <code>PIL.Image.BICUBIC</code> or <code>PIL.Image.LANCZOS</code>. Only has an effect
if <code>do_resize_and_center_crop</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.PoolFormerFeatureExtractor.crop_pct",description:`<strong>crop_pct</strong> (<code>float</code>, <em>optional</em>, defaults to <code>0.9</code>) &#x2014;
The percentage of the image to crop from the center. Only has an effect if <code>do_resize_and_center_crop</code> is
set to <code>True</code>.`,name:"crop_pct"},{anchor:"transformers.PoolFormerFeatureExtractor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to normalize the input with <code>image_mean</code> and <code>image_std</code>.`,name:"do_normalize"},{anchor:"transformers.PoolFormerFeatureExtractor.image_mean",description:`<strong>image_mean</strong> (<code>List[int]</code>, defaults to <code>[0.485, 0.456, 0.406]</code>) &#x2014;
The sequence of means for each channel, to be used when normalizing images.`,name:"image_mean"},{anchor:"transformers.PoolFormerFeatureExtractor.image_std",description:`<strong>image_std</strong> (<code>List[int]</code>, defaults to <code>[0.229, 0.224, 0.225]</code>) &#x2014;
The sequence of standard deviations for each channel, to be used when normalizing images.`,name:"image_std"}]}}),Ge=new fe({props:{name:"__call__",anchor:"transformers.PoolFormerFeatureExtractor.__call__",parameters:[{name:"images",val:": typing.Union[PIL.Image.Image, numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[PIL.Image.Image], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"return_tensors",val:": typing.Union[str, transformers.file_utils.TensorType, NoneType] = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/poolformer/feature_extraction_poolformer.py#L89",parametersDescription:[{anchor:"transformers.PoolFormerFeatureExtractor.__call__.images",description:`<strong>images</strong> (<code>PIL.Image.Image</code>, <code>np.ndarray</code>, <code>torch.Tensor</code>, <code>List[PIL.Image.Image]</code>, <code>List[np.ndarray]</code>, <code>List[torch.Tensor]</code>) &#x2014;
The image or batch of images to be prepared. Each image can be a PIL image, NumPy array or PyTorch
tensor. In case of a NumPy array/PyTorch tensor, each image should be of shape (C, H, W), where C is a
number of channels, H and W are image height and width.`,name:"images"},{anchor:"transformers.PoolFormerFeatureExtractor.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/pr_15839/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>, defaults to <code>&apos;np&apos;</code>) &#x2014;
If set, will return tensors of a particular framework. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return NumPy <code>np.ndarray</code> objects.</li>
<li><code>&apos;jax&apos;</code>: Return JAX <code>jnp.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.BatchFeature"
>BatchFeature</a> with the following fields:</p>
<ul>
<li><strong>pixel_values</strong> \u2014 Pixel values to be fed to a model, of shape (batch_size, num_channels, height,
width).</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.BatchFeature"
>BatchFeature</a></p>
`}}),Pe=new hn({props:{warning:"&lcub;true}",$$slots:{default:[Zl]},$$scope:{ctx:Q}}}),We=new no({}),Ye=new fe({props:{name:"class transformers.PoolFormerModel",anchor:"transformers.PoolFormerModel",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/poolformer/modeling_poolformer.py#L360",parametersDescription:[{anchor:"transformers.PoolFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.PoolFormerConfig">PoolFormerConfig</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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),Xe=new fe({props:{name:"forward",anchor:"transformers.PoolFormerModel.forward",parameters:[{name:"pixel_values",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/poolformer/modeling_poolformer.py#L373",parametersDescription:[{anchor:"transformers.PoolFormerModel.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/pr_15839/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor">PoolFormerFeatureExtractor</a>. See
<a href="/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__call__">PoolFormerFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"pixel_values"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.models.poolformer.modeling_poolformer.PoolFormerModelOutput"
>transformers.models.poolformer.modeling_poolformer.PoolFormerModelOutput</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/pr_15839/en/model_doc/poolformer#transformers.PoolFormerConfig"
>PoolFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</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 + 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.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.models.poolformer.modeling_poolformer.PoolFormerModelOutput"
>transformers.models.poolformer.modeling_poolformer.PoolFormerModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),be=new hn({props:{$$slots:{default:[Ql]},$$scope:{ctx:Q}}}),Ze=new pn({props:{code:`from transformers import PoolFormerFeatureExtractor, PoolFormerModel
import torch
from datasets import load_dataset

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

feature_extractor = PoolFormerFeatureExtractor.from_pretrained("sail/poolformer_s12")
model = PoolFormerModel.from_pretrained("sail/poolformer_s12")

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

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

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PoolFormerFeatureExtractor, PoolFormerModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = PoolFormerFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;sail/poolformer_s12&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = PoolFormerModel.from_pretrained(<span class="hljs-string">&quot;sail/poolformer_s12&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">512</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`}}),Qe=new no({}),eo=new fe({props:{name:"class transformers.PoolFormerForImageClassification",anchor:"transformers.PoolFormerForImageClassification",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/poolformer/modeling_poolformer.py#L423",parametersDescription:[{anchor:"transformers.PoolFormerForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.PoolFormerConfig">PoolFormerConfig</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/pr_15839/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]}}),ro=new fe({props:{name:"forward",anchor:"transformers.PoolFormerForImageClassification.forward",parameters:[{name:"pixel_values",val:" = None"},{name:"labels",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/pr_15839/src/transformers/models/poolformer/modeling_poolformer.py#L439",parametersDescription:[{anchor:"transformers.PoolFormerForImageClassification.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/pr_15839/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor">PoolFormerFeatureExtractor</a>. See
<a href="/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__call__">PoolFormerFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.PoolFormerForImageClassification.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"}],returnDescription:`
<p>A <a
  href="/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.models.poolformer.modeling_poolformer.PoolFormerClassifierOutput"
>transformers.models.poolformer.modeling_poolformer.PoolFormerClassifierOutput</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/pr_15839/en/model_doc/poolformer#transformers.PoolFormerConfig"
>PoolFormerConfig</a>) and inputs.</p>
<ul>
<li>
<p><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.</p>
</li>
<li>
<p><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).</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 + 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 initial embedding outputs.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.models.poolformer.modeling_poolformer.PoolFormerClassifierOutput"
>transformers.models.poolformer.modeling_poolformer.PoolFormerClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Te=new hn({props:{$$slots:{default:[ei]},$$scope:{ctx:Q}}}),ao=new pn({props:{code:`from transformers import PoolFormerFeatureExtractor, PoolFormerForImageClassification
import torch
from datasets import load_dataset

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

feature_extractor = PoolFormerFeatureExtractor.from_pretrained("sail/poolformer_s12")
model = PoolFormerForImageClassification.from_pretrained("sail/poolformer_s12")

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

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

# model predicts one of the 1000 ImageNet classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PoolFormerFeatureExtractor, PoolFormerForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = PoolFormerFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;sail/poolformer_s12&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = PoolFormerForImageClassification.from_pretrained(<span class="hljs-string">&quot;sail/poolformer_s12&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`}}),{c(){h=r("meta"),$=i(),p=r("h1"),u=r("a"),C=r("span"),g(b.$$.fragment),T=i(),O=r("span"),vr=n("PoolFormer"),At=i(),ee=r("h2"),he=r("a"),Uo=r("span"),g(xe.$$.fragment),Fr=i(),Vo=r("span"),Pr=n("Overview"),Dt=i(),pe=r("p"),wr=n("The PoolFormer model was proposed in "),Ce=r("a"),br=n("MetaFormer is Actually What You Need for Vision"),$r=n("  by Sea AI Labs. Instead of designing complicated token mixer to achieve SOTA performance, the target of this work is to demonstrate the competence of transformer models largely stem from the general architecture MetaFormer."),Lt=i(),lo=r("p"),Tr=n("The abstract from the paper is the following:"),Nt=i(),io=r("p"),Go=r("em"),yr=n("Transformers have shown great potential in computer vision tasks. A common belief is their attention-based token mixer module contributes most to their competence. However, recent works show the attention-based module in transformers can be replaced by spatial MLPs and the resulted models still perform quite well. Based on this observation, we hypothesize that the general architecture of the transformers, instead of the specific token mixer module, is more essential to the model\u2019s performance. To verify this, we deliberately replace the attention module in transformers with an embarrassingly simple spatial pooling operator to conduct only the most basic token mixing. Surprisingly, we observe that the derived model, termed as PoolFormer, achieves competitive performance on multiple computer vision tasks. For example, on ImageNet-1K, PoolFormer achieves 82.1% top-1 accuracy, surpassing well-tuned vision transformer/MLP-like baselines DeiT-B/ResMLP-B24 by 0.3%/1.1% accuracy with 35%/52% fewer parameters and 48%/60% fewer MACs. The effectiveness of PoolFormer verifies our hypothesis and urges us to initiate the concept of \u201CMetaFormer\u201D, a general architecture abstracted from transformers without specifying the token mixer. Based on the extensive experiments, we argue that MetaFormer is the key player in achieving superior results for recent transformer and MLP-like models on vision tasks. This work calls for more future research dedicated to improving MetaFormer instead of focusing on the token mixer modules. Additionally, our proposed PoolFormer could serve as a starting baseline for future MetaFormer architecture design."),Ot=i(),ue=r("p"),Er=n("The figure below illustrates the architecture of PoolFormer. Taken from the "),Ie=r("a"),xr=n("original paper"),Cr=n("."),qt=i(),Me=r("img"),St=i(),co=r("p"),Ir=n("Tips:"),Ht=i(),S=r("ul"),ke=r("li"),Mr=n("PoolFormer has a hierarchical architecture, where instead of Attention, a simple Average Pooling layer is present. All checkpoints of the model can be found on the "),je=r("a"),kr=n("hub"),jr=n("."),zr=i(),ze=r("li"),Ar=n("One can use "),mo=r("a"),Dr=n("PoolFormerFeatureExtractor"),Lr=n(" to prepare images for the model."),Nr=i(),Wo=r("li"),Or=n("As most models, PoolFormer comes in different sizes, the details of which can be found in the table below."),Rt=i(),ge=r("table"),Yo=r("thead"),I=r("tr"),fo=r("th"),Jo=r("strong"),qr=n("Model variant"),Sr=i(),Ko=r("th"),Xo=r("strong"),Hr=n("Depths"),Rr=i(),Zo=r("th"),Qo=r("strong"),Br=n("Hidden sizes"),Ur=i(),ho=r("th"),et=r("strong"),Vr=n("Params (M)"),Gr=i(),po=r("th"),ot=r("strong"),Wr=n("ImageNet-1k Top 1"),Yr=i(),M=r("tbody"),k=r("tr"),uo=r("td"),Jr=n("s12"),Kr=i(),tt=r("td"),Xr=n("[2, 2, 6, 2]"),Zr=i(),rt=r("td"),Qr=n("[64, 128, 320, 512]"),ea=i(),go=r("td"),oa=n("12"),ta=i(),_o=r("td"),ra=n("77.2"),aa=i(),j=r("tr"),vo=r("td"),sa=n("s24"),na=i(),at=r("td"),la=n("[4, 4, 12, 4]"),ia=i(),st=r("td"),ca=n("[64, 128, 320, 512]"),da=i(),Fo=r("td"),ma=n("21"),fa=i(),Po=r("td"),ha=n("80.3"),pa=i(),z=r("tr"),wo=r("td"),ua=n("s36"),ga=i(),nt=r("td"),_a=n("[6, 6, 18, 6]"),va=i(),lt=r("td"),Fa=n("[64, 128, 320, 512]"),Pa=i(),bo=r("td"),wa=n("31"),ba=i(),$o=r("td"),$a=n("81.4"),Ta=i(),A=r("tr"),To=r("td"),ya=n("m36"),Ea=i(),it=r("td"),xa=n("[6, 6, 18, 6]"),Ca=i(),ct=r("td"),Ia=n("[96, 192, 384, 768]"),Ma=i(),yo=r("td"),ka=n("56"),ja=i(),Eo=r("td"),za=n("82.1"),Aa=i(),D=r("tr"),xo=r("td"),Da=n("m48"),La=i(),dt=r("td"),Na=n("[8, 8, 24, 8]"),Oa=i(),mt=r("td"),qa=n("[96, 192, 384, 768]"),Sa=i(),Co=r("td"),Ha=n("73"),Ra=i(),Io=r("td"),Ba=n("82.5"),Bt=i(),H=r("p"),Ua=n("This model was contributed by "),Ae=r("a"),Va=n("heytanay"),Ga=n(". The original code can be found "),De=r("a"),Wa=n("here"),Ya=n("."),Ut=i(),oe=r("h2"),_e=r("a"),ft=r("span"),g(Le.$$.fragment),Ja=i(),ht=r("span"),Ka=n("PoolFormer specific outputs"),Vt=i(),te=r("div"),g(Ne.$$.fragment),Xa=i(),pt=r("p"),Za=n("Class for PoolFormerModel\u2019s outputs, with potential hidden states."),Gt=i(),re=r("div"),g(Oe.$$.fragment),Qa=i(),ut=r("p"),es=n("Class for PoolformerForImageClassification\u2019s outputs."),Wt=i(),ae=r("h2"),ve=r("a"),gt=r("span"),g(qe.$$.fragment),os=i(),_t=r("span"),ts=n("PoolFormerConfig"),Yt=i(),y=r("div"),g(Se.$$.fragment),rs=i(),se=r("p"),as=n("This is the configuration class to store the configuration of "),Mo=r("a"),ss=n("PoolFormerModel"),ns=n(`. It is used to instantiate a
PoolFormer 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 PoolFormer
`),He=r("a"),ls=n("sail/poolformer_s12"),is=n(" architecture."),cs=i(),ne=r("p"),ds=n("Configuration objects inherit from "),ko=r("a"),ms=n("PretrainedConfig"),fs=n(` and can be used to control the model outputs. Read the
documentation from `),jo=r("a"),hs=n("PretrainedConfig"),ps=n(" for more information."),us=i(),vt=r("p"),gs=n("Example:"),_s=i(),g(Re.$$.fragment),Jt=i(),le=r("h2"),Fe=r("a"),Ft=r("span"),g(Be.$$.fragment),vs=i(),Pt=r("span"),Fs=n("PoolFormerFeatureExtractor"),Kt=i(),L=r("div"),g(Ue.$$.fragment),Ps=i(),wt=r("p"),ws=n("Constructs a PoolFormer feature extractor."),bs=i(),Ve=r("p"),$s=n("This feature extractor inherits from "),zo=r("a"),Ts=n("FeatureExtractionMixin"),ys=n(` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),Es=i(),R=r("div"),g(Ge.$$.fragment),xs=i(),bt=r("p"),Cs=n("Main method to prepare for the model one or several image(s)."),Is=i(),g(Pe.$$.fragment),Xt=i(),ie=r("h2"),we=r("a"),$t=r("span"),g(We.$$.fragment),Ms=i(),Tt=r("span"),ks=n("PoolFormerModel"),Zt=i(),q=r("div"),g(Ye.$$.fragment),js=i(),Je=r("p"),zs=n(`The bare PoolFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ke=r("a"),As=n("torch.nn.Module"),Ds=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ls=i(),E=r("div"),g(Xe.$$.fragment),Ns=i(),ce=r("p"),Os=n("The "),Ao=r("a"),qs=n("PoolFormerModel"),Ss=n(" forward method, overrides the "),yt=r("code"),Hs=n("__call__"),Rs=n(" special method."),Bs=i(),g(be.$$.fragment),Us=i(),Et=r("p"),Vs=n("Example:"),Gs=i(),g(Ze.$$.fragment),Qt=i(),de=r("h2"),$e=r("a"),xt=r("span"),g(Qe.$$.fragment),Ws=i(),Ct=r("span"),Ys=n("PoolFormerForImageClassification"),er=i(),N=r("div"),g(eo.$$.fragment),Js=i(),It=r("p"),Ks=n("PoolFormer Model transformer with an image classification head on top"),Xs=i(),oo=r("p"),Zs=n("This model is a PyTorch "),to=r("a"),Qs=n("torch.nn.Module"),en=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),on=i(),x=r("div"),g(ro.$$.fragment),tn=i(),me=r("p"),rn=n("The "),Do=r("a"),an=n("PoolFormerForImageClassification"),sn=n(" forward method, overrides the "),Mt=r("code"),nn=n("__call__"),ln=n(" special method."),cn=i(),g(Te.$$.fragment),dn=i(),kt=r("p"),mn=n("Example:"),fn=i(),g(ao.$$.fragment),this.h()},l(o){const m=Kl('[data-svelte="svelte-1phssyn"]',document.head);h=a(m,"META",{name:!0,content:!0}),m.forEach(t),$=c(o),p=a(o,"H1",{class:!0});var so=s(p);u=a(so,"A",{id:!0,class:!0,href:!0});var jt=s(u);C=a(jt,"SPAN",{});var zt=s(C);_(b.$$.fragment,zt),zt.forEach(t),jt.forEach(t),T=c(so),O=a(so,"SPAN",{});var gn=s(O);vr=l(gn,"PoolFormer"),gn.forEach(t),so.forEach(t),At=c(o),ee=a(o,"H2",{class:!0});var tr=s(ee);he=a(tr,"A",{id:!0,class:!0,href:!0});var _n=s(he);Uo=a(_n,"SPAN",{});var vn=s(Uo);_(xe.$$.fragment,vn),vn.forEach(t),_n.forEach(t),Fr=c(tr),Vo=a(tr,"SPAN",{});var Fn=s(Vo);Pr=l(Fn,"Overview"),Fn.forEach(t),tr.forEach(t),Dt=c(o),pe=a(o,"P",{});var rr=s(pe);wr=l(rr,"The PoolFormer model was proposed in "),Ce=a(rr,"A",{href:!0,rel:!0});var Pn=s(Ce);br=l(Pn,"MetaFormer is Actually What You Need for Vision"),Pn.forEach(t),$r=l(rr,"  by Sea AI Labs. Instead of designing complicated token mixer to achieve SOTA performance, the target of this work is to demonstrate the competence of transformer models largely stem from the general architecture MetaFormer."),rr.forEach(t),Lt=c(o),lo=a(o,"P",{});var wn=s(lo);Tr=l(wn,"The abstract from the paper is the following:"),wn.forEach(t),Nt=c(o),io=a(o,"P",{});var bn=s(io);Go=a(bn,"EM",{});var $n=s(Go);yr=l($n,"Transformers have shown great potential in computer vision tasks. A common belief is their attention-based token mixer module contributes most to their competence. However, recent works show the attention-based module in transformers can be replaced by spatial MLPs and the resulted models still perform quite well. Based on this observation, we hypothesize that the general architecture of the transformers, instead of the specific token mixer module, is more essential to the model\u2019s performance. To verify this, we deliberately replace the attention module in transformers with an embarrassingly simple spatial pooling operator to conduct only the most basic token mixing. Surprisingly, we observe that the derived model, termed as PoolFormer, achieves competitive performance on multiple computer vision tasks. For example, on ImageNet-1K, PoolFormer achieves 82.1% top-1 accuracy, surpassing well-tuned vision transformer/MLP-like baselines DeiT-B/ResMLP-B24 by 0.3%/1.1% accuracy with 35%/52% fewer parameters and 48%/60% fewer MACs. The effectiveness of PoolFormer verifies our hypothesis and urges us to initiate the concept of \u201CMetaFormer\u201D, a general architecture abstracted from transformers without specifying the token mixer. Based on the extensive experiments, we argue that MetaFormer is the key player in achieving superior results for recent transformer and MLP-like models on vision tasks. This work calls for more future research dedicated to improving MetaFormer instead of focusing on the token mixer modules. Additionally, our proposed PoolFormer could serve as a starting baseline for future MetaFormer architecture design."),$n.forEach(t),bn.forEach(t),Ot=c(o),ue=a(o,"P",{});var ar=s(ue);Er=l(ar,"The figure below illustrates the architecture of PoolFormer. Taken from the "),Ie=a(ar,"A",{href:!0,rel:!0});var Tn=s(Ie);xr=l(Tn,"original paper"),Tn.forEach(t),Cr=l(ar,"."),ar.forEach(t),qt=c(o),Me=a(o,"IMG",{width:!0,src:!0}),St=c(o),co=a(o,"P",{});var yn=s(co);Ir=l(yn,"Tips:"),yn.forEach(t),Ht=c(o),S=a(o,"UL",{});var Lo=s(S);ke=a(Lo,"LI",{});var sr=s(ke);Mr=l(sr,"PoolFormer has a hierarchical architecture, where instead of Attention, a simple Average Pooling layer is present. All checkpoints of the model can be found on the "),je=a(sr,"A",{href:!0,rel:!0});var En=s(je);kr=l(En,"hub"),En.forEach(t),jr=l(sr,"."),sr.forEach(t),zr=c(Lo),ze=a(Lo,"LI",{});var nr=s(ze);Ar=l(nr,"One can use "),mo=a(nr,"A",{href:!0});var xn=s(mo);Dr=l(xn,"PoolFormerFeatureExtractor"),xn.forEach(t),Lr=l(nr," to prepare images for the model."),nr.forEach(t),Nr=c(Lo),Wo=a(Lo,"LI",{});var Cn=s(Wo);Or=l(Cn,"As most models, PoolFormer comes in different sizes, the details of which can be found in the table below."),Cn.forEach(t),Lo.forEach(t),Rt=c(o),ge=a(o,"TABLE",{});var lr=s(ge);Yo=a(lr,"THEAD",{});var In=s(Yo);I=a(In,"TR",{});var B=s(I);fo=a(B,"TH",{align:!0});var Mn=s(fo);Jo=a(Mn,"STRONG",{});var kn=s(Jo);qr=l(kn,"Model variant"),kn.forEach(t),Mn.forEach(t),Sr=c(B),Ko=a(B,"TH",{});var jn=s(Ko);Xo=a(jn,"STRONG",{});var zn=s(Xo);Hr=l(zn,"Depths"),zn.forEach(t),jn.forEach(t),Rr=c(B),Zo=a(B,"TH",{});var An=s(Zo);Qo=a(An,"STRONG",{});var Dn=s(Qo);Br=l(Dn,"Hidden sizes"),Dn.forEach(t),An.forEach(t),Ur=c(B),ho=a(B,"TH",{align:!0});var Ln=s(ho);et=a(Ln,"STRONG",{});var Nn=s(et);Vr=l(Nn,"Params (M)"),Nn.forEach(t),Ln.forEach(t),Gr=c(B),po=a(B,"TH",{align:!0});var On=s(po);ot=a(On,"STRONG",{});var qn=s(ot);Wr=l(qn,"ImageNet-1k Top 1"),qn.forEach(t),On.forEach(t),B.forEach(t),In.forEach(t),Yr=c(lr),M=a(lr,"TBODY",{});var U=s(M);k=a(U,"TR",{});var V=s(k);uo=a(V,"TD",{align:!0});var Sn=s(uo);Jr=l(Sn,"s12"),Sn.forEach(t),Kr=c(V),tt=a(V,"TD",{});var Hn=s(tt);Xr=l(Hn,"[2, 2, 6, 2]"),Hn.forEach(t),Zr=c(V),rt=a(V,"TD",{});var Rn=s(rt);Qr=l(Rn,"[64, 128, 320, 512]"),Rn.forEach(t),ea=c(V),go=a(V,"TD",{align:!0});var Bn=s(go);oa=l(Bn,"12"),Bn.forEach(t),ta=c(V),_o=a(V,"TD",{align:!0});var Un=s(_o);ra=l(Un,"77.2"),Un.forEach(t),V.forEach(t),aa=c(U),j=a(U,"TR",{});var G=s(j);vo=a(G,"TD",{align:!0});var Vn=s(vo);sa=l(Vn,"s24"),Vn.forEach(t),na=c(G),at=a(G,"TD",{});var Gn=s(at);la=l(Gn,"[4, 4, 12, 4]"),Gn.forEach(t),ia=c(G),st=a(G,"TD",{});var Wn=s(st);ca=l(Wn,"[64, 128, 320, 512]"),Wn.forEach(t),da=c(G),Fo=a(G,"TD",{align:!0});var Yn=s(Fo);ma=l(Yn,"21"),Yn.forEach(t),fa=c(G),Po=a(G,"TD",{align:!0});var Jn=s(Po);ha=l(Jn,"80.3"),Jn.forEach(t),G.forEach(t),pa=c(U),z=a(U,"TR",{});var W=s(z);wo=a(W,"TD",{align:!0});var Kn=s(wo);ua=l(Kn,"s36"),Kn.forEach(t),ga=c(W),nt=a(W,"TD",{});var Xn=s(nt);_a=l(Xn,"[6, 6, 18, 6]"),Xn.forEach(t),va=c(W),lt=a(W,"TD",{});var Zn=s(lt);Fa=l(Zn,"[64, 128, 320, 512]"),Zn.forEach(t),Pa=c(W),bo=a(W,"TD",{align:!0});var Qn=s(bo);wa=l(Qn,"31"),Qn.forEach(t),ba=c(W),$o=a(W,"TD",{align:!0});var el=s($o);$a=l(el,"81.4"),el.forEach(t),W.forEach(t),Ta=c(U),A=a(U,"TR",{});var Y=s(A);To=a(Y,"TD",{align:!0});var ol=s(To);ya=l(ol,"m36"),ol.forEach(t),Ea=c(Y),it=a(Y,"TD",{});var tl=s(it);xa=l(tl,"[6, 6, 18, 6]"),tl.forEach(t),Ca=c(Y),ct=a(Y,"TD",{});var rl=s(ct);Ia=l(rl,"[96, 192, 384, 768]"),rl.forEach(t),Ma=c(Y),yo=a(Y,"TD",{align:!0});var al=s(yo);ka=l(al,"56"),al.forEach(t),ja=c(Y),Eo=a(Y,"TD",{align:!0});var sl=s(Eo);za=l(sl,"82.1"),sl.forEach(t),Y.forEach(t),Aa=c(U),D=a(U,"TR",{});var J=s(D);xo=a(J,"TD",{align:!0});var nl=s(xo);Da=l(nl,"m48"),nl.forEach(t),La=c(J),dt=a(J,"TD",{});var ll=s(dt);Na=l(ll,"[8, 8, 24, 8]"),ll.forEach(t),Oa=c(J),mt=a(J,"TD",{});var il=s(mt);qa=l(il,"[96, 192, 384, 768]"),il.forEach(t),Sa=c(J),Co=a(J,"TD",{align:!0});var cl=s(Co);Ha=l(cl,"73"),cl.forEach(t),Ra=c(J),Io=a(J,"TD",{align:!0});var dl=s(Io);Ba=l(dl,"82.5"),dl.forEach(t),J.forEach(t),U.forEach(t),lr.forEach(t),Bt=c(o),H=a(o,"P",{});var No=s(H);Ua=l(No,"This model was contributed by "),Ae=a(No,"A",{href:!0,rel:!0});var ml=s(Ae);Va=l(ml,"heytanay"),ml.forEach(t),Ga=l(No,". The original code can be found "),De=a(No,"A",{href:!0,rel:!0});var fl=s(De);Wa=l(fl,"here"),fl.forEach(t),Ya=l(No,"."),No.forEach(t),Ut=c(o),oe=a(o,"H2",{class:!0});var ir=s(oe);_e=a(ir,"A",{id:!0,class:!0,href:!0});var hl=s(_e);ft=a(hl,"SPAN",{});var pl=s(ft);_(Le.$$.fragment,pl),pl.forEach(t),hl.forEach(t),Ja=c(ir),ht=a(ir,"SPAN",{});var ul=s(ht);Ka=l(ul,"PoolFormer specific outputs"),ul.forEach(t),ir.forEach(t),Vt=c(o),te=a(o,"DIV",{class:!0});var cr=s(te);_(Ne.$$.fragment,cr),Xa=c(cr),pt=a(cr,"P",{});var gl=s(pt);Za=l(gl,"Class for PoolFormerModel\u2019s outputs, with potential hidden states."),gl.forEach(t),cr.forEach(t),Gt=c(o),re=a(o,"DIV",{class:!0});var dr=s(re);_(Oe.$$.fragment,dr),Qa=c(dr),ut=a(dr,"P",{});var _l=s(ut);es=l(_l,"Class for PoolformerForImageClassification\u2019s outputs."),_l.forEach(t),dr.forEach(t),Wt=c(o),ae=a(o,"H2",{class:!0});var mr=s(ae);ve=a(mr,"A",{id:!0,class:!0,href:!0});var vl=s(ve);gt=a(vl,"SPAN",{});var Fl=s(gt);_(qe.$$.fragment,Fl),Fl.forEach(t),vl.forEach(t),os=c(mr),_t=a(mr,"SPAN",{});var Pl=s(_t);ts=l(Pl,"PoolFormerConfig"),Pl.forEach(t),mr.forEach(t),Yt=c(o),y=a(o,"DIV",{class:!0});var K=s(y);_(Se.$$.fragment,K),rs=c(K),se=a(K,"P",{});var Oo=s(se);as=l(Oo,"This is the configuration class to store the configuration of "),Mo=a(Oo,"A",{href:!0});var wl=s(Mo);ss=l(wl,"PoolFormerModel"),wl.forEach(t),ns=l(Oo,`. It is used to instantiate a
PoolFormer 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 PoolFormer
`),He=a(Oo,"A",{href:!0,rel:!0});var bl=s(He);ls=l(bl,"sail/poolformer_s12"),bl.forEach(t),is=l(Oo," architecture."),Oo.forEach(t),cs=c(K),ne=a(K,"P",{});var qo=s(ne);ds=l(qo,"Configuration objects inherit from "),ko=a(qo,"A",{href:!0});var $l=s(ko);ms=l($l,"PretrainedConfig"),$l.forEach(t),fs=l(qo,` and can be used to control the model outputs. Read the
documentation from `),jo=a(qo,"A",{href:!0});var Tl=s(jo);hs=l(Tl,"PretrainedConfig"),Tl.forEach(t),ps=l(qo," for more information."),qo.forEach(t),us=c(K),vt=a(K,"P",{});var yl=s(vt);gs=l(yl,"Example:"),yl.forEach(t),_s=c(K),_(Re.$$.fragment,K),K.forEach(t),Jt=c(o),le=a(o,"H2",{class:!0});var fr=s(le);Fe=a(fr,"A",{id:!0,class:!0,href:!0});var El=s(Fe);Ft=a(El,"SPAN",{});var xl=s(Ft);_(Be.$$.fragment,xl),xl.forEach(t),El.forEach(t),vs=c(fr),Pt=a(fr,"SPAN",{});var Cl=s(Pt);Fs=l(Cl,"PoolFormerFeatureExtractor"),Cl.forEach(t),fr.forEach(t),Kt=c(o),L=a(o,"DIV",{class:!0});var ye=s(L);_(Ue.$$.fragment,ye),Ps=c(ye),wt=a(ye,"P",{});var Il=s(wt);ws=l(Il,"Constructs a PoolFormer feature extractor."),Il.forEach(t),bs=c(ye),Ve=a(ye,"P",{});var hr=s(Ve);$s=l(hr,"This feature extractor inherits from "),zo=a(hr,"A",{href:!0});var Ml=s(zo);Ts=l(Ml,"FeatureExtractionMixin"),Ml.forEach(t),ys=l(hr,` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),hr.forEach(t),Es=c(ye),R=a(ye,"DIV",{class:!0});var So=s(R);_(Ge.$$.fragment,So),xs=c(So),bt=a(So,"P",{});var kl=s(bt);Cs=l(kl,"Main method to prepare for the model one or several image(s)."),kl.forEach(t),Is=c(So),_(Pe.$$.fragment,So),So.forEach(t),ye.forEach(t),Xt=c(o),ie=a(o,"H2",{class:!0});var pr=s(ie);we=a(pr,"A",{id:!0,class:!0,href:!0});var jl=s(we);$t=a(jl,"SPAN",{});var zl=s($t);_(We.$$.fragment,zl),zl.forEach(t),jl.forEach(t),Ms=c(pr),Tt=a(pr,"SPAN",{});var Al=s(Tt);ks=l(Al,"PoolFormerModel"),Al.forEach(t),pr.forEach(t),Zt=c(o),q=a(o,"DIV",{class:!0});var Ho=s(q);_(Ye.$$.fragment,Ho),js=c(Ho),Je=a(Ho,"P",{});var ur=s(Je);zs=l(ur,`The bare PoolFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ke=a(ur,"A",{href:!0,rel:!0});var Dl=s(Ke);As=l(Dl,"torch.nn.Module"),Dl.forEach(t),Ds=l(ur,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ur.forEach(t),Ls=c(Ho),E=a(Ho,"DIV",{class:!0});var X=s(E);_(Xe.$$.fragment,X),Ns=c(X),ce=a(X,"P",{});var Ro=s(ce);Os=l(Ro,"The "),Ao=a(Ro,"A",{href:!0});var Ll=s(Ao);qs=l(Ll,"PoolFormerModel"),Ll.forEach(t),Ss=l(Ro," forward method, overrides the "),yt=a(Ro,"CODE",{});var Nl=s(yt);Hs=l(Nl,"__call__"),Nl.forEach(t),Rs=l(Ro," special method."),Ro.forEach(t),Bs=c(X),_(be.$$.fragment,X),Us=c(X),Et=a(X,"P",{});var Ol=s(Et);Vs=l(Ol,"Example:"),Ol.forEach(t),Gs=c(X),_(Ze.$$.fragment,X),X.forEach(t),Ho.forEach(t),Qt=c(o),de=a(o,"H2",{class:!0});var gr=s(de);$e=a(gr,"A",{id:!0,class:!0,href:!0});var ql=s($e);xt=a(ql,"SPAN",{});var Sl=s(xt);_(Qe.$$.fragment,Sl),Sl.forEach(t),ql.forEach(t),Ws=c(gr),Ct=a(gr,"SPAN",{});var Hl=s(Ct);Ys=l(Hl,"PoolFormerForImageClassification"),Hl.forEach(t),gr.forEach(t),er=c(o),N=a(o,"DIV",{class:!0});var Ee=s(N);_(eo.$$.fragment,Ee),Js=c(Ee),It=a(Ee,"P",{});var Rl=s(It);Ks=l(Rl,"PoolFormer Model transformer with an image classification head on top"),Rl.forEach(t),Xs=c(Ee),oo=a(Ee,"P",{});var _r=s(oo);Zs=l(_r,"This model is a PyTorch "),to=a(_r,"A",{href:!0,rel:!0});var Bl=s(to);Qs=l(Bl,"torch.nn.Module"),Bl.forEach(t),en=l(_r,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),_r.forEach(t),on=c(Ee),x=a(Ee,"DIV",{class:!0});var Z=s(x);_(ro.$$.fragment,Z),tn=c(Z),me=a(Z,"P",{});var Bo=s(me);rn=l(Bo,"The "),Do=a(Bo,"A",{href:!0});var Ul=s(Do);an=l(Ul,"PoolFormerForImageClassification"),Ul.forEach(t),sn=l(Bo," forward method, overrides the "),Mt=a(Bo,"CODE",{});var Vl=s(Mt);nn=l(Vl,"__call__"),Vl.forEach(t),ln=l(Bo," special method."),Bo.forEach(t),cn=c(Z),_(Te.$$.fragment,Z),dn=c(Z),kt=a(Z,"P",{});var Gl=s(kt);mn=l(Gl,"Example:"),Gl.forEach(t),fn=c(Z),_(ao.$$.fragment,Z),Z.forEach(t),Ee.forEach(t),this.h()},h(){d(h,"name","hf:doc:metadata"),d(h,"content",JSON.stringify(ti)),d(u,"id","poolformer"),d(u,"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"),d(u,"href","#poolformer"),d(p,"class","relative group"),d(he,"id","overview"),d(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"),d(he,"href","#overview"),d(ee,"class","relative group"),d(Ce,"href","https://arxiv.org/abs/2111.11418"),d(Ce,"rel","nofollow"),d(Ie,"href","https://arxiv.org/abs/2111.11418"),d(Ie,"rel","nofollow"),d(Me,"width","600"),Xl(Me.src,un="https://user-images.githubusercontent.com/15921929/142746124-1ab7635d-2536-4a0e-ad43-b4fe2c5a525d.png")||d(Me,"src",un),d(je,"href","https://huggingface.co/models?other=poolformer"),d(je,"rel","nofollow"),d(mo,"href","/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor"),d(fo,"align","center"),d(ho,"align","center"),d(po,"align","center"),d(uo,"align","center"),d(go,"align","center"),d(_o,"align","center"),d(vo,"align","center"),d(Fo,"align","center"),d(Po,"align","center"),d(wo,"align","center"),d(bo,"align","center"),d($o,"align","center"),d(To,"align","center"),d(yo,"align","center"),d(Eo,"align","center"),d(xo,"align","center"),d(Co,"align","center"),d(Io,"align","center"),d(Ae,"href","https://huggingface.co/heytanay"),d(Ae,"rel","nofollow"),d(De,"href","https://github.com/sail-sg/poolformer"),d(De,"rel","nofollow"),d(_e,"id","transformers.models.poolformer.modeling_poolformer.PoolFormerModelOutput"),d(_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"),d(_e,"href","#transformers.models.poolformer.modeling_poolformer.PoolFormerModelOutput"),d(oe,"class","relative group"),d(te,"class","docstring"),d(re,"class","docstring"),d(ve,"id","transformers.PoolFormerConfig"),d(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"),d(ve,"href","#transformers.PoolFormerConfig"),d(ae,"class","relative group"),d(Mo,"href","/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.PoolFormerModel"),d(He,"href","https://huggingface.co/sail/poolformer_s12"),d(He,"rel","nofollow"),d(ko,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),d(jo,"href","/docs/transformers/pr_15839/en/main_classes/configuration#transformers.PretrainedConfig"),d(y,"class","docstring"),d(Fe,"id","transformers.PoolFormerFeatureExtractor"),d(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"),d(Fe,"href","#transformers.PoolFormerFeatureExtractor"),d(le,"class","relative group"),d(zo,"href","/docs/transformers/pr_15839/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin"),d(R,"class","docstring"),d(L,"class","docstring"),d(we,"id","transformers.PoolFormerModel"),d(we,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(we,"href","#transformers.PoolFormerModel"),d(ie,"class","relative group"),d(Ke,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Ke,"rel","nofollow"),d(Ao,"href","/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.PoolFormerModel"),d(E,"class","docstring"),d(q,"class","docstring"),d($e,"id","transformers.PoolFormerForImageClassification"),d($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"),d($e,"href","#transformers.PoolFormerForImageClassification"),d(de,"class","relative group"),d(to,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(to,"rel","nofollow"),d(Do,"href","/docs/transformers/pr_15839/en/model_doc/poolformer#transformers.PoolFormerForImageClassification"),d(x,"class","docstring"),d(N,"class","docstring")},m(o,m){e(document.head,h),f(o,$,m),f(o,p,m),e(p,u),e(u,C),v(b,C,null),e(p,T),e(p,O),e(O,vr),f(o,At,m),f(o,ee,m),e(ee,he),e(he,Uo),v(xe,Uo,null),e(ee,Fr),e(ee,Vo),e(Vo,Pr),f(o,Dt,m),f(o,pe,m),e(pe,wr),e(pe,Ce),e(Ce,br),e(pe,$r),f(o,Lt,m),f(o,lo,m),e(lo,Tr),f(o,Nt,m),f(o,io,m),e(io,Go),e(Go,yr),f(o,Ot,m),f(o,ue,m),e(ue,Er),e(ue,Ie),e(Ie,xr),e(ue,Cr),f(o,qt,m),f(o,Me,m),f(o,St,m),f(o,co,m),e(co,Ir),f(o,Ht,m),f(o,S,m),e(S,ke),e(ke,Mr),e(ke,je),e(je,kr),e(ke,jr),e(S,zr),e(S,ze),e(ze,Ar),e(ze,mo),e(mo,Dr),e(ze,Lr),e(S,Nr),e(S,Wo),e(Wo,Or),f(o,Rt,m),f(o,ge,m),e(ge,Yo),e(Yo,I),e(I,fo),e(fo,Jo),e(Jo,qr),e(I,Sr),e(I,Ko),e(Ko,Xo),e(Xo,Hr),e(I,Rr),e(I,Zo),e(Zo,Qo),e(Qo,Br),e(I,Ur),e(I,ho),e(ho,et),e(et,Vr),e(I,Gr),e(I,po),e(po,ot),e(ot,Wr),e(ge,Yr),e(ge,M),e(M,k),e(k,uo),e(uo,Jr),e(k,Kr),e(k,tt),e(tt,Xr),e(k,Zr),e(k,rt),e(rt,Qr),e(k,ea),e(k,go),e(go,oa),e(k,ta),e(k,_o),e(_o,ra),e(M,aa),e(M,j),e(j,vo),e(vo,sa),e(j,na),e(j,at),e(at,la),e(j,ia),e(j,st),e(st,ca),e(j,da),e(j,Fo),e(Fo,ma),e(j,fa),e(j,Po),e(Po,ha),e(M,pa),e(M,z),e(z,wo),e(wo,ua),e(z,ga),e(z,nt),e(nt,_a),e(z,va),e(z,lt),e(lt,Fa),e(z,Pa),e(z,bo),e(bo,wa),e(z,ba),e(z,$o),e($o,$a),e(M,Ta),e(M,A),e(A,To),e(To,ya),e(A,Ea),e(A,it),e(it,xa),e(A,Ca),e(A,ct),e(ct,Ia),e(A,Ma),e(A,yo),e(yo,ka),e(A,ja),e(A,Eo),e(Eo,za),e(M,Aa),e(M,D),e(D,xo),e(xo,Da),e(D,La),e(D,dt),e(dt,Na),e(D,Oa),e(D,mt),e(mt,qa),e(D,Sa),e(D,Co),e(Co,Ha),e(D,Ra),e(D,Io),e(Io,Ba),f(o,Bt,m),f(o,H,m),e(H,Ua),e(H,Ae),e(Ae,Va),e(H,Ga),e(H,De),e(De,Wa),e(H,Ya),f(o,Ut,m),f(o,oe,m),e(oe,_e),e(_e,ft),v(Le,ft,null),e(oe,Ja),e(oe,ht),e(ht,Ka),f(o,Vt,m),f(o,te,m),v(Ne,te,null),e(te,Xa),e(te,pt),e(pt,Za),f(o,Gt,m),f(o,re,m),v(Oe,re,null),e(re,Qa),e(re,ut),e(ut,es),f(o,Wt,m),f(o,ae,m),e(ae,ve),e(ve,gt),v(qe,gt,null),e(ae,os),e(ae,_t),e(_t,ts),f(o,Yt,m),f(o,y,m),v(Se,y,null),e(y,rs),e(y,se),e(se,as),e(se,Mo),e(Mo,ss),e(se,ns),e(se,He),e(He,ls),e(se,is),e(y,cs),e(y,ne),e(ne,ds),e(ne,ko),e(ko,ms),e(ne,fs),e(ne,jo),e(jo,hs),e(ne,ps),e(y,us),e(y,vt),e(vt,gs),e(y,_s),v(Re,y,null),f(o,Jt,m),f(o,le,m),e(le,Fe),e(Fe,Ft),v(Be,Ft,null),e(le,vs),e(le,Pt),e(Pt,Fs),f(o,Kt,m),f(o,L,m),v(Ue,L,null),e(L,Ps),e(L,wt),e(wt,ws),e(L,bs),e(L,Ve),e(Ve,$s),e(Ve,zo),e(zo,Ts),e(Ve,ys),e(L,Es),e(L,R),v(Ge,R,null),e(R,xs),e(R,bt),e(bt,Cs),e(R,Is),v(Pe,R,null),f(o,Xt,m),f(o,ie,m),e(ie,we),e(we,$t),v(We,$t,null),e(ie,Ms),e(ie,Tt),e(Tt,ks),f(o,Zt,m),f(o,q,m),v(Ye,q,null),e(q,js),e(q,Je),e(Je,zs),e(Je,Ke),e(Ke,As),e(Je,Ds),e(q,Ls),e(q,E),v(Xe,E,null),e(E,Ns),e(E,ce),e(ce,Os),e(ce,Ao),e(Ao,qs),e(ce,Ss),e(ce,yt),e(yt,Hs),e(ce,Rs),e(E,Bs),v(be,E,null),e(E,Us),e(E,Et),e(Et,Vs),e(E,Gs),v(Ze,E,null),f(o,Qt,m),f(o,de,m),e(de,$e),e($e,xt),v(Qe,xt,null),e(de,Ws),e(de,Ct),e(Ct,Ys),f(o,er,m),f(o,N,m),v(eo,N,null),e(N,Js),e(N,It),e(It,Ks),e(N,Xs),e(N,oo),e(oo,Zs),e(oo,to),e(to,Qs),e(oo,en),e(N,on),e(N,x),v(ro,x,null),e(x,tn),e(x,me),e(me,rn),e(me,Do),e(Do,an),e(me,sn),e(me,Mt),e(Mt,nn),e(me,ln),e(x,cn),v(Te,x,null),e(x,dn),e(x,kt),e(kt,mn),e(x,fn),v(ao,x,null),or=!0},p(o,[m]){const so={};m&2&&(so.$$scope={dirty:m,ctx:o}),Pe.$set(so);const jt={};m&2&&(jt.$$scope={dirty:m,ctx:o}),be.$set(jt);const zt={};m&2&&(zt.$$scope={dirty:m,ctx:o}),Te.$set(zt)},i(o){or||(F(b.$$.fragment,o),F(xe.$$.fragment,o),F(Le.$$.fragment,o),F(Ne.$$.fragment,o),F(Oe.$$.fragment,o),F(qe.$$.fragment,o),F(Se.$$.fragment,o),F(Re.$$.fragment,o),F(Be.$$.fragment,o),F(Ue.$$.fragment,o),F(Ge.$$.fragment,o),F(Pe.$$.fragment,o),F(We.$$.fragment,o),F(Ye.$$.fragment,o),F(Xe.$$.fragment,o),F(be.$$.fragment,o),F(Ze.$$.fragment,o),F(Qe.$$.fragment,o),F(eo.$$.fragment,o),F(ro.$$.fragment,o),F(Te.$$.fragment,o),F(ao.$$.fragment,o),or=!0)},o(o){P(b.$$.fragment,o),P(xe.$$.fragment,o),P(Le.$$.fragment,o),P(Ne.$$.fragment,o),P(Oe.$$.fragment,o),P(qe.$$.fragment,o),P(Se.$$.fragment,o),P(Re.$$.fragment,o),P(Be.$$.fragment,o),P(Ue.$$.fragment,o),P(Ge.$$.fragment,o),P(Pe.$$.fragment,o),P(We.$$.fragment,o),P(Ye.$$.fragment,o),P(Xe.$$.fragment,o),P(be.$$.fragment,o),P(Ze.$$.fragment,o),P(Qe.$$.fragment,o),P(eo.$$.fragment,o),P(ro.$$.fragment,o),P(Te.$$.fragment,o),P(ao.$$.fragment,o),or=!1},d(o){t(h),o&&t($),o&&t(p),w(b),o&&t(At),o&&t(ee),w(xe),o&&t(Dt),o&&t(pe),o&&t(Lt),o&&t(lo),o&&t(Nt),o&&t(io),o&&t(Ot),o&&t(ue),o&&t(qt),o&&t(Me),o&&t(St),o&&t(co),o&&t(Ht),o&&t(S),o&&t(Rt),o&&t(ge),o&&t(Bt),o&&t(H),o&&t(Ut),o&&t(oe),w(Le),o&&t(Vt),o&&t(te),w(Ne),o&&t(Gt),o&&t(re),w(Oe),o&&t(Wt),o&&t(ae),w(qe),o&&t(Yt),o&&t(y),w(Se),w(Re),o&&t(Jt),o&&t(le),w(Be),o&&t(Kt),o&&t(L),w(Ue),w(Ge),w(Pe),o&&t(Xt),o&&t(ie),w(We),o&&t(Zt),o&&t(q),w(Ye),w(Xe),w(be),w(Ze),o&&t(Qt),o&&t(de),w(Qe),o&&t(er),o&&t(N),w(eo),w(ro),w(Te),w(ao)}}}const ti={local:"poolformer",sections:[{local:"overview",title:"Overview"},{local:"transformers.models.poolformer.modeling_poolformer.PoolFormerModelOutput",title:"PoolFormer specific outputs"},{local:"transformers.PoolFormerConfig",title:"PoolFormerConfig"},{local:"transformers.PoolFormerFeatureExtractor",title:"PoolFormerFeatureExtractor"},{local:"transformers.PoolFormerModel",title:"PoolFormerModel"},{local:"transformers.PoolFormerForImageClassification",title:"PoolFormerForImageClassification"}],title:"PoolFormer"};function ri(Q,h,$){let{fw:p}=h;return Q.$$set=u=>{"fw"in u&&$(0,p=u.fw)},[p]}class di extends Wl{constructor(h){super();Yl(this,h,ri,oi,Jl,{fw:0})}}export{di as default,ti as metadata};
