import{S as Nr,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 zr}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 z=r(v);f=i(z,"Module"),z.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 z=r(v);f=i(z,"Module"),z.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 Br(C){let p,b,v,f,_,l,g,z,To,Qt,A,O,bt,be,Po,yt,wo,Ot,Y,$o,ye,Mo,Io,Yt,Ae,Eo,Ht,Be,Tt,Co,Kt,W,ko,Se,jo,zo,Te,No,xo,eo,Le,Pt,Fo,to,H,wt,N,$t,Mt,Uo,Vo,qe,It,Jo,Ro,Ge,Et,Zo,Wo,De,Ct,Ao,Bo,x,F,kt,So,Lo,Xe,qo,Go,Qe,Do,Xo,Oe,Qo,Oo,U,jt,Yo,Ho,Ye,Ko,en,He,tn,on,Ke,nn,an,V,zt,rn,sn,et,ln,dn,tt,cn,mn,ot,pn,hn,J,Nt,fn,un,nt,gn,vn,at,_n,bn,rt,yn,oo,B,K,xt,Pe,Tn,Ft,Pn,no,I,we,wn,S,$n,st,Mn,In,$e,En,Cn,kn,L,jn,it,zn,Nn,lt,xn,Fn,Un,ee,ao,q,te,Ut,Me,Vn,Vt,Jn,ro,R,Ie,Rn,Jt,Zn,Wn,oe,Ee,An,Rt,Bn,so,G,ne,Zt,Ce,Sn,Wt,Ln,io,E,ke,qn,At,Gn,Dn,je,Xn,ze,Qn,On,Yn,k,Ne,Hn,D,Kn,dt,ea,ta,Bt,oa,na,aa,ae,ra,re,lo,X,se,St,xe,sa,Lt,ia,co,Z,Fe,la,Ue,da,Ve,ca,ma,pa,j,Je,ha,Q,fa,ct,ua,ga,qt,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#L39"}}),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:"**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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pvt/image_processing_pvt.py#L130"}}),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"}}),Ne=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/levit#transformers.LevitFeatureExtractor.__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 zr({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/levit#transformers.LevitFeatureExtractor.__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 zr({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(),z=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(),Be=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 "),Se=n("a"),jo=s("Xrenya"),zo=s(". The original code can be found "),Te=n("a"),No=s("here"),xo=s("."),eo=c(),Le=n("ul"),Pt=n("li"),Fo=s("PVTv1 on ImageNet-1K"),to=c(),H=n("table"),wt=n("thead"),N=n("tr"),$t=n("th"),Mt=n("strong"),Uo=s("Model variant"),Vo=c(),qe=n("th"),It=n("strong"),Jo=s("Size"),Ro=c(),Ge=n("th"),Et=n("strong"),Zo=s("Acc@1"),Wo=c(),De=n("th"),Ct=n("strong"),Ao=s("Params (M)"),Bo=c(),x=n("tbody"),F=n("tr"),kt=n("td"),So=s("PVT-Tiny"),Lo=c(),Xe=n("td"),qo=s("224"),Go=c(),Qe=n("td"),Do=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"),zt=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"),Nt=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(),B=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(),S=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(),L=n("p"),jn=s("Configuration objects inherit from "),it=n("a"),zn=s("PretrainedConfig"),Nn=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(),q=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"),Bn=s("Preprocess an image or batch of images."),so=c(),G=n("h2"),ne=n("a"),Zt=n("span"),y(Ce.$$.fragment),Sn=c(),Wt=n("span"),Ln=s("PvtForImageClassification"),io=c(),E=n("div"),y(ke.$$.fragment),qn=c(),At=n("p"),Gn=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.`),Dn=c(),je=n("p"),Xn=s("This model is a PyTorch "),ze=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(Ne.$$.fragment),Hn=c(),D=n("p"),Kn=s("The "),dt=n("a"),ea=s("PvtForImageClassification"),ta=s(" forward method, overrides the "),Bt=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"),St=n("span"),y(xe.$$.fragment),sa=c(),Lt=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 "),qt=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 Gt=r(f);_=a(Gt,"SPAN",{});var Dt=r(_);T(l.$$.fragment,Dt),Dt.forEach(o),Gt.forEach(o),g=m(Re),z=a(Re,"SPAN",{});var Xt=r(z);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),Be=a(t,"P",{});var ka=r(Be);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 "),Se=a(mt,"A",{href:!0});var za=r(Se);jo=i(za,"Xrenya"),za.forEach(o),zo=i(mt,". The original code can be found "),Te=a(mt,"A",{href:!0,rel:!0});var Na=r(Te);No=i(Na,"here"),Na.forEach(o),xo=i(mt,"."),mt.forEach(o),eo=m(t),Le=a(t,"UL",{});var xa=r(Le);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);N=a(Ua,"TR",{});var de=r(N);$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),qe=a(de,"TH",{align:!0});var Ra=r(qe);It=a(Ra,"STRONG",{});var Za=r(It);Jo=i(Za,"Size"),Za.forEach(o),Ra.forEach(o),Ro=m(de),Ge=a(de,"TH",{align:!0});var Wa=r(Ge);Et=a(Wa,"STRONG",{});var Aa=r(Et);Zo=i(Aa,"Acc@1"),Aa.forEach(o),Wa.forEach(o),Wo=m(de),De=a(de,"TH",{align:!0});var Ba=r(De);Ct=a(Ba,"STRONG",{});var Sa=r(Ct);Ao=i(Sa,"Params (M)"),Sa.forEach(o),Ba.forEach(o),de.forEach(o),Ua.forEach(o),Bo=m(ho),x=a(ho,"TBODY",{});var ce=r(x);F=a(ce,"TR",{});var me=r(F);kt=a(me,"TD",{});var La=r(kt);So=i(La,"PVT-Tiny"),La.forEach(o),Lo=m(me),Xe=a(me,"TD",{align:!0});var qa=r(Xe);qo=i(qa,"224"),qa.forEach(o),Go=m(me),Qe=a(me,"TD",{align:!0});var Ga=r(Qe);Do=i(Ga,"75.1"),Ga.forEach(o),Xo=m(me),Oe=a(me,"TD",{align:!0});var Da=r(Oe);Qo=i(Da,"13.2"),Da.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);zt=a(he,"TD",{});var Ha=r(zt);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);Nt=a(fe,"TD",{});var or=r(Nt);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),B=a(t,"H2",{class:!0});var fo=r(B);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),S=a(ue,"P",{});var pt=r(S);$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),L=a(ue,"P",{});var ht=r(L);jn=i(ht,"Configuration objects inherit from "),it=a(ht,"A",{href:!0});var mr=r(it);zn=i(mr,"PretrainedConfig"),mr.forEach(o),Nn=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),q=a(t,"H2",{class:!0});var uo=r(q);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);Bn=i(vr,"Preprocess an image or batch of images."),vr.forEach(o),go.forEach(o),ft.forEach(o),so=m(t),G=a(t,"H2",{class:!0});var vo=r(G);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),Sn=m(vo),Wt=a(vo,"SPAN",{});var yr=r(Wt);Ln=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),qn=m(ge),At=a(ge,"P",{});var Tr=r(At);Gn=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),Dn=m(ge),je=a(ge,"P",{});var _o=r(je);Xn=i(_o,"This model is a PyTorch "),ze=a(_o,"A",{href:!0,rel:!0});var Pr=r(ze);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(Ne.$$.fragment,ve),Hn=m(ve),D=a(ve,"P",{});var ut=r(D);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 "),Bt=a(ut,"CODE",{});var $r=r(Bt);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);St=a(Mr,"SPAN",{});var Ir=r(St);T(xe.$$.fragment,Ir),Ir.forEach(o),Mr.forEach(o),sa=m(bo),Lt=a(bo,"SPAN",{});var Er=r(Lt);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 "),qt=a(vt,"CODE",{});var jr=r(qt);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(Sr)),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(Se,"href","<https://huggingface.co/Xrenya"),d(Te,"href","https://github.com/whai362/PVT"),d(Te,"rel","nofollow"),d(qe,"align","center"),d(Ge,"align","center"),d(De,"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(B,"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(q,"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(G,"class","relative group"),d(ze,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(ze,"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,z),e(z,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,Be,h),e(Be,Tt),e(Tt,Co),u(t,Kt,h),u(t,W,h),e(W,ko),e(W,Se),e(Se,jo),e(W,zo),e(W,Te),e(Te,No),e(W,xo),u(t,eo,h),u(t,Le,h),e(Le,Pt),e(Pt,Fo),u(t,to,h),u(t,H,h),e(H,wt),e(wt,N),e(N,$t),e($t,Mt),e(Mt,Uo),e(N,Vo),e(N,qe),e(qe,It),e(It,Jo),e(N,Ro),e(N,Ge),e(Ge,Et),e(Et,Zo),e(N,Wo),e(N,De),e(De,Ct),e(Ct,Ao),e(H,Bo),e(H,x),e(x,F),e(F,kt),e(kt,So),e(F,Lo),e(F,Xe),e(Xe,qo),e(F,Go),e(F,Qe),e(Qe,Do),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,zt),e(zt,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,Nt),e(Nt,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,B,h),e(B,K),e(K,xt),P(Pe,xt,null),e(B,Tn),e(B,Ft),e(Ft,Pn),u(t,no,h),u(t,I,h),P(we,I,null),e(I,wn),e(I,S),e(S,$n),e(S,st),e(st,Mn),e(S,In),e(S,$e),e($e,En),e(S,Cn),e(I,kn),e(I,L),e(L,jn),e(L,it),e(it,zn),e(L,Nn),e(L,lt),e(lt,xn),e(L,Fn),e(I,Un),P(ee,I,null),u(t,ao,h),u(t,q,h),e(q,te),e(te,Ut),P(Me,Ut,null),e(q,Vn),e(q,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,Bn),u(t,so,h),u(t,G,h),e(G,ne),e(ne,Zt),P(Ce,Zt,null),e(G,Sn),e(G,Wt),e(Wt,Ln),u(t,io,h),u(t,E,h),P(ke,E,null),e(E,qn),e(E,At),e(At,Gn),e(E,Dn),e(E,je),e(je,Xn),e(je,ze),e(ze,Qn),e(je,On),e(E,Yn),e(E,k),P(Ne,k,null),e(k,Hn),e(k,D),e(D,Kn),e(D,dt),e(dt,ea),e(D,ta),e(D,Bt),e(Bt,oa),e(D,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,St),P(xe,St,null),e(X,sa),e(X,Lt),e(Lt,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,qt),e(qt,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 Gt={};h&2&&(Gt.$$scope={dirty:h,ctx:t}),ae.$set(Gt);const Dt={};h&2&&(Dt.$$scope={dirty:h,ctx:t}),re.$set(Dt);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(Ne.$$.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),$(Ne.$$.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(Be),t&&o(Kt),t&&o(W),t&&o(eo),t&&o(Le),t&&o(to),t&&o(H),t&&o(oo),t&&o(B),M(Pe),t&&o(no),t&&o(I),M(we),M(ee),t&&o(ao),t&&o(q),M(Me),t&&o(ro),t&&o(R),M(Ie),M(Ee),t&&o(so),t&&o(G),M(Ce),t&&o(io),t&&o(E),M(ke),M(Ne),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 Sr={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 Lr(C){return Vr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yr extends Nr{constructor(p){super();xr(this,p,Lr,Br,Fr,{})}}export{Yr as default,Sr as metadata};
