import{S as cl,i as dl,s as ml,e as r,k as i,w as P,t as n,M as fl,c as a,d as o,m as c,a as s,x as b,h as l,b as d,N as hl,G as e,g as p,y as w,q as $,o as y,B as E,v as pl,L as qs}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ds}from"../../chunks/Tip-hf-doc-builder.js";import{D as Qe}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Os}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as No}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ns}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ul(T){let f,v,g,u,F;return u=new Os({props:{code:`from transformers import PoolFormerConfig, PoolFormerModel

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

# Initializing a model (with random weights) 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> PoolFormerConfig, PoolFormerModel

<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 (with random weights) 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`}}),{c(){f=r("p"),v=n("Example:"),g=i(),P(u.$$.fragment)},l(m){f=a(m,"P",{});var _=s(f);v=l(_,"Example:"),_.forEach(o),g=c(m),b(u.$$.fragment,m)},m(m,_){p(m,f,_),e(f,v),p(m,g,_),w(u,m,_),F=!0},p:qs,i(m){F||($(u.$$.fragment,m),F=!0)},o(m){y(u.$$.fragment,m),F=!1},d(m){m&&o(f),m&&o(g),E(u,m)}}}function gl(T){let f,v;return{c(){f=r("p"),v=n(`NumPy arrays and PyTorch tensors are converted to PIL images when resizing, so the most efficient is to pass
PIL images.`)},l(g){f=a(g,"P",{});var u=s(f);v=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(o)},m(g,u){p(g,f,u),e(f,v)},d(g){g&&o(f)}}}function _l(T){let f,v,g,u,F;return{c(){f=r("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r("code"),u=n("Module"),F=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(m){f=a(m,"P",{});var _=s(f);v=l(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(_,"CODE",{});var O=s(g);u=l(O,"Module"),O.forEach(o),F=l(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(o)},m(m,_){p(m,f,_),e(f,v),e(f,g),e(g,u),e(f,F)},d(m){m&&o(f)}}}function vl(T){let f,v,g,u,F;return u=new Os({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>]`}}),{c(){f=r("p"),v=n("Example:"),g=i(),P(u.$$.fragment)},l(m){f=a(m,"P",{});var _=s(f);v=l(_,"Example:"),_.forEach(o),g=c(m),b(u.$$.fragment,m)},m(m,_){p(m,f,_),e(f,v),p(m,g,_),w(u,m,_),F=!0},p:qs,i(m){F||($(u.$$.fragment,m),F=!0)},o(m){y(u.$$.fragment,m),F=!1},d(m){m&&o(f),m&&o(g),E(u,m)}}}function Fl(T){let f,v,g,u,F;return{c(){f=r("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r("code"),u=n("Module"),F=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(m){f=a(m,"P",{});var _=s(f);v=l(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(_,"CODE",{});var O=s(g);u=l(O,"Module"),O.forEach(o),F=l(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(o)},m(m,_){p(m,f,_),e(f,v),e(f,g),e(g,u),e(f,F)},d(m){m&&o(f)}}}function Pl(T){let f,v,g,u,F;return u=new Os({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(){f=r("p"),v=n("Example:"),g=i(),P(u.$$.fragment)},l(m){f=a(m,"P",{});var _=s(f);v=l(_,"Example:"),_.forEach(o),g=c(m),b(u.$$.fragment,m)},m(m,_){p(m,f,_),e(f,v),p(m,g,_),w(u,m,_),F=!0},p:qs,i(m){F||($(u.$$.fragment,m),F=!0)},o(m){y(u.$$.fragment,m),F=!1},d(m){m&&o(f),m&&o(g),E(u,m)}}}function bl(T){let f,v,g,u,F,m,_,O,er,$t,X,ne,qo,Ee,or,Oo,tr,yt,le,rr,Te,ar,sr,Et,eo,nr,Tt,oo,Ro,lr,xt,ie,ir,xe,cr,dr,It,Ie,Rs,kt,to,mr,Ct,S,ke,fr,Ce,hr,pr,ur,Me,gr,ro,_r,vr,Fr,So,Pr,Mt,ce,Bo,x,ao,Ho,br,wr,Uo,Wo,$r,yr,Vo,Go,Er,Tr,so,Yo,xr,Ir,no,Jo,kr,Cr,I,k,lo,Mr,jr,Ko,Ar,zr,Xo,Lr,Dr,io,Nr,qr,co,Or,Rr,C,mo,Sr,Br,Zo,Hr,Ur,Qo,Wr,Vr,fo,Gr,Yr,ho,Jr,Kr,M,po,Xr,Zr,et,Qr,ea,ot,oa,ta,uo,ra,aa,go,sa,na,j,_o,la,ia,tt,ca,da,rt,ma,fa,vo,ha,pa,Fo,ua,ga,A,Po,_a,va,at,Fa,Pa,st,ba,wa,bo,$a,ya,wo,Ea,jt,B,Ta,je,xa,Ia,Ae,ka,Ca,At,Z,de,nt,ze,Ma,lt,ja,zt,z,Le,Aa,Q,za,$o,La,Da,De,Na,qa,Oa,ee,Ra,yo,Sa,Ba,Eo,Ha,Ua,Wa,me,Lt,oe,fe,it,Ne,Va,ct,Ga,Dt,L,qe,Ya,dt,Ja,Ka,Oe,Xa,To,Za,Qa,es,H,Re,os,mt,ts,rs,he,Nt,te,pe,ft,Se,as,ht,ss,qt,R,Be,ns,He,ls,Ue,is,cs,ds,N,We,ms,re,fs,xo,hs,ps,pt,us,gs,_s,ue,vs,ge,Ot,ae,_e,ut,Ve,Fs,gt,Ps,Rt,D,Ge,bs,_t,ws,$s,Ye,ys,Je,Es,Ts,xs,q,Ke,Is,se,ks,Io,Cs,Ms,vt,js,As,zs,ve,Ls,Fe,St;return m=new No({}),Ee=new No({}),ze=new No({}),Le=new Qe({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:""}],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"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/poolformer/configuration_poolformer.py#L29"}}),me=new Ns({props:{anchor:"transformers.PoolFormerConfig.example",$$slots:{default:[ul]},$$scope:{ctx:T}}}),Ne=new No({}),qe=new Qe({props:{name:"class transformers.PoolFormerFeatureExtractor",anchor:"transformers.PoolFormerFeatureExtractor",parameters:[{name:"do_resize_and_center_crop",val:" = True"},{name:"size",val:" = 224"},{name:"resample",val:" = <Resampling.BICUBIC: 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:""}],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.Resampling.BICUBIC</code>) &#x2014;
An optional resampling filter. This can be one of <code>PIL.Image.Resampling.NEAREST</code>,
<code>PIL.Image.Resampling.BOX</code>, <code>PIL.Image.Resampling.BILINEAR</code>, <code>PIL.Image.Resampling.HAMMING</code>,
<code>PIL.Image.Resampling.BICUBIC</code> or <code>PIL.Image.Resampling.LANCZOS</code>. Only has an effect if <code>do_resize</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"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/poolformer/feature_extraction_poolformer.py#L39"}}),Re=new Qe({props:{name:"__call__",anchor:"transformers.PoolFormerFeatureExtractor.__call__",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:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"**kwargs",val:""}],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_19907/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"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/poolformer/feature_extraction_poolformer.py#L91",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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_19907/en/main_classes/feature_extractor#transformers.BatchFeature"
>BatchFeature</a></p>
`}}),he=new Ds({props:{warning:!0,$$slots:{default:[gl]},$$scope:{ctx:T}}}),Se=new No({}),Be=new Qe({props:{name:"class transformers.PoolFormerModel",anchor:"transformers.PoolFormerModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.PoolFormerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/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_19907/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/vr_19907/src/transformers/models/poolformer/modeling_poolformer.py#L314"}}),We=new Qe({props:{name:"forward",anchor:"transformers.PoolFormerModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],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_19907/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor">PoolFormerFeatureExtractor</a>. See
<a href="/docs/transformers/pr_19907/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor.__call__">PoolFormerFeatureExtractor.<strong>call</strong>()</a> for details.`,name:"pixel_values"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/poolformer/modeling_poolformer.py#L327",returnDescription:`
<p>A <code>transformers.modeling_outputs.BaseModelOutputWithNoAttention</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/pr_19907/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, 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>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.BaseModelOutputWithNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ue=new Ds({props:{$$slots:{default:[_l]},$$scope:{ctx:T}}}),ge=new Ns({props:{anchor:"transformers.PoolFormerModel.forward.example",$$slots:{default:[vl]},$$scope:{ctx:T}}}),Ve=new No({}),Ge=new Qe({props:{name:"class transformers.PoolFormerForImageClassification",anchor:"transformers.PoolFormerForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.PoolFormerForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/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_19907/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/vr_19907/src/transformers/models/poolformer/modeling_poolformer.py#L382"}}),Ke=new Qe({props:{name:"forward",anchor:"transformers.PoolFormerForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.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.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_19907/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor">PoolFormerFeatureExtractor</a>. See
<a href="/docs/transformers/pr_19907/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"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/poolformer/modeling_poolformer.py#L398",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/poolformer#transformers.PoolFormerConfig"
>PoolFormerConfig</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/pr_19907/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ve=new Ds({props:{$$slots:{default:[Fl]},$$scope:{ctx:T}}}),Fe=new Ns({props:{anchor:"transformers.PoolFormerForImageClassification.forward.example",$$slots:{default:[Pl]},$$scope:{ctx:T}}}),{c(){f=r("meta"),v=i(),g=r("h1"),u=r("a"),F=r("span"),P(m.$$.fragment),_=i(),O=r("span"),er=n("PoolFormer"),$t=i(),X=r("h2"),ne=r("a"),qo=r("span"),P(Ee.$$.fragment),or=i(),Oo=r("span"),tr=n("Overview"),yt=i(),le=r("p"),rr=n("The PoolFormer model was proposed in "),Te=r("a"),ar=n("MetaFormer is Actually What You Need for Vision"),sr=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."),Et=i(),eo=r("p"),nr=n("The abstract from the paper is the following:"),Tt=i(),oo=r("p"),Ro=r("em"),lr=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."),xt=i(),ie=r("p"),ir=n("The figure below illustrates the architecture of PoolFormer. Taken from the "),xe=r("a"),cr=n("original paper"),dr=n("."),It=i(),Ie=r("img"),kt=i(),to=r("p"),mr=n("Tips:"),Ct=i(),S=r("ul"),ke=r("li"),fr=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 "),Ce=r("a"),hr=n("hub"),pr=n("."),ur=i(),Me=r("li"),gr=n("One can use "),ro=r("a"),_r=n("PoolFormerFeatureExtractor"),vr=n(" to prepare images for the model."),Fr=i(),So=r("li"),Pr=n("As most models, PoolFormer comes in different sizes, the details of which can be found in the table below."),Mt=i(),ce=r("table"),Bo=r("thead"),x=r("tr"),ao=r("th"),Ho=r("strong"),br=n("Model variant"),wr=i(),Uo=r("th"),Wo=r("strong"),$r=n("Depths"),yr=i(),Vo=r("th"),Go=r("strong"),Er=n("Hidden sizes"),Tr=i(),so=r("th"),Yo=r("strong"),xr=n("Params (M)"),Ir=i(),no=r("th"),Jo=r("strong"),kr=n("ImageNet-1k Top 1"),Cr=i(),I=r("tbody"),k=r("tr"),lo=r("td"),Mr=n("s12"),jr=i(),Ko=r("td"),Ar=n("[2, 2, 6, 2]"),zr=i(),Xo=r("td"),Lr=n("[64, 128, 320, 512]"),Dr=i(),io=r("td"),Nr=n("12"),qr=i(),co=r("td"),Or=n("77.2"),Rr=i(),C=r("tr"),mo=r("td"),Sr=n("s24"),Br=i(),Zo=r("td"),Hr=n("[4, 4, 12, 4]"),Ur=i(),Qo=r("td"),Wr=n("[64, 128, 320, 512]"),Vr=i(),fo=r("td"),Gr=n("21"),Yr=i(),ho=r("td"),Jr=n("80.3"),Kr=i(),M=r("tr"),po=r("td"),Xr=n("s36"),Zr=i(),et=r("td"),Qr=n("[6, 6, 18, 6]"),ea=i(),ot=r("td"),oa=n("[64, 128, 320, 512]"),ta=i(),uo=r("td"),ra=n("31"),aa=i(),go=r("td"),sa=n("81.4"),na=i(),j=r("tr"),_o=r("td"),la=n("m36"),ia=i(),tt=r("td"),ca=n("[6, 6, 18, 6]"),da=i(),rt=r("td"),ma=n("[96, 192, 384, 768]"),fa=i(),vo=r("td"),ha=n("56"),pa=i(),Fo=r("td"),ua=n("82.1"),ga=i(),A=r("tr"),Po=r("td"),_a=n("m48"),va=i(),at=r("td"),Fa=n("[8, 8, 24, 8]"),Pa=i(),st=r("td"),ba=n("[96, 192, 384, 768]"),wa=i(),bo=r("td"),$a=n("73"),ya=i(),wo=r("td"),Ea=n("82.5"),jt=i(),B=r("p"),Ta=n("This model was contributed by "),je=r("a"),xa=n("heytanay"),Ia=n(". The original code can be found "),Ae=r("a"),ka=n("here"),Ca=n("."),At=i(),Z=r("h2"),de=r("a"),nt=r("span"),P(ze.$$.fragment),Ma=i(),lt=r("span"),ja=n("PoolFormerConfig"),zt=i(),z=r("div"),P(Le.$$.fragment),Aa=i(),Q=r("p"),za=n("This is the configuration class to store the configuration of "),$o=r("a"),La=n("PoolFormerModel"),Da=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
`),De=r("a"),Na=n("sail/poolformer_s12"),qa=n(" architecture."),Oa=i(),ee=r("p"),Ra=n("Configuration objects inherit from "),yo=r("a"),Sa=n("PretrainedConfig"),Ba=n(` and can be used to control the model outputs. Read the
documentation from `),Eo=r("a"),Ha=n("PretrainedConfig"),Ua=n(" for more information."),Wa=i(),P(me.$$.fragment),Lt=i(),oe=r("h2"),fe=r("a"),it=r("span"),P(Ne.$$.fragment),Va=i(),ct=r("span"),Ga=n("PoolFormerFeatureExtractor"),Dt=i(),L=r("div"),P(qe.$$.fragment),Ya=i(),dt=r("p"),Ja=n("Constructs a PoolFormer feature extractor."),Ka=i(),Oe=r("p"),Xa=n("This feature extractor inherits from "),To=r("a"),Za=n("FeatureExtractionMixin"),Qa=n(` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),es=i(),H=r("div"),P(Re.$$.fragment),os=i(),mt=r("p"),ts=n("Main method to prepare for the model one or several image(s)."),rs=i(),P(he.$$.fragment),Nt=i(),te=r("h2"),pe=r("a"),ft=r("span"),P(Se.$$.fragment),as=i(),ht=r("span"),ss=n("PoolFormerModel"),qt=i(),R=r("div"),P(Be.$$.fragment),ns=i(),He=r("p"),ls=n(`The bare PoolFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ue=r("a"),is=n("torch.nn.Module"),cs=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.`),ds=i(),N=r("div"),P(We.$$.fragment),ms=i(),re=r("p"),fs=n("The "),xo=r("a"),hs=n("PoolFormerModel"),ps=n(" forward method, overrides the "),pt=r("code"),us=n("__call__"),gs=n(" special method."),_s=i(),P(ue.$$.fragment),vs=i(),P(ge.$$.fragment),Ot=i(),ae=r("h2"),_e=r("a"),ut=r("span"),P(Ve.$$.fragment),Fs=i(),gt=r("span"),Ps=n("PoolFormerForImageClassification"),Rt=i(),D=r("div"),P(Ge.$$.fragment),bs=i(),_t=r("p"),ws=n("PoolFormer Model transformer with an image classification head on top"),$s=i(),Ye=r("p"),ys=n("This model is a PyTorch "),Je=r("a"),Es=n("torch.nn.Module"),Ts=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.`),xs=i(),q=r("div"),P(Ke.$$.fragment),Is=i(),se=r("p"),ks=n("The "),Io=r("a"),Cs=n("PoolFormerForImageClassification"),Ms=n(" forward method, overrides the "),vt=r("code"),js=n("__call__"),As=n(" special method."),zs=i(),P(ve.$$.fragment),Ls=i(),P(Fe.$$.fragment),this.h()},l(t){const h=fl('[data-svelte="svelte-1phssyn"]',document.head);f=a(h,"META",{name:!0,content:!0}),h.forEach(o),v=c(t),g=a(t,"H1",{class:!0});var Xe=s(g);u=a(Xe,"A",{id:!0,class:!0,href:!0});var Ft=s(u);F=a(Ft,"SPAN",{});var Pt=s(F);b(m.$$.fragment,Pt),Pt.forEach(o),Ft.forEach(o),_=c(Xe),O=a(Xe,"SPAN",{});var bt=s(O);er=l(bt,"PoolFormer"),bt.forEach(o),Xe.forEach(o),$t=c(t),X=a(t,"H2",{class:!0});var Ze=s(X);ne=a(Ze,"A",{id:!0,class:!0,href:!0});var wt=s(ne);qo=a(wt,"SPAN",{});var Ss=s(qo);b(Ee.$$.fragment,Ss),Ss.forEach(o),wt.forEach(o),or=c(Ze),Oo=a(Ze,"SPAN",{});var Bs=s(Oo);tr=l(Bs,"Overview"),Bs.forEach(o),Ze.forEach(o),yt=c(t),le=a(t,"P",{});var Bt=s(le);rr=l(Bt,"The PoolFormer model was proposed in "),Te=a(Bt,"A",{href:!0,rel:!0});var Hs=s(Te);ar=l(Hs,"MetaFormer is Actually What You Need for Vision"),Hs.forEach(o),sr=l(Bt,"  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."),Bt.forEach(o),Et=c(t),eo=a(t,"P",{});var Us=s(eo);nr=l(Us,"The abstract from the paper is the following:"),Us.forEach(o),Tt=c(t),oo=a(t,"P",{});var Ws=s(oo);Ro=a(Ws,"EM",{});var Vs=s(Ro);lr=l(Vs,"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."),Vs.forEach(o),Ws.forEach(o),xt=c(t),ie=a(t,"P",{});var Ht=s(ie);ir=l(Ht,"The figure below illustrates the architecture of PoolFormer. Taken from the "),xe=a(Ht,"A",{href:!0,rel:!0});var Gs=s(xe);cr=l(Gs,"original paper"),Gs.forEach(o),dr=l(Ht,"."),Ht.forEach(o),It=c(t),Ie=a(t,"IMG",{width:!0,src:!0}),kt=c(t),to=a(t,"P",{});var Ys=s(to);mr=l(Ys,"Tips:"),Ys.forEach(o),Ct=c(t),S=a(t,"UL",{});var ko=s(S);ke=a(ko,"LI",{});var Ut=s(ke);fr=l(Ut,"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 "),Ce=a(Ut,"A",{href:!0,rel:!0});var Js=s(Ce);hr=l(Js,"hub"),Js.forEach(o),pr=l(Ut,"."),Ut.forEach(o),ur=c(ko),Me=a(ko,"LI",{});var Wt=s(Me);gr=l(Wt,"One can use "),ro=a(Wt,"A",{href:!0});var Ks=s(ro);_r=l(Ks,"PoolFormerFeatureExtractor"),Ks.forEach(o),vr=l(Wt," to prepare images for the model."),Wt.forEach(o),Fr=c(ko),So=a(ko,"LI",{});var Xs=s(So);Pr=l(Xs,"As most models, PoolFormer comes in different sizes, the details of which can be found in the table below."),Xs.forEach(o),ko.forEach(o),Mt=c(t),ce=a(t,"TABLE",{});var Vt=s(ce);Bo=a(Vt,"THEAD",{});var Zs=s(Bo);x=a(Zs,"TR",{});var U=s(x);ao=a(U,"TH",{align:!0});var Qs=s(ao);Ho=a(Qs,"STRONG",{});var en=s(Ho);br=l(en,"Model variant"),en.forEach(o),Qs.forEach(o),wr=c(U),Uo=a(U,"TH",{});var on=s(Uo);Wo=a(on,"STRONG",{});var tn=s(Wo);$r=l(tn,"Depths"),tn.forEach(o),on.forEach(o),yr=c(U),Vo=a(U,"TH",{});var rn=s(Vo);Go=a(rn,"STRONG",{});var an=s(Go);Er=l(an,"Hidden sizes"),an.forEach(o),rn.forEach(o),Tr=c(U),so=a(U,"TH",{align:!0});var sn=s(so);Yo=a(sn,"STRONG",{});var nn=s(Yo);xr=l(nn,"Params (M)"),nn.forEach(o),sn.forEach(o),Ir=c(U),no=a(U,"TH",{align:!0});var ln=s(no);Jo=a(ln,"STRONG",{});var cn=s(Jo);kr=l(cn,"ImageNet-1k Top 1"),cn.forEach(o),ln.forEach(o),U.forEach(o),Zs.forEach(o),Cr=c(Vt),I=a(Vt,"TBODY",{});var W=s(I);k=a(W,"TR",{});var V=s(k);lo=a(V,"TD",{align:!0});var dn=s(lo);Mr=l(dn,"s12"),dn.forEach(o),jr=c(V),Ko=a(V,"TD",{});var mn=s(Ko);Ar=l(mn,"[2, 2, 6, 2]"),mn.forEach(o),zr=c(V),Xo=a(V,"TD",{});var fn=s(Xo);Lr=l(fn,"[64, 128, 320, 512]"),fn.forEach(o),Dr=c(V),io=a(V,"TD",{align:!0});var hn=s(io);Nr=l(hn,"12"),hn.forEach(o),qr=c(V),co=a(V,"TD",{align:!0});var pn=s(co);Or=l(pn,"77.2"),pn.forEach(o),V.forEach(o),Rr=c(W),C=a(W,"TR",{});var G=s(C);mo=a(G,"TD",{align:!0});var un=s(mo);Sr=l(un,"s24"),un.forEach(o),Br=c(G),Zo=a(G,"TD",{});var gn=s(Zo);Hr=l(gn,"[4, 4, 12, 4]"),gn.forEach(o),Ur=c(G),Qo=a(G,"TD",{});var _n=s(Qo);Wr=l(_n,"[64, 128, 320, 512]"),_n.forEach(o),Vr=c(G),fo=a(G,"TD",{align:!0});var vn=s(fo);Gr=l(vn,"21"),vn.forEach(o),Yr=c(G),ho=a(G,"TD",{align:!0});var Fn=s(ho);Jr=l(Fn,"80.3"),Fn.forEach(o),G.forEach(o),Kr=c(W),M=a(W,"TR",{});var Y=s(M);po=a(Y,"TD",{align:!0});var Pn=s(po);Xr=l(Pn,"s36"),Pn.forEach(o),Zr=c(Y),et=a(Y,"TD",{});var bn=s(et);Qr=l(bn,"[6, 6, 18, 6]"),bn.forEach(o),ea=c(Y),ot=a(Y,"TD",{});var wn=s(ot);oa=l(wn,"[64, 128, 320, 512]"),wn.forEach(o),ta=c(Y),uo=a(Y,"TD",{align:!0});var $n=s(uo);ra=l($n,"31"),$n.forEach(o),aa=c(Y),go=a(Y,"TD",{align:!0});var yn=s(go);sa=l(yn,"81.4"),yn.forEach(o),Y.forEach(o),na=c(W),j=a(W,"TR",{});var J=s(j);_o=a(J,"TD",{align:!0});var En=s(_o);la=l(En,"m36"),En.forEach(o),ia=c(J),tt=a(J,"TD",{});var Tn=s(tt);ca=l(Tn,"[6, 6, 18, 6]"),Tn.forEach(o),da=c(J),rt=a(J,"TD",{});var xn=s(rt);ma=l(xn,"[96, 192, 384, 768]"),xn.forEach(o),fa=c(J),vo=a(J,"TD",{align:!0});var In=s(vo);ha=l(In,"56"),In.forEach(o),pa=c(J),Fo=a(J,"TD",{align:!0});var kn=s(Fo);ua=l(kn,"82.1"),kn.forEach(o),J.forEach(o),ga=c(W),A=a(W,"TR",{});var K=s(A);Po=a(K,"TD",{align:!0});var Cn=s(Po);_a=l(Cn,"m48"),Cn.forEach(o),va=c(K),at=a(K,"TD",{});var Mn=s(at);Fa=l(Mn,"[8, 8, 24, 8]"),Mn.forEach(o),Pa=c(K),st=a(K,"TD",{});var jn=s(st);ba=l(jn,"[96, 192, 384, 768]"),jn.forEach(o),wa=c(K),bo=a(K,"TD",{align:!0});var An=s(bo);$a=l(An,"73"),An.forEach(o),ya=c(K),wo=a(K,"TD",{align:!0});var zn=s(wo);Ea=l(zn,"82.5"),zn.forEach(o),K.forEach(o),W.forEach(o),Vt.forEach(o),jt=c(t),B=a(t,"P",{});var Co=s(B);Ta=l(Co,"This model was contributed by "),je=a(Co,"A",{href:!0,rel:!0});var Ln=s(je);xa=l(Ln,"heytanay"),Ln.forEach(o),Ia=l(Co,". The original code can be found "),Ae=a(Co,"A",{href:!0,rel:!0});var Dn=s(Ae);ka=l(Dn,"here"),Dn.forEach(o),Ca=l(Co,"."),Co.forEach(o),At=c(t),Z=a(t,"H2",{class:!0});var Gt=s(Z);de=a(Gt,"A",{id:!0,class:!0,href:!0});var Nn=s(de);nt=a(Nn,"SPAN",{});var qn=s(nt);b(ze.$$.fragment,qn),qn.forEach(o),Nn.forEach(o),Ma=c(Gt),lt=a(Gt,"SPAN",{});var On=s(lt);ja=l(On,"PoolFormerConfig"),On.forEach(o),Gt.forEach(o),zt=c(t),z=a(t,"DIV",{class:!0});var Pe=s(z);b(Le.$$.fragment,Pe),Aa=c(Pe),Q=a(Pe,"P",{});var Mo=s(Q);za=l(Mo,"This is the configuration class to store the configuration of "),$o=a(Mo,"A",{href:!0});var Rn=s($o);La=l(Rn,"PoolFormerModel"),Rn.forEach(o),Da=l(Mo,`. 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
`),De=a(Mo,"A",{href:!0,rel:!0});var Sn=s(De);Na=l(Sn,"sail/poolformer_s12"),Sn.forEach(o),qa=l(Mo," architecture."),Mo.forEach(o),Oa=c(Pe),ee=a(Pe,"P",{});var jo=s(ee);Ra=l(jo,"Configuration objects inherit from "),yo=a(jo,"A",{href:!0});var Bn=s(yo);Sa=l(Bn,"PretrainedConfig"),Bn.forEach(o),Ba=l(jo,` and can be used to control the model outputs. Read the
documentation from `),Eo=a(jo,"A",{href:!0});var Hn=s(Eo);Ha=l(Hn,"PretrainedConfig"),Hn.forEach(o),Ua=l(jo," for more information."),jo.forEach(o),Wa=c(Pe),b(me.$$.fragment,Pe),Pe.forEach(o),Lt=c(t),oe=a(t,"H2",{class:!0});var Yt=s(oe);fe=a(Yt,"A",{id:!0,class:!0,href:!0});var Un=s(fe);it=a(Un,"SPAN",{});var Wn=s(it);b(Ne.$$.fragment,Wn),Wn.forEach(o),Un.forEach(o),Va=c(Yt),ct=a(Yt,"SPAN",{});var Vn=s(ct);Ga=l(Vn,"PoolFormerFeatureExtractor"),Vn.forEach(o),Yt.forEach(o),Dt=c(t),L=a(t,"DIV",{class:!0});var be=s(L);b(qe.$$.fragment,be),Ya=c(be),dt=a(be,"P",{});var Gn=s(dt);Ja=l(Gn,"Constructs a PoolFormer feature extractor."),Gn.forEach(o),Ka=c(be),Oe=a(be,"P",{});var Jt=s(Oe);Xa=l(Jt,"This feature extractor inherits from "),To=a(Jt,"A",{href:!0});var Yn=s(To);Za=l(Yn,"FeatureExtractionMixin"),Yn.forEach(o),Qa=l(Jt,` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),Jt.forEach(o),es=c(be),H=a(be,"DIV",{class:!0});var Ao=s(H);b(Re.$$.fragment,Ao),os=c(Ao),mt=a(Ao,"P",{});var Jn=s(mt);ts=l(Jn,"Main method to prepare for the model one or several image(s)."),Jn.forEach(o),rs=c(Ao),b(he.$$.fragment,Ao),Ao.forEach(o),be.forEach(o),Nt=c(t),te=a(t,"H2",{class:!0});var Kt=s(te);pe=a(Kt,"A",{id:!0,class:!0,href:!0});var Kn=s(pe);ft=a(Kn,"SPAN",{});var Xn=s(ft);b(Se.$$.fragment,Xn),Xn.forEach(o),Kn.forEach(o),as=c(Kt),ht=a(Kt,"SPAN",{});var Zn=s(ht);ss=l(Zn,"PoolFormerModel"),Zn.forEach(o),Kt.forEach(o),qt=c(t),R=a(t,"DIV",{class:!0});var zo=s(R);b(Be.$$.fragment,zo),ns=c(zo),He=a(zo,"P",{});var Xt=s(He);ls=l(Xt,`The bare PoolFormer Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ue=a(Xt,"A",{href:!0,rel:!0});var Qn=s(Ue);is=l(Qn,"torch.nn.Module"),Qn.forEach(o),cs=l(Xt,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Xt.forEach(o),ds=c(zo),N=a(zo,"DIV",{class:!0});var we=s(N);b(We.$$.fragment,we),ms=c(we),re=a(we,"P",{});var Lo=s(re);fs=l(Lo,"The "),xo=a(Lo,"A",{href:!0});var el=s(xo);hs=l(el,"PoolFormerModel"),el.forEach(o),ps=l(Lo," forward method, overrides the "),pt=a(Lo,"CODE",{});var ol=s(pt);us=l(ol,"__call__"),ol.forEach(o),gs=l(Lo," special method."),Lo.forEach(o),_s=c(we),b(ue.$$.fragment,we),vs=c(we),b(ge.$$.fragment,we),we.forEach(o),zo.forEach(o),Ot=c(t),ae=a(t,"H2",{class:!0});var Zt=s(ae);_e=a(Zt,"A",{id:!0,class:!0,href:!0});var tl=s(_e);ut=a(tl,"SPAN",{});var rl=s(ut);b(Ve.$$.fragment,rl),rl.forEach(o),tl.forEach(o),Fs=c(Zt),gt=a(Zt,"SPAN",{});var al=s(gt);Ps=l(al,"PoolFormerForImageClassification"),al.forEach(o),Zt.forEach(o),Rt=c(t),D=a(t,"DIV",{class:!0});var $e=s(D);b(Ge.$$.fragment,$e),bs=c($e),_t=a($e,"P",{});var sl=s(_t);ws=l(sl,"PoolFormer Model transformer with an image classification head on top"),sl.forEach(o),$s=c($e),Ye=a($e,"P",{});var Qt=s(Ye);ys=l(Qt,"This model is a PyTorch "),Je=a(Qt,"A",{href:!0,rel:!0});var nl=s(Je);Es=l(nl,"torch.nn.Module"),nl.forEach(o),Ts=l(Qt,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Qt.forEach(o),xs=c($e),q=a($e,"DIV",{class:!0});var ye=s(q);b(Ke.$$.fragment,ye),Is=c(ye),se=a(ye,"P",{});var Do=s(se);ks=l(Do,"The "),Io=a(Do,"A",{href:!0});var ll=s(Io);Cs=l(ll,"PoolFormerForImageClassification"),ll.forEach(o),Ms=l(Do," forward method, overrides the "),vt=a(Do,"CODE",{});var il=s(vt);js=l(il,"__call__"),il.forEach(o),As=l(Do," special method."),Do.forEach(o),zs=c(ye),b(ve.$$.fragment,ye),Ls=c(ye),b(Fe.$$.fragment,ye),ye.forEach(o),$e.forEach(o),this.h()},h(){d(f,"name","hf:doc:metadata"),d(f,"content",JSON.stringify(wl)),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(g,"class","relative group"),d(ne,"id","overview"),d(ne,"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(ne,"href","#overview"),d(X,"class","relative group"),d(Te,"href","https://arxiv.org/abs/2111.11418"),d(Te,"rel","nofollow"),d(xe,"href","https://arxiv.org/abs/2111.11418"),d(xe,"rel","nofollow"),d(Ie,"width","600"),hl(Ie.src,Rs="https://user-images.githubusercontent.com/15921929/142746124-1ab7635d-2536-4a0e-ad43-b4fe2c5a525d.png")||d(Ie,"src",Rs),d(Ce,"href","https://huggingface.co/models?other=poolformer"),d(Ce,"rel","nofollow"),d(ro,"href","/docs/transformers/pr_19907/en/model_doc/poolformer#transformers.PoolFormerFeatureExtractor"),d(ao,"align","center"),d(so,"align","center"),d(no,"align","center"),d(lo,"align","center"),d(io,"align","center"),d(co,"align","center"),d(mo,"align","center"),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(bo,"align","center"),d(wo,"align","center"),d(je,"href","https://huggingface.co/heytanay"),d(je,"rel","nofollow"),d(Ae,"href","https://github.com/sail-sg/poolformer"),d(Ae,"rel","nofollow"),d(de,"id","transformers.PoolFormerConfig"),d(de,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(de,"href","#transformers.PoolFormerConfig"),d(Z,"class","relative group"),d($o,"href","/docs/transformers/pr_19907/en/model_doc/poolformer#transformers.PoolFormerModel"),d(De,"href","https://huggingface.co/sail/poolformer_s12"),d(De,"rel","nofollow"),d(yo,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),d(Eo,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),d(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(oe,"class","relative group"),d(To,"href","/docs/transformers/pr_19907/en/internal/image_processing_utils#transformers.FeatureExtractionMixin"),d(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pe,"id","transformers.PoolFormerModel"),d(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"),d(pe,"href","#transformers.PoolFormerModel"),d(te,"class","relative group"),d(Ue,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Ue,"rel","nofollow"),d(xo,"href","/docs/transformers/pr_19907/en/model_doc/poolformer#transformers.PoolFormerModel"),d(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(ae,"class","relative group"),d(Je,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Je,"rel","nofollow"),d(Io,"href","/docs/transformers/pr_19907/en/model_doc/poolformer#transformers.PoolFormerForImageClassification"),d(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(D,"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,h){e(document.head,f),p(t,v,h),p(t,g,h),e(g,u),e(u,F),w(m,F,null),e(g,_),e(g,O),e(O,er),p(t,$t,h),p(t,X,h),e(X,ne),e(ne,qo),w(Ee,qo,null),e(X,or),e(X,Oo),e(Oo,tr),p(t,yt,h),p(t,le,h),e(le,rr),e(le,Te),e(Te,ar),e(le,sr),p(t,Et,h),p(t,eo,h),e(eo,nr),p(t,Tt,h),p(t,oo,h),e(oo,Ro),e(Ro,lr),p(t,xt,h),p(t,ie,h),e(ie,ir),e(ie,xe),e(xe,cr),e(ie,dr),p(t,It,h),p(t,Ie,h),p(t,kt,h),p(t,to,h),e(to,mr),p(t,Ct,h),p(t,S,h),e(S,ke),e(ke,fr),e(ke,Ce),e(Ce,hr),e(ke,pr),e(S,ur),e(S,Me),e(Me,gr),e(Me,ro),e(ro,_r),e(Me,vr),e(S,Fr),e(S,So),e(So,Pr),p(t,Mt,h),p(t,ce,h),e(ce,Bo),e(Bo,x),e(x,ao),e(ao,Ho),e(Ho,br),e(x,wr),e(x,Uo),e(Uo,Wo),e(Wo,$r),e(x,yr),e(x,Vo),e(Vo,Go),e(Go,Er),e(x,Tr),e(x,so),e(so,Yo),e(Yo,xr),e(x,Ir),e(x,no),e(no,Jo),e(Jo,kr),e(ce,Cr),e(ce,I),e(I,k),e(k,lo),e(lo,Mr),e(k,jr),e(k,Ko),e(Ko,Ar),e(k,zr),e(k,Xo),e(Xo,Lr),e(k,Dr),e(k,io),e(io,Nr),e(k,qr),e(k,co),e(co,Or),e(I,Rr),e(I,C),e(C,mo),e(mo,Sr),e(C,Br),e(C,Zo),e(Zo,Hr),e(C,Ur),e(C,Qo),e(Qo,Wr),e(C,Vr),e(C,fo),e(fo,Gr),e(C,Yr),e(C,ho),e(ho,Jr),e(I,Kr),e(I,M),e(M,po),e(po,Xr),e(M,Zr),e(M,et),e(et,Qr),e(M,ea),e(M,ot),e(ot,oa),e(M,ta),e(M,uo),e(uo,ra),e(M,aa),e(M,go),e(go,sa),e(I,na),e(I,j),e(j,_o),e(_o,la),e(j,ia),e(j,tt),e(tt,ca),e(j,da),e(j,rt),e(rt,ma),e(j,fa),e(j,vo),e(vo,ha),e(j,pa),e(j,Fo),e(Fo,ua),e(I,ga),e(I,A),e(A,Po),e(Po,_a),e(A,va),e(A,at),e(at,Fa),e(A,Pa),e(A,st),e(st,ba),e(A,wa),e(A,bo),e(bo,$a),e(A,ya),e(A,wo),e(wo,Ea),p(t,jt,h),p(t,B,h),e(B,Ta),e(B,je),e(je,xa),e(B,Ia),e(B,Ae),e(Ae,ka),e(B,Ca),p(t,At,h),p(t,Z,h),e(Z,de),e(de,nt),w(ze,nt,null),e(Z,Ma),e(Z,lt),e(lt,ja),p(t,zt,h),p(t,z,h),w(Le,z,null),e(z,Aa),e(z,Q),e(Q,za),e(Q,$o),e($o,La),e(Q,Da),e(Q,De),e(De,Na),e(Q,qa),e(z,Oa),e(z,ee),e(ee,Ra),e(ee,yo),e(yo,Sa),e(ee,Ba),e(ee,Eo),e(Eo,Ha),e(ee,Ua),e(z,Wa),w(me,z,null),p(t,Lt,h),p(t,oe,h),e(oe,fe),e(fe,it),w(Ne,it,null),e(oe,Va),e(oe,ct),e(ct,Ga),p(t,Dt,h),p(t,L,h),w(qe,L,null),e(L,Ya),e(L,dt),e(dt,Ja),e(L,Ka),e(L,Oe),e(Oe,Xa),e(Oe,To),e(To,Za),e(Oe,Qa),e(L,es),e(L,H),w(Re,H,null),e(H,os),e(H,mt),e(mt,ts),e(H,rs),w(he,H,null),p(t,Nt,h),p(t,te,h),e(te,pe),e(pe,ft),w(Se,ft,null),e(te,as),e(te,ht),e(ht,ss),p(t,qt,h),p(t,R,h),w(Be,R,null),e(R,ns),e(R,He),e(He,ls),e(He,Ue),e(Ue,is),e(He,cs),e(R,ds),e(R,N),w(We,N,null),e(N,ms),e(N,re),e(re,fs),e(re,xo),e(xo,hs),e(re,ps),e(re,pt),e(pt,us),e(re,gs),e(N,_s),w(ue,N,null),e(N,vs),w(ge,N,null),p(t,Ot,h),p(t,ae,h),e(ae,_e),e(_e,ut),w(Ve,ut,null),e(ae,Fs),e(ae,gt),e(gt,Ps),p(t,Rt,h),p(t,D,h),w(Ge,D,null),e(D,bs),e(D,_t),e(_t,ws),e(D,$s),e(D,Ye),e(Ye,ys),e(Ye,Je),e(Je,Es),e(Ye,Ts),e(D,xs),e(D,q),w(Ke,q,null),e(q,Is),e(q,se),e(se,ks),e(se,Io),e(Io,Cs),e(se,Ms),e(se,vt),e(vt,js),e(se,As),e(q,zs),w(ve,q,null),e(q,Ls),w(Fe,q,null),St=!0},p(t,[h]){const Xe={};h&2&&(Xe.$$scope={dirty:h,ctx:t}),me.$set(Xe);const Ft={};h&2&&(Ft.$$scope={dirty:h,ctx:t}),he.$set(Ft);const Pt={};h&2&&(Pt.$$scope={dirty:h,ctx:t}),ue.$set(Pt);const bt={};h&2&&(bt.$$scope={dirty:h,ctx:t}),ge.$set(bt);const Ze={};h&2&&(Ze.$$scope={dirty:h,ctx:t}),ve.$set(Ze);const wt={};h&2&&(wt.$$scope={dirty:h,ctx:t}),Fe.$set(wt)},i(t){St||($(m.$$.fragment,t),$(Ee.$$.fragment,t),$(ze.$$.fragment,t),$(Le.$$.fragment,t),$(me.$$.fragment,t),$(Ne.$$.fragment,t),$(qe.$$.fragment,t),$(Re.$$.fragment,t),$(he.$$.fragment,t),$(Se.$$.fragment,t),$(Be.$$.fragment,t),$(We.$$.fragment,t),$(ue.$$.fragment,t),$(ge.$$.fragment,t),$(Ve.$$.fragment,t),$(Ge.$$.fragment,t),$(Ke.$$.fragment,t),$(ve.$$.fragment,t),$(Fe.$$.fragment,t),St=!0)},o(t){y(m.$$.fragment,t),y(Ee.$$.fragment,t),y(ze.$$.fragment,t),y(Le.$$.fragment,t),y(me.$$.fragment,t),y(Ne.$$.fragment,t),y(qe.$$.fragment,t),y(Re.$$.fragment,t),y(he.$$.fragment,t),y(Se.$$.fragment,t),y(Be.$$.fragment,t),y(We.$$.fragment,t),y(ue.$$.fragment,t),y(ge.$$.fragment,t),y(Ve.$$.fragment,t),y(Ge.$$.fragment,t),y(Ke.$$.fragment,t),y(ve.$$.fragment,t),y(Fe.$$.fragment,t),St=!1},d(t){o(f),t&&o(v),t&&o(g),E(m),t&&o($t),t&&o(X),E(Ee),t&&o(yt),t&&o(le),t&&o(Et),t&&o(eo),t&&o(Tt),t&&o(oo),t&&o(xt),t&&o(ie),t&&o(It),t&&o(Ie),t&&o(kt),t&&o(to),t&&o(Ct),t&&o(S),t&&o(Mt),t&&o(ce),t&&o(jt),t&&o(B),t&&o(At),t&&o(Z),E(ze),t&&o(zt),t&&o(z),E(Le),E(me),t&&o(Lt),t&&o(oe),E(Ne),t&&o(Dt),t&&o(L),E(qe),E(Re),E(he),t&&o(Nt),t&&o(te),E(Se),t&&o(qt),t&&o(R),E(Be),E(We),E(ue),E(ge),t&&o(Ot),t&&o(ae),E(Ve),t&&o(Rt),t&&o(D),E(Ge),E(Ke),E(ve),E(Fe)}}}const wl={local:"poolformer",sections:[{local:"overview",title:"Overview"},{local:"transformers.PoolFormerConfig",title:"PoolFormerConfig"},{local:"transformers.PoolFormerFeatureExtractor",title:"PoolFormerFeatureExtractor"},{local:"transformers.PoolFormerModel",title:"PoolFormerModel"},{local:"transformers.PoolFormerForImageClassification",title:"PoolFormerForImageClassification"}],title:"PoolFormer"};function $l(T){return pl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Cl extends cl{constructor(f){super();dl(this,f,$l,bl,ml,{})}}export{Cl as default,wl as metadata};
