import{s as yt,o as Tt,n as Te}from"../chunks/scheduler.25b97de1.js";import{S as Pt,i as wt,g as m,s,r as g,A as $t,h as p,f as o,c as r,j as Z,u as h,x as y,k as N,y as c,a as i,v as u,d as _,t as v,w as b}from"../chunks/index.d9030fc9.js";import{T as bt}from"../chunks/Tip.baa67368.js";import{D as le}from"../chunks/Docstring.ffac8efa.js";import{C as nt}from"../chunks/CodeBlock.e6cd0d95.js";import{E as ot}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as be,E as Mt}from"../chunks/EditOnGithub.91d95064.js";function Ct(M){let n,T="Example:",l,d,f;return d=new nt({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`,wrap:!1}}),{c(){n=m("p"),n.textContent=T,l=s(),g(d.$$.fragment)},l(a){n=p(a,"P",{"data-svelte-h":!0}),y(n)!=="svelte-11lpom8"&&(n.textContent=T),l=r(a),h(d.$$.fragment,a)},m(a,P){i(a,n,P),i(a,l,P),u(d,a,P),f=!0},p:Te,i(a){f||(_(d.$$.fragment,a),f=!0)},o(a){v(d.$$.fragment,a),f=!1},d(a){a&&(o(n),o(l)),b(d,a)}}}function It(M){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=m("p"),n.innerHTML=T},l(l){n=p(l,"P",{"data-svelte-h":!0}),y(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(l,d){i(l,n,d)},p:Te,d(l){l&&o(n)}}}function xt(M){let n,T="Example:",l,d,f;return d=new nt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFB2dEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlpldGF0ZWNoJTJGcHZ0LXRpbnktMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwUHZ0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyWmV0YXRlY2glMkZwdnQtdGlueS0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",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>, trust_remote_code=<span class="hljs-literal">True</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`,wrap:!1}}),{c(){n=m("p"),n.textContent=T,l=s(),g(d.$$.fragment)},l(a){n=p(a,"P",{"data-svelte-h":!0}),y(n)!=="svelte-11lpom8"&&(n.textContent=T),l=r(a),h(d.$$.fragment,a)},m(a,P){i(a,n,P),i(a,l,P),u(d,a,P),f=!0},p:Te,i(a){f||(_(d.$$.fragment,a),f=!0)},o(a){v(d.$$.fragment,a),f=!1},d(a){a&&(o(n),o(l)),b(d,a)}}}function jt(M){let n,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=m("p"),n.innerHTML=T},l(l){n=p(l,"P",{"data-svelte-h":!0}),y(n)!=="svelte-fincs2"&&(n.innerHTML=T)},m(l,d){i(l,n,d)},p:Te,d(l){l&&o(n)}}}function zt(M){let n,T="Example:",l,d,f;return d=new nt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFB2dE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJaZXRhdGVjaCUyRnB2dC10aW55LTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMFB2dE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJaZXRhdGVjaCUyRnB2dC10aW55LTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",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>, trust_remote_code=<span class="hljs-literal">True</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>]`,wrap:!1}}),{c(){n=m("p"),n.textContent=T,l=s(),g(d.$$.fragment)},l(a){n=p(a,"P",{"data-svelte-h":!0}),y(n)!=="svelte-11lpom8"&&(n.textContent=T),l=r(a),h(d.$$.fragment,a)},m(a,P){i(a,n,P),i(a,l,P),u(d,a,P),f=!0},p:Te,i(a){f||(_(d.$$.fragment,a),f=!0)},o(a){v(d.$$.fragment,a),f=!1},d(a){a&&(o(n),o(l)),b(d,a)}}}function Ft(M){let n,T,l,d,f,a,P,Pe,B,at=`The PVT model was proposed in
<a href="https://arxiv.org/abs/2102.12122" rel="nofollow">Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions</a>
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.`,we,G,st="The abstract from the paper is the following:",$e,X,rt=`<em>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.</em>`,Me,S,it='This model was contributed by <a href="https://huggingface.co/Xrenya" rel="nofollow">Xrenya</a>. The original code can be found <a href="https://github.com/whai362/PVT" rel="nofollow">here</a>.',Ce,H,lt="<li>PVTv1 on ImageNet-1K</li>",Ie,Q,dt='<thead><tr><th><strong>Model variant</strong></th> <th align="center"><strong>Size</strong></th> <th align="center"><strong>Acc@1</strong></th> <th align="center"><strong>Params (M)</strong></th></tr></thead> <tbody><tr><td>PVT-Tiny</td> <td align="center">224</td> <td align="center">75.1</td> <td align="center">13.2</td></tr> <tr><td>PVT-Small</td> <td align="center">224</td> <td align="center">79.8</td> <td align="center">24.5</td></tr> <tr><td>PVT-Medium</td> <td align="center">224</td> <td align="center">81.2</td> <td align="center">44.2</td></tr> <tr><td>PVT-Large</td> <td align="center">224</td> <td align="center">81.7</td> <td align="center">61.4</td></tr></tbody>',xe,D,je,w,A,Re,de,ct=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/pvt#transformers.PvtModel">PvtModel</a>. 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
<a href="https://huggingface.co/Xrenya/pvt-tiny-224" rel="nofollow">Xrenya/pvt-tiny-224</a> architecture.`,Ve,ce,mt=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,qe,W,ze,Y,Fe,x,O,Ee,me,pt="Constructs a PVT image processor.",Be,k,K,Ge,pe,ft="Preprocess an image or batch of images.",Je,ee,Ue,$,te,Xe,fe,gt=`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.`,Se,ge,ht=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,He,C,oe,Qe,he,ut='The <a href="/docs/transformers/main/en/model_doc/pvt#transformers.PvtForImageClassification">PvtForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',De,L,Ae,R,Ze,ne,Ne,j,ae,Ye,ue,_t=`The bare Pvt encoder outputting raw hidden-states without any specific head on top.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Oe,I,se,Ke,_e,vt='The <a href="/docs/transformers/main/en/model_doc/pvt#transformers.PvtModel">PvtModel</a> forward method, overrides the <code>__call__</code> special method.',et,V,tt,q,We,re,ke,ye,Le;return f=new be({props:{title:"Pyramid Vision Transformer (PVT)",local:"pyramid-vision-transformer-pvt",headingTag:"h1"}}),P=new be({props:{title:"Overview",local:"overview",headingTag:"h2"}}),D=new be({props:{title:"PvtConfig",local:"transformers.PvtConfig",headingTag:"h2"}}),A=new le({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-06) &#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#L32"}}),W=new ot({props:{anchor:"transformers.PvtConfig.example",$$slots:{default:[Ct]},$$scope:{ctx:M}}}),Y=new be({props:{title:"PvtImageProcessor",local:"transformers.PvtImageProcessor",headingTag:"h2"}}),O=new le({props:{name:"class transformers.PvtImageProcessor",anchor:"transformers.PvtImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Optional[typing.Dict[str, int]] = 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>Resampling.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</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.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#L42"}}),K=new le({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"}],parametersDescription:[{anchor:"transformers.PvtImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,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#L148"}}),ee=new be({props:{title:"PvtForImageClassification",local:"transformers.PvtForImageClassification",headingTag:"h2"}}),te=new le({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#L580"}}),oe=new le({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/imagegpt#transformers.ImageGPTFeatureExtractor.__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#L602",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<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>
`}}),L=new bt({props:{$$slots:{default:[It]},$$scope:{ctx:M}}}),R=new ot({props:{anchor:"transformers.PvtForImageClassification.forward.example",$$slots:{default:[xt]},$$scope:{ctx:M}}}),ne=new be({props:{title:"PvtModel",local:"transformers.PvtModel",headingTag:"h2"}}),ae=new le({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#L518"}}),se=new le({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/imagegpt#transformers.ImageGPTFeatureExtractor.__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#L541",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<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>
`}}),V=new bt({props:{$$slots:{default:[jt]},$$scope:{ctx:M}}}),q=new ot({props:{anchor:"transformers.PvtModel.forward.example",$$slots:{default:[zt]},$$scope:{ctx:M}}}),re=new Mt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/pvt.md"}}),{c(){n=m("meta"),T=s(),l=m("p"),d=s(),g(f.$$.fragment),a=s(),g(P.$$.fragment),Pe=s(),B=m("p"),B.innerHTML=at,we=s(),G=m("p"),G.textContent=st,$e=s(),X=m("p"),X.innerHTML=rt,Me=s(),S=m("p"),S.innerHTML=it,Ce=s(),H=m("ul"),H.innerHTML=lt,Ie=s(),Q=m("table"),Q.innerHTML=dt,xe=s(),g(D.$$.fragment),je=s(),w=m("div"),g(A.$$.fragment),Re=s(),de=m("p"),de.innerHTML=ct,Ve=s(),ce=m("p"),ce.innerHTML=mt,qe=s(),g(W.$$.fragment),ze=s(),g(Y.$$.fragment),Fe=s(),x=m("div"),g(O.$$.fragment),Ee=s(),me=m("p"),me.textContent=pt,Be=s(),k=m("div"),g(K.$$.fragment),Ge=s(),pe=m("p"),pe.textContent=ft,Je=s(),g(ee.$$.fragment),Ue=s(),$=m("div"),g(te.$$.fragment),Xe=s(),fe=m("p"),fe.textContent=gt,Se=s(),ge=m("p"),ge.innerHTML=ht,He=s(),C=m("div"),g(oe.$$.fragment),Qe=s(),he=m("p"),he.innerHTML=ut,De=s(),g(L.$$.fragment),Ae=s(),g(R.$$.fragment),Ze=s(),g(ne.$$.fragment),Ne=s(),j=m("div"),g(ae.$$.fragment),Ye=s(),ue=m("p"),ue.innerHTML=_t,Oe=s(),I=m("div"),g(se.$$.fragment),Ke=s(),_e=m("p"),_e.innerHTML=vt,et=s(),g(V.$$.fragment),tt=s(),g(q.$$.fragment),We=s(),g(re.$$.fragment),ke=s(),ye=m("p"),this.h()},l(e){const t=$t("svelte-u9bgzb",document.head);n=p(t,"META",{name:!0,content:!0}),t.forEach(o),T=r(e),l=p(e,"P",{}),Z(l).forEach(o),d=r(e),h(f.$$.fragment,e),a=r(e),h(P.$$.fragment,e),Pe=r(e),B=p(e,"P",{"data-svelte-h":!0}),y(B)!=="svelte-8q4zoa"&&(B.innerHTML=at),we=r(e),G=p(e,"P",{"data-svelte-h":!0}),y(G)!=="svelte-vfdo9a"&&(G.textContent=st),$e=r(e),X=p(e,"P",{"data-svelte-h":!0}),y(X)!=="svelte-1m8halq"&&(X.innerHTML=rt),Me=r(e),S=p(e,"P",{"data-svelte-h":!0}),y(S)!=="svelte-1x24ibz"&&(S.innerHTML=it),Ce=r(e),H=p(e,"UL",{"data-svelte-h":!0}),y(H)!=="svelte-xv3sau"&&(H.innerHTML=lt),Ie=r(e),Q=p(e,"TABLE",{"data-svelte-h":!0}),y(Q)!=="svelte-l7vv2w"&&(Q.innerHTML=dt),xe=r(e),h(D.$$.fragment,e),je=r(e),w=p(e,"DIV",{class:!0});var z=Z(w);h(A.$$.fragment,z),Re=r(z),de=p(z,"P",{"data-svelte-h":!0}),y(de)!=="svelte-f8n6b1"&&(de.innerHTML=ct),Ve=r(z),ce=p(z,"P",{"data-svelte-h":!0}),y(ce)!=="svelte-o55m63"&&(ce.innerHTML=mt),qe=r(z),h(W.$$.fragment,z),z.forEach(o),ze=r(e),h(Y.$$.fragment,e),Fe=r(e),x=p(e,"DIV",{class:!0});var U=Z(x);h(O.$$.fragment,U),Ee=r(U),me=p(U,"P",{"data-svelte-h":!0}),y(me)!=="svelte-1h0qwwc"&&(me.textContent=pt),Be=r(U),k=p(U,"DIV",{class:!0});var ie=Z(k);h(K.$$.fragment,ie),Ge=r(ie),pe=p(ie,"P",{"data-svelte-h":!0}),y(pe)!=="svelte-1x3yxsa"&&(pe.textContent=ft),ie.forEach(o),U.forEach(o),Je=r(e),h(ee.$$.fragment,e),Ue=r(e),$=p(e,"DIV",{class:!0});var F=Z($);h(te.$$.fragment,F),Xe=r(F),fe=p(F,"P",{"data-svelte-h":!0}),y(fe)!=="svelte-ztbq9b"&&(fe.textContent=gt),Se=r(F),ge=p(F,"P",{"data-svelte-h":!0}),y(ge)!=="svelte-68lg8f"&&(ge.innerHTML=ht),He=r(F),C=p(F,"DIV",{class:!0});var J=Z(C);h(oe.$$.fragment,J),Qe=r(J),he=p(J,"P",{"data-svelte-h":!0}),y(he)!=="svelte-1fd5fwt"&&(he.innerHTML=ut),De=r(J),h(L.$$.fragment,J),Ae=r(J),h(R.$$.fragment,J),J.forEach(o),F.forEach(o),Ze=r(e),h(ne.$$.fragment,e),Ne=r(e),j=p(e,"DIV",{class:!0});var ve=Z(j);h(ae.$$.fragment,ve),Ye=r(ve),ue=p(ve,"P",{"data-svelte-h":!0}),y(ue)!=="svelte-aq69vq"&&(ue.innerHTML=_t),Oe=r(ve),I=p(ve,"DIV",{class:!0});var E=Z(I);h(se.$$.fragment,E),Ke=r(E),_e=p(E,"P",{"data-svelte-h":!0}),y(_e)!=="svelte-n3tiyf"&&(_e.innerHTML=vt),et=r(E),h(V.$$.fragment,E),tt=r(E),h(q.$$.fragment,E),E.forEach(o),ve.forEach(o),We=r(e),h(re.$$.fragment,e),ke=r(e),ye=p(e,"P",{}),Z(ye).forEach(o),this.h()},h(){N(n,"name","hf:doc:metadata"),N(n,"content",Jt),N(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){c(document.head,n),i(e,T,t),i(e,l,t),i(e,d,t),u(f,e,t),i(e,a,t),u(P,e,t),i(e,Pe,t),i(e,B,t),i(e,we,t),i(e,G,t),i(e,$e,t),i(e,X,t),i(e,Me,t),i(e,S,t),i(e,Ce,t),i(e,H,t),i(e,Ie,t),i(e,Q,t),i(e,xe,t),u(D,e,t),i(e,je,t),i(e,w,t),u(A,w,null),c(w,Re),c(w,de),c(w,Ve),c(w,ce),c(w,qe),u(W,w,null),i(e,ze,t),u(Y,e,t),i(e,Fe,t),i(e,x,t),u(O,x,null),c(x,Ee),c(x,me),c(x,Be),c(x,k),u(K,k,null),c(k,Ge),c(k,pe),i(e,Je,t),u(ee,e,t),i(e,Ue,t),i(e,$,t),u(te,$,null),c($,Xe),c($,fe),c($,Se),c($,ge),c($,He),c($,C),u(oe,C,null),c(C,Qe),c(C,he),c(C,De),u(L,C,null),c(C,Ae),u(R,C,null),i(e,Ze,t),u(ne,e,t),i(e,Ne,t),i(e,j,t),u(ae,j,null),c(j,Ye),c(j,ue),c(j,Oe),c(j,I),u(se,I,null),c(I,Ke),c(I,_e),c(I,et),u(V,I,null),c(I,tt),u(q,I,null),i(e,We,t),u(re,e,t),i(e,ke,t),i(e,ye,t),Le=!0},p(e,[t]){const z={};t&2&&(z.$$scope={dirty:t,ctx:e}),W.$set(z);const U={};t&2&&(U.$$scope={dirty:t,ctx:e}),L.$set(U);const ie={};t&2&&(ie.$$scope={dirty:t,ctx:e}),R.$set(ie);const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),V.$set(F);const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),q.$set(J)},i(e){Le||(_(f.$$.fragment,e),_(P.$$.fragment,e),_(D.$$.fragment,e),_(A.$$.fragment,e),_(W.$$.fragment,e),_(Y.$$.fragment,e),_(O.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(oe.$$.fragment,e),_(L.$$.fragment,e),_(R.$$.fragment,e),_(ne.$$.fragment,e),_(ae.$$.fragment,e),_(se.$$.fragment,e),_(V.$$.fragment,e),_(q.$$.fragment,e),_(re.$$.fragment,e),Le=!0)},o(e){v(f.$$.fragment,e),v(P.$$.fragment,e),v(D.$$.fragment,e),v(A.$$.fragment,e),v(W.$$.fragment,e),v(Y.$$.fragment,e),v(O.$$.fragment,e),v(K.$$.fragment,e),v(ee.$$.fragment,e),v(te.$$.fragment,e),v(oe.$$.fragment,e),v(L.$$.fragment,e),v(R.$$.fragment,e),v(ne.$$.fragment,e),v(ae.$$.fragment,e),v(se.$$.fragment,e),v(V.$$.fragment,e),v(q.$$.fragment,e),v(re.$$.fragment,e),Le=!1},d(e){e&&(o(T),o(l),o(d),o(a),o(Pe),o(B),o(we),o(G),o($e),o(X),o(Me),o(S),o(Ce),o(H),o(Ie),o(Q),o(xe),o(je),o(w),o(ze),o(Fe),o(x),o(Je),o(Ue),o($),o(Ze),o(Ne),o(j),o(We),o(ke),o(ye)),o(n),b(f,e),b(P,e),b(D,e),b(A),b(W),b(Y,e),b(O),b(K),b(ee,e),b(te),b(oe),b(L),b(R),b(ne,e),b(ae),b(se),b(V),b(q),b(re,e)}}}const Jt='{"title":"Pyramid Vision Transformer (PVT)","local":"pyramid-vision-transformer-pvt","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"PvtConfig","local":"transformers.PvtConfig","sections":[],"depth":2},{"title":"PvtImageProcessor","local":"transformers.PvtImageProcessor","sections":[],"depth":2},{"title":"PvtForImageClassification","local":"transformers.PvtForImageClassification","sections":[],"depth":2},{"title":"PvtModel","local":"transformers.PvtModel","sections":[],"depth":2}],"depth":1}';function Ut(M){return Tt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class qt extends Pt{constructor(n){super(),wt(this,n,Ut,Ft,yt,{})}}export{qt as component};
