import{S as zr,i as xr,s as Fr,e as n,k as c,w as y,t as s,M as Ur,c as a,d as o,m,a as r,x as T,h as i,b as d,G as e,g as u,y as P,q as w,o as $,B as M,v as Vr,L as Pa}from"../../chunks/vendor-hf-doc-builder.js";import{T as Nr}from"../../chunks/Tip-hf-doc-builder.js";import{D as We}from"../../chunks/Docstring-hf-doc-builder.js";import{C as wa}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as _t}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ta}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Jr(C){let p,b,v,f,_;return f=new wa({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFB2dE1vZGVsJTJDJTIwUHZ0Q29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFBWVCUyMFhyZW55YSUyRnB2dC10aW55LTIyNCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBQdnRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBYcmVueWElMkZwdnQtdGlueS0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFB2dE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PvtModel, PvtConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a PVT Xrenya/pvt-tiny-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = PvtConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the Xrenya/pvt-tiny-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = PvtModel(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(){p=n("p"),b=s("Example:"),v=c(),y(f.$$.fragment)},l(l){p=a(l,"P",{});var g=r(p);b=i(g,"Example:"),g.forEach(o),v=m(l),T(f.$$.fragment,l)},m(l,g){u(l,p,g),e(p,b),u(l,v,g),P(f,l,g),_=!0},p:Pa,i(l){_||(w(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&o(p),l&&o(v),M(f,l)}}}function Rr(C){let p,b,v,f,_;return{c(){p=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=n("code"),f=s("Module"),_=s(`
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(l){p=a(l,"P",{});var g=r(p);b=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a(g,"CODE",{});var N=r(v);f=i(N,"Module"),N.forEach(o),_=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(l,g){u(l,p,g),e(p,b),e(p,v),e(v,f),e(p,_)},d(l){l&&o(p)}}}function Zr(C){let p,b,v,f,_;return f=new wa({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFB2dEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlpldGF0ZWNoJTJGcHZ0LXRpbnktMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwUHZ0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyWmV0YXRlY2glMkZwdnQtdGlueS0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, PvtForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

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

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;Zetatech/pvt-tiny-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = PvtForImageClassification.from_pretrained(<span class="hljs-string">&quot;Zetatech/pvt-tiny-224&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`}}),{c(){p=n("p"),b=s("Example:"),v=c(),y(f.$$.fragment)},l(l){p=a(l,"P",{});var g=r(p);b=i(g,"Example:"),g.forEach(o),v=m(l),T(f.$$.fragment,l)},m(l,g){u(l,p,g),e(p,b),u(l,v,g),P(f,l,g),_=!0},p:Pa,i(l){_||(w(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&o(p),l&&o(v),M(f,l)}}}function Wr(C){let p,b,v,f,_;return{c(){p=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=n("code"),f=s("Module"),_=s(`
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(l){p=a(l,"P",{});var g=r(p);b=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a(g,"CODE",{});var N=r(v);f=i(N,"Module"),N.forEach(o),_=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(l,g){u(l,p,g),e(p,b),e(p,v),e(v,f),e(p,_)},d(l){l&&o(p)}}}function Ar(C){let p,b,v,f,_;return f=new wa({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFB2dE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJaZXRhdGVjaCUyRnB2dC10aW55LTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMFB2dE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJaZXRhdGVjaCUyRnB2dC10aW55LTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, PvtModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

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

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;Zetatech/pvt-tiny-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = PvtModel.from_pretrained(<span class="hljs-string">&quot;Zetatech/pvt-tiny-224&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">50</span>, <span class="hljs-number">512</span>]`}}),{c(){p=n("p"),b=s("Example:"),v=c(),y(f.$$.fragment)},l(l){p=a(l,"P",{});var g=r(p);b=i(g,"Example:"),g.forEach(o),v=m(l),T(f.$$.fragment,l)},m(l,g){u(l,p,g),e(p,b),u(l,v,g),P(f,l,g),_=!0},p:Pa,i(l){_||(w(f.$$.fragment,l),_=!0)},o(l){$(f.$$.fragment,l),_=!1},d(l){l&&o(p),l&&o(v),M(f,l)}}}function Sr(C){let p,b,v,f,_,l,g,N,To,Qt,A,O,bt,be,Po,yt,wo,Ot,Y,$o,ye,Mo,Io,Yt,Ae,Eo,Ht,Se,Tt,Co,Kt,W,ko,Be,jo,No,Te,zo,xo,eo,qe,Pt,Fo,to,H,wt,z,$t,Mt,Uo,Vo,Le,It,Jo,Ro,De,Et,Zo,Wo,Ge,Ct,Ao,So,x,F,kt,Bo,qo,Xe,Lo,Do,Qe,Go,Xo,Oe,Qo,Oo,U,jt,Yo,Ho,Ye,Ko,en,He,tn,on,Ke,nn,an,V,Nt,rn,sn,et,ln,dn,tt,cn,mn,ot,pn,hn,J,zt,fn,un,nt,gn,vn,at,_n,bn,rt,yn,oo,S,K,xt,Pe,Tn,Ft,Pn,no,I,we,wn,B,$n,st,Mn,In,$e,En,Cn,kn,q,jn,it,Nn,zn,lt,xn,Fn,Un,ee,ao,L,te,Ut,Me,Vn,Vt,Jn,ro,R,Ie,Rn,Jt,Zn,Wn,oe,Ee,An,Rt,Sn,so,D,ne,Zt,Ce,Bn,Wt,qn,io,E,ke,Ln,At,Dn,Gn,je,Xn,Ne,Qn,On,Yn,k,ze,Hn,G,Kn,dt,ea,ta,St,oa,na,aa,ae,ra,re,lo,X,se,Bt,xe,sa,qt,ia,co,Z,Fe,la,Ue,da,Ve,ca,ma,pa,j,Je,ha,Q,fa,ct,ua,ga,Lt,va,_a,ba,ie,ya,le,mo;return l=new _t({}),be=new _t({}),Pe=new _t({}),we=new We({props:{name:"class transformers.PvtConfig",anchor:"transformers.PvtConfig",parameters:[{name:"image_size",val:": int = 224"},{name:"num_channels",val:": int = 3"},{name:"num_encoder_blocks",val:": int = 4"},{name:"depths",val:": typing.List[int] = [2, 2, 2, 2]"},{name:"sequence_reduction_ratios",val:": typing.List[int] = [8, 4, 2, 1]"},{name:"hidden_sizes",val:": typing.List[int] = [64, 128, 320, 512]"},{name:"patch_sizes",val:": typing.List[int] = [4, 2, 2, 2]"},{name:"strides",val:": typing.List[int] = [4, 2, 2, 2]"},{name:"num_attention_heads",val:": typing.List[int] = [1, 2, 5, 8]"},{name:"mlp_ratios",val:": typing.List[int] = [8, 8, 4, 4]"},{name:"hidden_act",val:": typing.Mapping[str, typing.Callable] = 'gelu'"},{name:"hidden_dropout_prob",val:": float = 0.0"},{name:"attention_probs_dropout_prob",val:": float = 0.0"},{name:"initializer_range",val:": float = 0.02"},{name:"drop_path_rate",val:": float = 0.0"},{name:"layer_norm_eps",val:": float = 1e-06"},{name:"qkv_bias",val:": bool = True"},{name:"num_labels",val:": int = 1000"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PvtConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The input image size`,name:"image_size"},{anchor:"transformers.PvtConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.PvtConfig.num_encoder_blocks",description:`<strong>num_encoder_blocks</strong> (<code>[int]</code>, <em>optional</em>., defaults to 4) &#x2014;
The number of encoder blocks (i.e. stages in the Mix Transformer encoder).`,name:"num_encoder_blocks"},{anchor:"transformers.PvtConfig.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 2, 2, 2]</code>) &#x2014;
The number of layers in each encoder block.`,name:"depths"},{anchor:"transformers.PvtConfig.sequence_reduction_ratios",description:`<strong>sequence_reduction_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[8, 4, 2, 1]</code>) &#x2014;
Sequence reduction ratios in each encoder block.`,name:"sequence_reduction_ratios"},{anchor:"transformers.PvtConfig.hidden_sizes",description:`<strong>hidden_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[64, 128, 320, 512]</code>) &#x2014;
Dimension of each of the encoder blocks.`,name:"hidden_sizes"},{anchor:"transformers.PvtConfig.patch_sizes",description:`<strong>patch_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 2, 2, 2]</code>) &#x2014;
Patch size before each encoder block.`,name:"patch_sizes"},{anchor:"transformers.PvtConfig.strides",description:`<strong>strides</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 2, 2, 2]</code>) &#x2014;
Stride before each encoder block.`,name:"strides"},{anchor:"transformers.PvtConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 2, 5, 8]</code>) &#x2014;
Number of attention heads for each attention layer in each block of the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.PvtConfig.mlp_ratios",description:`<strong>mlp_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[8, 8, 4, 4]</code>) &#x2014;
Ratio of the size of the hidden layer compared to the size of the input layer of the Mix FFNs in the
encoder blocks.`,name:"mlp_ratios"},{anchor:"transformers.PvtConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.PvtConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.PvtConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.PvtConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.PvtConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for stochastic depth, used in the blocks of the Transformer encoder.`,name:"drop_path_rate"},{anchor:"transformers.PvtConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-6) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.PvtConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not a learnable bias should be added to the queries, keys and values.`,name:"qkv_bias"},{anchor:"transformers.PvtConfig.num_labels",description:`<strong>num_labels</strong> (&#x2018;int&#x2019;, <em>optional</em>, defaults to 1000) &#x2014;
The number of classes.`,name:"num_labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pvt/configuration_pvt.py#L37"}}),ee=new Ta({props:{anchor:"transformers.PvtConfig.example",$$slots:{default:[Jr]},$$scope:{ctx:C}}}),Me=new _t({}),Ie=new We({props:{name:"class transformers.PvtImageProcessor",anchor:"transformers.PvtImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PvtImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>(size[&quot;height&quot;], size[&quot;width&quot;])</code>. Can be overridden by the <code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.PvtImageProcessor.size",description:`<strong>size</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.PvtImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by the <code>resample</code> parameter in the
<code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.PvtImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.PvtImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter in the
<code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.PvtImageProcessor.do_normalize",description:"<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True) -- Whether to normalize the image. Can be overridden by the </code>do_normalize<code>parameter in the</code>preprocess`\nmethod.",name:"do_normalize"},{anchor:"transformers.PvtImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_DEFAULT_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.PvtImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_DEFAULT_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pvt/image_processing_pvt.py#L40"}}),Ee=new We({props:{name:"preprocess",anchor:"transformers.PvtImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PvtImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.PvtImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.PvtImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Dictionary in the format <code>{&quot;height&quot;: h, &quot;width&quot;: w}</code> specifying the size of the output image after
resizing.`,name:"size"},{anchor:"transformers.PvtImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code> filter, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
<code>PILImageResampling</code> filter to use if resizing the image e.g. <code>PILImageResampling.BILINEAR</code>. Only has
an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.PvtImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.PvtImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.PvtImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.PvtImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.PvtImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_std"},{anchor:"transformers.PvtImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.PvtImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.PvtImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pvt/image_processing_pvt.py#L146"}}),Ce=new _t({}),ke=new We({props:{name:"class transformers.PvtForImageClassification",anchor:"transformers.PvtForImageClassification",parameters:[{name:"config",val:": PvtConfig"}],parametersDescription:[{anchor:"transformers.PvtForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/pvt#transformers.PvtConfig">~PvtConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pvt/modeling_pvt.py#L593"}}),ze=new We({props:{name:"forward",anchor:"transformers.PvtForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor]"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.PvtForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">PvtImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.PvtForImageClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.PvtForImageClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.PvtForImageClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.PvtForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pvt/modeling_pvt.py#L608",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/pvt#transformers.PvtConfig"
>PvtConfig</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, if the model has an embedding layer, +
one for the output of each stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states
(also called feature maps) of the model at the output of each stage.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ae=new Nr({props:{$$slots:{default:[Rr]},$$scope:{ctx:C}}}),re=new Ta({props:{anchor:"transformers.PvtForImageClassification.forward.example",$$slots:{default:[Zr]},$$scope:{ctx:C}}}),xe=new _t({}),Fe=new We({props:{name:"class transformers.PvtModel",anchor:"transformers.PvtModel",parameters:[{name:"config",val:": PvtConfig"}],parametersDescription:[{anchor:"transformers.PvtModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/pvt#transformers.PvtConfig">~PvtConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pvt/modeling_pvt.py#L528"}}),Je=new We({props:{name:"forward",anchor:"transformers.PvtModel.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.PvtModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">PvtImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.PvtModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.PvtModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.PvtModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pvt/modeling_pvt.py#L547",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/pvt#transformers.PvtConfig"
>PvtConfig</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, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ie=new Nr({props:{$$slots:{default:[Wr]},$$scope:{ctx:C}}}),le=new Ta({props:{anchor:"transformers.PvtModel.forward.example",$$slots:{default:[Ar]},$$scope:{ctx:C}}}),{c(){p=n("meta"),b=c(),v=n("h1"),f=n("a"),_=n("span"),y(l.$$.fragment),g=c(),N=n("span"),To=s("Pyramid Vision Transformer (PVT)"),Qt=c(),A=n("h2"),O=n("a"),bt=n("span"),y(be.$$.fragment),Po=c(),yt=n("span"),wo=s("Overview"),Ot=c(),Y=n("p"),$o=s(`The PVT model was proposed in
`),ye=n("a"),Mo=s("Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions"),Io=s(`
by Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, Ling Shao. The PVT is a type of
vision transformer that utilizes a pyramid structure to make it an effective backbone for dense prediction tasks. Specifically
it allows for more fine-grained inputs (4 x 4 pixels per patch) to be used, while simultaneously shrinking the sequence length
of the Transformer as it deepens - reducing the computational cost. Additionally, a spatial-reduction attention (SRA) layer
is used to further reduce the resource consumption when learning high-resolution features.`),Yt=c(),Ae=n("p"),Eo=s("The abstract from the paper is the following:"),Ht=c(),Se=n("p"),Tt=n("em"),Co=s(`Although convolutional neural networks (CNNs) have achieved great success in computer vision, this work investigates a
simpler, convolution-free backbone network useful for many dense prediction tasks. Unlike the recently proposed Vision
Transformer (ViT) that was designed for image classification specifically, we introduce the Pyramid Vision Transformer
(PVT), which overcomes the difficulties of porting Transformer to various dense prediction tasks. PVT has several
merits compared to current state of the arts. Different from ViT that typically yields low resolution outputs and
incurs high computational and memory costs, PVT not only can be trained on dense partitions of an image to achieve high
output resolution, which is important for dense prediction, but also uses a progressive shrinking pyramid to reduce the
computations of large feature maps. PVT inherits the advantages of both CNN and Transformer, making it a unified
backbone for various vision tasks without convolutions, where it can be used as a direct replacement for CNN backbones.
We validate PVT through extensive experiments, showing that it boosts the performance of many downstream tasks, including
object detection, instance and semantic segmentation. For example, with a comparable number of parameters, PVT+RetinaNet
achieves 40.4 AP on the COCO dataset, surpassing ResNet50+RetinNet (36.3 AP) by 4.1 absolute AP (see Figure 2). We hope
that PVT could serve as an alternative and useful backbone for pixel-level predictions and facilitate future research.`),Kt=c(),W=n("p"),ko=s("This model was contributed by "),Be=n("a"),jo=s("Xrenya"),No=s(". The original code can be found "),Te=n("a"),zo=s("here"),xo=s("."),eo=c(),qe=n("ul"),Pt=n("li"),Fo=s("PVTv1 on ImageNet-1K"),to=c(),H=n("table"),wt=n("thead"),z=n("tr"),$t=n("th"),Mt=n("strong"),Uo=s("Model variant"),Vo=c(),Le=n("th"),It=n("strong"),Jo=s("Size"),Ro=c(),De=n("th"),Et=n("strong"),Zo=s("Acc@1"),Wo=c(),Ge=n("th"),Ct=n("strong"),Ao=s("Params (M)"),So=c(),x=n("tbody"),F=n("tr"),kt=n("td"),Bo=s("PVT-Tiny"),qo=c(),Xe=n("td"),Lo=s("224"),Do=c(),Qe=n("td"),Go=s("75.1"),Xo=c(),Oe=n("td"),Qo=s("13.2"),Oo=c(),U=n("tr"),jt=n("td"),Yo=s("PVT-Small"),Ho=c(),Ye=n("td"),Ko=s("224"),en=c(),He=n("td"),tn=s("79.8"),on=c(),Ke=n("td"),nn=s("24.5"),an=c(),V=n("tr"),Nt=n("td"),rn=s("PVT-Medium"),sn=c(),et=n("td"),ln=s("224"),dn=c(),tt=n("td"),cn=s("81.2"),mn=c(),ot=n("td"),pn=s("44.2"),hn=c(),J=n("tr"),zt=n("td"),fn=s("PVT-Large"),un=c(),nt=n("td"),gn=s("224"),vn=c(),at=n("td"),_n=s("81.7"),bn=c(),rt=n("td"),yn=s("61.4"),oo=c(),S=n("h2"),K=n("a"),xt=n("span"),y(Pe.$$.fragment),Tn=c(),Ft=n("span"),Pn=s("PvtConfig"),no=c(),I=n("div"),y(we.$$.fragment),wn=c(),B=n("p"),$n=s("This is the configuration class to store the configuration of a "),st=n("a"),Mn=s("PvtModel"),In=s(`. It is used to instantiate an Pvt
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 Pvt
`),$e=n("a"),En=s("Xrenya/pvt-tiny-224"),Cn=s(" architecture."),kn=c(),q=n("p"),jn=s("Configuration objects inherit from "),it=n("a"),Nn=s("PretrainedConfig"),zn=s(` and can be used to control the model outputs. Read the
documentation from `),lt=n("a"),xn=s("PretrainedConfig"),Fn=s(" for more information."),Un=c(),y(ee.$$.fragment),ao=c(),L=n("h2"),te=n("a"),Ut=n("span"),y(Me.$$.fragment),Vn=c(),Vt=n("span"),Jn=s("PvtImageProcessor"),ro=c(),R=n("div"),y(Ie.$$.fragment),Rn=c(),Jt=n("p"),Zn=s("Constructs a PVT image processor."),Wn=c(),oe=n("div"),y(Ee.$$.fragment),An=c(),Rt=n("p"),Sn=s("Preprocess an image or batch of images."),so=c(),D=n("h2"),ne=n("a"),Zt=n("span"),y(Ce.$$.fragment),Bn=c(),Wt=n("span"),qn=s("PvtForImageClassification"),io=c(),E=n("div"),y(ke.$$.fragment),Ln=c(),At=n("p"),Dn=s(`Pvt Model transformer with an image classification head on top (a linear layer on top of the final hidden state of
the [CLS] token) e.g. for ImageNet.`),Gn=c(),je=n("p"),Xn=s("This model is a PyTorch "),Ne=n("a"),Qn=s("torch.nn.Module"),On=s(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Yn=c(),k=n("div"),y(ze.$$.fragment),Hn=c(),G=n("p"),Kn=s("The "),dt=n("a"),ea=s("PvtForImageClassification"),ta=s(" forward method, overrides the "),St=n("code"),oa=s("__call__"),na=s(" special method."),aa=c(),y(ae.$$.fragment),ra=c(),y(re.$$.fragment),lo=c(),X=n("h2"),se=n("a"),Bt=n("span"),y(xe.$$.fragment),sa=c(),qt=n("span"),ia=s("PvtModel"),co=c(),Z=n("div"),y(Fe.$$.fragment),la=c(),Ue=n("p"),da=s(`The bare Pvt encoder outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ve=n("a"),ca=s("torch.nn.Module"),ma=s(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),pa=c(),j=n("div"),y(Je.$$.fragment),ha=c(),Q=n("p"),fa=s("The "),ct=n("a"),ua=s("PvtModel"),ga=s(" forward method, overrides the "),Lt=n("code"),va=s("__call__"),_a=s(" special method."),ba=c(),y(ie.$$.fragment),ya=c(),y(le.$$.fragment),this.h()},l(t){const h=Ur('[data-svelte="svelte-1phssyn"]',document.head);p=a(h,"META",{name:!0,content:!0}),h.forEach(o),b=m(t),v=a(t,"H1",{class:!0});var Re=r(v);f=a(Re,"A",{id:!0,class:!0,href:!0});var Dt=r(f);_=a(Dt,"SPAN",{});var Gt=r(_);T(l.$$.fragment,Gt),Gt.forEach(o),Dt.forEach(o),g=m(Re),N=a(Re,"SPAN",{});var Xt=r(N);To=i(Xt,"Pyramid Vision Transformer (PVT)"),Xt.forEach(o),Re.forEach(o),Qt=m(t),A=a(t,"H2",{class:!0});var Ze=r(A);O=a(Ze,"A",{id:!0,class:!0,href:!0});var $a=r(O);bt=a($a,"SPAN",{});var Ma=r(bt);T(be.$$.fragment,Ma),Ma.forEach(o),$a.forEach(o),Po=m(Ze),yt=a(Ze,"SPAN",{});var Ia=r(yt);wo=i(Ia,"Overview"),Ia.forEach(o),Ze.forEach(o),Ot=m(t),Y=a(t,"P",{});var po=r(Y);$o=i(po,`The PVT model was proposed in
`),ye=a(po,"A",{href:!0,rel:!0});var Ea=r(ye);Mo=i(Ea,"Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions"),Ea.forEach(o),Io=i(po,`
by Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, Ling Shao. The PVT is a type of
vision transformer that utilizes a pyramid structure to make it an effective backbone for dense prediction tasks. Specifically
it allows for more fine-grained inputs (4 x 4 pixels per patch) to be used, while simultaneously shrinking the sequence length
of the Transformer as it deepens - reducing the computational cost. Additionally, a spatial-reduction attention (SRA) layer
is used to further reduce the resource consumption when learning high-resolution features.`),po.forEach(o),Yt=m(t),Ae=a(t,"P",{});var Ca=r(Ae);Eo=i(Ca,"The abstract from the paper is the following:"),Ca.forEach(o),Ht=m(t),Se=a(t,"P",{});var ka=r(Se);Tt=a(ka,"EM",{});var ja=r(Tt);Co=i(ja,`Although convolutional neural networks (CNNs) have achieved great success in computer vision, this work investigates a
simpler, convolution-free backbone network useful for many dense prediction tasks. Unlike the recently proposed Vision
Transformer (ViT) that was designed for image classification specifically, we introduce the Pyramid Vision Transformer
(PVT), which overcomes the difficulties of porting Transformer to various dense prediction tasks. PVT has several
merits compared to current state of the arts. Different from ViT that typically yields low resolution outputs and
incurs high computational and memory costs, PVT not only can be trained on dense partitions of an image to achieve high
output resolution, which is important for dense prediction, but also uses a progressive shrinking pyramid to reduce the
computations of large feature maps. PVT inherits the advantages of both CNN and Transformer, making it a unified
backbone for various vision tasks without convolutions, where it can be used as a direct replacement for CNN backbones.
We validate PVT through extensive experiments, showing that it boosts the performance of many downstream tasks, including
object detection, instance and semantic segmentation. For example, with a comparable number of parameters, PVT+RetinaNet
achieves 40.4 AP on the COCO dataset, surpassing ResNet50+RetinNet (36.3 AP) by 4.1 absolute AP (see Figure 2). We hope
that PVT could serve as an alternative and useful backbone for pixel-level predictions and facilitate future research.`),ja.forEach(o),ka.forEach(o),Kt=m(t),W=a(t,"P",{});var mt=r(W);ko=i(mt,"This model was contributed by "),Be=a(mt,"A",{href:!0});var Na=r(Be);jo=i(Na,"Xrenya"),Na.forEach(o),No=i(mt,". The original code can be found "),Te=a(mt,"A",{href:!0,rel:!0});var za=r(Te);zo=i(za,"here"),za.forEach(o),xo=i(mt,"."),mt.forEach(o),eo=m(t),qe=a(t,"UL",{});var xa=r(qe);Pt=a(xa,"LI",{});var Fa=r(Pt);Fo=i(Fa,"PVTv1 on ImageNet-1K"),Fa.forEach(o),xa.forEach(o),to=m(t),H=a(t,"TABLE",{});var ho=r(H);wt=a(ho,"THEAD",{});var Ua=r(wt);z=a(Ua,"TR",{});var de=r(z);$t=a(de,"TH",{});var Va=r($t);Mt=a(Va,"STRONG",{});var Ja=r(Mt);Uo=i(Ja,"Model variant"),Ja.forEach(o),Va.forEach(o),Vo=m(de),Le=a(de,"TH",{align:!0});var Ra=r(Le);It=a(Ra,"STRONG",{});var Za=r(It);Jo=i(Za,"Size"),Za.forEach(o),Ra.forEach(o),Ro=m(de),De=a(de,"TH",{align:!0});var Wa=r(De);Et=a(Wa,"STRONG",{});var Aa=r(Et);Zo=i(Aa,"Acc@1"),Aa.forEach(o),Wa.forEach(o),Wo=m(de),Ge=a(de,"TH",{align:!0});var Sa=r(Ge);Ct=a(Sa,"STRONG",{});var Ba=r(Ct);Ao=i(Ba,"Params (M)"),Ba.forEach(o),Sa.forEach(o),de.forEach(o),Ua.forEach(o),So=m(ho),x=a(ho,"TBODY",{});var ce=r(x);F=a(ce,"TR",{});var me=r(F);kt=a(me,"TD",{});var qa=r(kt);Bo=i(qa,"PVT-Tiny"),qa.forEach(o),qo=m(me),Xe=a(me,"TD",{align:!0});var La=r(Xe);Lo=i(La,"224"),La.forEach(o),Do=m(me),Qe=a(me,"TD",{align:!0});var Da=r(Qe);Go=i(Da,"75.1"),Da.forEach(o),Xo=m(me),Oe=a(me,"TD",{align:!0});var Ga=r(Oe);Qo=i(Ga,"13.2"),Ga.forEach(o),me.forEach(o),Oo=m(ce),U=a(ce,"TR",{});var pe=r(U);jt=a(pe,"TD",{});var Xa=r(jt);Yo=i(Xa,"PVT-Small"),Xa.forEach(o),Ho=m(pe),Ye=a(pe,"TD",{align:!0});var Qa=r(Ye);Ko=i(Qa,"224"),Qa.forEach(o),en=m(pe),He=a(pe,"TD",{align:!0});var Oa=r(He);tn=i(Oa,"79.8"),Oa.forEach(o),on=m(pe),Ke=a(pe,"TD",{align:!0});var Ya=r(Ke);nn=i(Ya,"24.5"),Ya.forEach(o),pe.forEach(o),an=m(ce),V=a(ce,"TR",{});var he=r(V);Nt=a(he,"TD",{});var Ha=r(Nt);rn=i(Ha,"PVT-Medium"),Ha.forEach(o),sn=m(he),et=a(he,"TD",{align:!0});var Ka=r(et);ln=i(Ka,"224"),Ka.forEach(o),dn=m(he),tt=a(he,"TD",{align:!0});var er=r(tt);cn=i(er,"81.2"),er.forEach(o),mn=m(he),ot=a(he,"TD",{align:!0});var tr=r(ot);pn=i(tr,"44.2"),tr.forEach(o),he.forEach(o),hn=m(ce),J=a(ce,"TR",{});var fe=r(J);zt=a(fe,"TD",{});var or=r(zt);fn=i(or,"PVT-Large"),or.forEach(o),un=m(fe),nt=a(fe,"TD",{align:!0});var nr=r(nt);gn=i(nr,"224"),nr.forEach(o),vn=m(fe),at=a(fe,"TD",{align:!0});var ar=r(at);_n=i(ar,"81.7"),ar.forEach(o),bn=m(fe),rt=a(fe,"TD",{align:!0});var rr=r(rt);yn=i(rr,"61.4"),rr.forEach(o),fe.forEach(o),ce.forEach(o),ho.forEach(o),oo=m(t),S=a(t,"H2",{class:!0});var fo=r(S);K=a(fo,"A",{id:!0,class:!0,href:!0});var sr=r(K);xt=a(sr,"SPAN",{});var ir=r(xt);T(Pe.$$.fragment,ir),ir.forEach(o),sr.forEach(o),Tn=m(fo),Ft=a(fo,"SPAN",{});var lr=r(Ft);Pn=i(lr,"PvtConfig"),lr.forEach(o),fo.forEach(o),no=m(t),I=a(t,"DIV",{class:!0});var ue=r(I);T(we.$$.fragment,ue),wn=m(ue),B=a(ue,"P",{});var pt=r(B);$n=i(pt,"This is the configuration class to store the configuration of a "),st=a(pt,"A",{href:!0});var dr=r(st);Mn=i(dr,"PvtModel"),dr.forEach(o),In=i(pt,`. It is used to instantiate an Pvt
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 Pvt
`),$e=a(pt,"A",{href:!0,rel:!0});var cr=r($e);En=i(cr,"Xrenya/pvt-tiny-224"),cr.forEach(o),Cn=i(pt," architecture."),pt.forEach(o),kn=m(ue),q=a(ue,"P",{});var ht=r(q);jn=i(ht,"Configuration objects inherit from "),it=a(ht,"A",{href:!0});var mr=r(it);Nn=i(mr,"PretrainedConfig"),mr.forEach(o),zn=i(ht,` and can be used to control the model outputs. Read the
documentation from `),lt=a(ht,"A",{href:!0});var pr=r(lt);xn=i(pr,"PretrainedConfig"),pr.forEach(o),Fn=i(ht," for more information."),ht.forEach(o),Un=m(ue),T(ee.$$.fragment,ue),ue.forEach(o),ao=m(t),L=a(t,"H2",{class:!0});var uo=r(L);te=a(uo,"A",{id:!0,class:!0,href:!0});var hr=r(te);Ut=a(hr,"SPAN",{});var fr=r(Ut);T(Me.$$.fragment,fr),fr.forEach(o),hr.forEach(o),Vn=m(uo),Vt=a(uo,"SPAN",{});var ur=r(Vt);Jn=i(ur,"PvtImageProcessor"),ur.forEach(o),uo.forEach(o),ro=m(t),R=a(t,"DIV",{class:!0});var ft=r(R);T(Ie.$$.fragment,ft),Rn=m(ft),Jt=a(ft,"P",{});var gr=r(Jt);Zn=i(gr,"Constructs a PVT image processor."),gr.forEach(o),Wn=m(ft),oe=a(ft,"DIV",{class:!0});var go=r(oe);T(Ee.$$.fragment,go),An=m(go),Rt=a(go,"P",{});var vr=r(Rt);Sn=i(vr,"Preprocess an image or batch of images."),vr.forEach(o),go.forEach(o),ft.forEach(o),so=m(t),D=a(t,"H2",{class:!0});var vo=r(D);ne=a(vo,"A",{id:!0,class:!0,href:!0});var _r=r(ne);Zt=a(_r,"SPAN",{});var br=r(Zt);T(Ce.$$.fragment,br),br.forEach(o),_r.forEach(o),Bn=m(vo),Wt=a(vo,"SPAN",{});var yr=r(Wt);qn=i(yr,"PvtForImageClassification"),yr.forEach(o),vo.forEach(o),io=m(t),E=a(t,"DIV",{class:!0});var ge=r(E);T(ke.$$.fragment,ge),Ln=m(ge),At=a(ge,"P",{});var Tr=r(At);Dn=i(Tr,`Pvt Model transformer with an image classification head on top (a linear layer on top of the final hidden state of
the [CLS] token) e.g. for ImageNet.`),Tr.forEach(o),Gn=m(ge),je=a(ge,"P",{});var _o=r(je);Xn=i(_o,"This model is a PyTorch "),Ne=a(_o,"A",{href:!0,rel:!0});var Pr=r(Ne);Qn=i(Pr,"torch.nn.Module"),Pr.forEach(o),On=i(_o,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),_o.forEach(o),Yn=m(ge),k=a(ge,"DIV",{class:!0});var ve=r(k);T(ze.$$.fragment,ve),Hn=m(ve),G=a(ve,"P",{});var ut=r(G);Kn=i(ut,"The "),dt=a(ut,"A",{href:!0});var wr=r(dt);ea=i(wr,"PvtForImageClassification"),wr.forEach(o),ta=i(ut," forward method, overrides the "),St=a(ut,"CODE",{});var $r=r(St);oa=i($r,"__call__"),$r.forEach(o),na=i(ut," special method."),ut.forEach(o),aa=m(ve),T(ae.$$.fragment,ve),ra=m(ve),T(re.$$.fragment,ve),ve.forEach(o),ge.forEach(o),lo=m(t),X=a(t,"H2",{class:!0});var bo=r(X);se=a(bo,"A",{id:!0,class:!0,href:!0});var Mr=r(se);Bt=a(Mr,"SPAN",{});var Ir=r(Bt);T(xe.$$.fragment,Ir),Ir.forEach(o),Mr.forEach(o),sa=m(bo),qt=a(bo,"SPAN",{});var Er=r(qt);ia=i(Er,"PvtModel"),Er.forEach(o),bo.forEach(o),co=m(t),Z=a(t,"DIV",{class:!0});var gt=r(Z);T(Fe.$$.fragment,gt),la=m(gt),Ue=a(gt,"P",{});var yo=r(Ue);da=i(yo,`The bare Pvt encoder outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Ve=a(yo,"A",{href:!0,rel:!0});var Cr=r(Ve);ca=i(Cr,"torch.nn.Module"),Cr.forEach(o),ma=i(yo,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),yo.forEach(o),pa=m(gt),j=a(gt,"DIV",{class:!0});var _e=r(j);T(Je.$$.fragment,_e),ha=m(_e),Q=a(_e,"P",{});var vt=r(Q);fa=i(vt,"The "),ct=a(vt,"A",{href:!0});var kr=r(ct);ua=i(kr,"PvtModel"),kr.forEach(o),ga=i(vt," forward method, overrides the "),Lt=a(vt,"CODE",{});var jr=r(Lt);va=i(jr,"__call__"),jr.forEach(o),_a=i(vt," special method."),vt.forEach(o),ba=m(_e),T(ie.$$.fragment,_e),ya=m(_e),T(le.$$.fragment,_e),_e.forEach(o),gt.forEach(o),this.h()},h(){d(p,"name","hf:doc:metadata"),d(p,"content",JSON.stringify(Br)),d(f,"id","pyramid-vision-transformer-pvt"),d(f,"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(f,"href","#pyramid-vision-transformer-pvt"),d(v,"class","relative group"),d(O,"id","overview"),d(O,"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(O,"href","#overview"),d(A,"class","relative group"),d(ye,"href","https://arxiv.org/abs/2102.12122"),d(ye,"rel","nofollow"),d(Be,"href","<https://huggingface.co/Xrenya"),d(Te,"href","https://github.com/whai362/PVT"),d(Te,"rel","nofollow"),d(Le,"align","center"),d(De,"align","center"),d(Ge,"align","center"),d(Xe,"align","center"),d(Qe,"align","center"),d(Oe,"align","center"),d(Ye,"align","center"),d(He,"align","center"),d(Ke,"align","center"),d(et,"align","center"),d(tt,"align","center"),d(ot,"align","center"),d(nt,"align","center"),d(at,"align","center"),d(rt,"align","center"),d(K,"id","transformers.PvtConfig"),d(K,"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(K,"href","#transformers.PvtConfig"),d(S,"class","relative group"),d(st,"href","/docs/transformers/main/en/model_doc/pvt#transformers.PvtModel"),d($e,"href","https://huggingface.co/Xrenya/pvt-tiny-224"),d($e,"rel","nofollow"),d(it,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(lt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(te,"id","transformers.PvtImageProcessor"),d(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(te,"href","#transformers.PvtImageProcessor"),d(L,"class","relative group"),d(oe,"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(ne,"id","transformers.PvtForImageClassification"),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","#transformers.PvtForImageClassification"),d(D,"class","relative group"),d(Ne,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Ne,"rel","nofollow"),d(dt,"href","/docs/transformers/main/en/model_doc/pvt#transformers.PvtForImageClassification"),d(k,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(se,"id","transformers.PvtModel"),d(se,"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(se,"href","#transformers.PvtModel"),d(X,"class","relative group"),d(Ve,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Ve,"rel","nofollow"),d(ct,"href","/docs/transformers/main/en/model_doc/pvt#transformers.PvtModel"),d(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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")},m(t,h){e(document.head,p),u(t,b,h),u(t,v,h),e(v,f),e(f,_),P(l,_,null),e(v,g),e(v,N),e(N,To),u(t,Qt,h),u(t,A,h),e(A,O),e(O,bt),P(be,bt,null),e(A,Po),e(A,yt),e(yt,wo),u(t,Ot,h),u(t,Y,h),e(Y,$o),e(Y,ye),e(ye,Mo),e(Y,Io),u(t,Yt,h),u(t,Ae,h),e(Ae,Eo),u(t,Ht,h),u(t,Se,h),e(Se,Tt),e(Tt,Co),u(t,Kt,h),u(t,W,h),e(W,ko),e(W,Be),e(Be,jo),e(W,No),e(W,Te),e(Te,zo),e(W,xo),u(t,eo,h),u(t,qe,h),e(qe,Pt),e(Pt,Fo),u(t,to,h),u(t,H,h),e(H,wt),e(wt,z),e(z,$t),e($t,Mt),e(Mt,Uo),e(z,Vo),e(z,Le),e(Le,It),e(It,Jo),e(z,Ro),e(z,De),e(De,Et),e(Et,Zo),e(z,Wo),e(z,Ge),e(Ge,Ct),e(Ct,Ao),e(H,So),e(H,x),e(x,F),e(F,kt),e(kt,Bo),e(F,qo),e(F,Xe),e(Xe,Lo),e(F,Do),e(F,Qe),e(Qe,Go),e(F,Xo),e(F,Oe),e(Oe,Qo),e(x,Oo),e(x,U),e(U,jt),e(jt,Yo),e(U,Ho),e(U,Ye),e(Ye,Ko),e(U,en),e(U,He),e(He,tn),e(U,on),e(U,Ke),e(Ke,nn),e(x,an),e(x,V),e(V,Nt),e(Nt,rn),e(V,sn),e(V,et),e(et,ln),e(V,dn),e(V,tt),e(tt,cn),e(V,mn),e(V,ot),e(ot,pn),e(x,hn),e(x,J),e(J,zt),e(zt,fn),e(J,un),e(J,nt),e(nt,gn),e(J,vn),e(J,at),e(at,_n),e(J,bn),e(J,rt),e(rt,yn),u(t,oo,h),u(t,S,h),e(S,K),e(K,xt),P(Pe,xt,null),e(S,Tn),e(S,Ft),e(Ft,Pn),u(t,no,h),u(t,I,h),P(we,I,null),e(I,wn),e(I,B),e(B,$n),e(B,st),e(st,Mn),e(B,In),e(B,$e),e($e,En),e(B,Cn),e(I,kn),e(I,q),e(q,jn),e(q,it),e(it,Nn),e(q,zn),e(q,lt),e(lt,xn),e(q,Fn),e(I,Un),P(ee,I,null),u(t,ao,h),u(t,L,h),e(L,te),e(te,Ut),P(Me,Ut,null),e(L,Vn),e(L,Vt),e(Vt,Jn),u(t,ro,h),u(t,R,h),P(Ie,R,null),e(R,Rn),e(R,Jt),e(Jt,Zn),e(R,Wn),e(R,oe),P(Ee,oe,null),e(oe,An),e(oe,Rt),e(Rt,Sn),u(t,so,h),u(t,D,h),e(D,ne),e(ne,Zt),P(Ce,Zt,null),e(D,Bn),e(D,Wt),e(Wt,qn),u(t,io,h),u(t,E,h),P(ke,E,null),e(E,Ln),e(E,At),e(At,Dn),e(E,Gn),e(E,je),e(je,Xn),e(je,Ne),e(Ne,Qn),e(je,On),e(E,Yn),e(E,k),P(ze,k,null),e(k,Hn),e(k,G),e(G,Kn),e(G,dt),e(dt,ea),e(G,ta),e(G,St),e(St,oa),e(G,na),e(k,aa),P(ae,k,null),e(k,ra),P(re,k,null),u(t,lo,h),u(t,X,h),e(X,se),e(se,Bt),P(xe,Bt,null),e(X,sa),e(X,qt),e(qt,ia),u(t,co,h),u(t,Z,h),P(Fe,Z,null),e(Z,la),e(Z,Ue),e(Ue,da),e(Ue,Ve),e(Ve,ca),e(Ue,ma),e(Z,pa),e(Z,j),P(Je,j,null),e(j,ha),e(j,Q),e(Q,fa),e(Q,ct),e(ct,ua),e(Q,ga),e(Q,Lt),e(Lt,va),e(Q,_a),e(j,ba),P(ie,j,null),e(j,ya),P(le,j,null),mo=!0},p(t,[h]){const Re={};h&2&&(Re.$$scope={dirty:h,ctx:t}),ee.$set(Re);const Dt={};h&2&&(Dt.$$scope={dirty:h,ctx:t}),ae.$set(Dt);const Gt={};h&2&&(Gt.$$scope={dirty:h,ctx:t}),re.$set(Gt);const Xt={};h&2&&(Xt.$$scope={dirty:h,ctx:t}),ie.$set(Xt);const Ze={};h&2&&(Ze.$$scope={dirty:h,ctx:t}),le.$set(Ze)},i(t){mo||(w(l.$$.fragment,t),w(be.$$.fragment,t),w(Pe.$$.fragment,t),w(we.$$.fragment,t),w(ee.$$.fragment,t),w(Me.$$.fragment,t),w(Ie.$$.fragment,t),w(Ee.$$.fragment,t),w(Ce.$$.fragment,t),w(ke.$$.fragment,t),w(ze.$$.fragment,t),w(ae.$$.fragment,t),w(re.$$.fragment,t),w(xe.$$.fragment,t),w(Fe.$$.fragment,t),w(Je.$$.fragment,t),w(ie.$$.fragment,t),w(le.$$.fragment,t),mo=!0)},o(t){$(l.$$.fragment,t),$(be.$$.fragment,t),$(Pe.$$.fragment,t),$(we.$$.fragment,t),$(ee.$$.fragment,t),$(Me.$$.fragment,t),$(Ie.$$.fragment,t),$(Ee.$$.fragment,t),$(Ce.$$.fragment,t),$(ke.$$.fragment,t),$(ze.$$.fragment,t),$(ae.$$.fragment,t),$(re.$$.fragment,t),$(xe.$$.fragment,t),$(Fe.$$.fragment,t),$(Je.$$.fragment,t),$(ie.$$.fragment,t),$(le.$$.fragment,t),mo=!1},d(t){o(p),t&&o(b),t&&o(v),M(l),t&&o(Qt),t&&o(A),M(be),t&&o(Ot),t&&o(Y),t&&o(Yt),t&&o(Ae),t&&o(Ht),t&&o(Se),t&&o(Kt),t&&o(W),t&&o(eo),t&&o(qe),t&&o(to),t&&o(H),t&&o(oo),t&&o(S),M(Pe),t&&o(no),t&&o(I),M(we),M(ee),t&&o(ao),t&&o(L),M(Me),t&&o(ro),t&&o(R),M(Ie),M(Ee),t&&o(so),t&&o(D),M(Ce),t&&o(io),t&&o(E),M(ke),M(ze),M(ae),M(re),t&&o(lo),t&&o(X),M(xe),t&&o(co),t&&o(Z),M(Fe),M(Je),M(ie),M(le)}}}const Br={local:"pyramid-vision-transformer-pvt",sections:[{local:"overview",title:"Overview"},{local:"transformers.PvtConfig",title:"PvtConfig"},{local:"transformers.PvtImageProcessor",title:"PvtImageProcessor"},{local:"transformers.PvtForImageClassification",title:"PvtForImageClassification"},{local:"transformers.PvtModel",title:"PvtModel"}],title:"Pyramid Vision Transformer (PVT)"};function qr(C){return Vr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yr extends zr{constructor(p){super();xr(this,p,qr,Sr,Fr,{})}}export{Yr as default,Br as metadata};
