import{s as wt,o as $t,n as Pe}from"../chunks/scheduler.01eeda35.js";import{S as Mt,i as Ct,g as c,s as r,r as g,A as It,h as m,f as o,c as i,j as N,u as h,x as y,k as U,y as p,a,v as u,d as _,t as v,w as b}from"../chunks/index.6dd51b66.js";import{T as Pt}from"../chunks/Tip.de9bae2b.js";import{D as de}from"../chunks/Docstring.cb556860.js";import{C as at}from"../chunks/CodeBlock.19ec9b8c.js";import{E as st}from"../chunks/ExampleCodeBlock.69db56ad.js";import{H as ye,E as xt}from"../chunks/index.58fe8f9d.js";function jt(M){let n,P="Example:",l,d,f;return d=new at({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=c("p"),n.textContent=P,l=r(),g(d.$$.fragment)},l(s){n=m(s,"P",{"data-svelte-h":!0}),y(n)!=="svelte-11lpom8"&&(n.textContent=P),l=i(s),h(d.$$.fragment,s)},m(s,T){a(s,n,T),a(s,l,T),u(d,s,T),f=!0},p:Pe,i(s){f||(_(d.$$.fragment,s),f=!0)},o(s){v(d.$$.fragment,s),f=!1},d(s){s&&(o(n),o(l)),b(d,s)}}}function zt(M){let n,P=`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=c("p"),n.innerHTML=P},l(l){n=m(l,"P",{"data-svelte-h":!0}),y(n)!=="svelte-fincs2"&&(n.innerHTML=P)},m(l,d){a(l,n,d)},p:Pe,d(l){l&&o(n)}}}function Jt(M){let n,P="Example:",l,d,f;return d=new at({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=c("p"),n.textContent=P,l=r(),g(d.$$.fragment)},l(s){n=m(s,"P",{"data-svelte-h":!0}),y(n)!=="svelte-11lpom8"&&(n.textContent=P),l=i(s),h(d.$$.fragment,s)},m(s,T){a(s,n,T),a(s,l,T),u(d,s,T),f=!0},p:Pe,i(s){f||(_(d.$$.fragment,s),f=!0)},o(s){v(d.$$.fragment,s),f=!1},d(s){s&&(o(n),o(l)),b(d,s)}}}function Ft(M){let n,P=`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=c("p"),n.innerHTML=P},l(l){n=m(l,"P",{"data-svelte-h":!0}),y(n)!=="svelte-fincs2"&&(n.innerHTML=P)},m(l,d){a(l,n,d)},p:Pe,d(l){l&&o(n)}}}function Ut(M){let n,P="Example:",l,d,f;return d=new at({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=c("p"),n.textContent=P,l=r(),g(d.$$.fragment)},l(s){n=m(s,"P",{"data-svelte-h":!0}),y(n)!=="svelte-11lpom8"&&(n.textContent=P),l=i(s),h(d.$$.fragment,s)},m(s,T){a(s,n,T),a(s,l,T),u(d,s,T),f=!0},p:Pe,i(s){f||(_(d.$$.fragment,s),f=!0)},o(s){v(d.$$.fragment,s),f=!1},d(s){s&&(o(n),o(l)),b(d,s)}}}function Zt(M){let n,P,l,d,f,s,T,rt='<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/>',we,B,$e,G,it=`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.`,Me,X,lt="The abstract from the paper is the following:",Ce,H,dt=`<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>`,Ie,S,ct='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>.',xe,D,mt="<li>PVTv1 on ImageNet-1K</li>",je,Q,pt='<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>',ze,A,Je,w,Y,qe,ce,ft=`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.`,Ee,me,gt=`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.`,Be,W,Fe,O,Ue,x,K,Ge,pe,ht="Constructs a PVT image processor.",Xe,k,ee,He,fe,ut="Preprocess an image or batch of images.",Ze,te,Ne,$,oe,Se,ge,_t=`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.`,De,he,vt=`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.`,Qe,C,ne,Ae,ue,bt='The <a href="/docs/transformers/main/en/model_doc/pvt#transformers.PvtForImageClassification">PvtForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Ye,L,Oe,R,We,se,ke,j,ae,Ke,_e,yt=`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.`,et,I,re,tt,ve,Tt='The <a href="/docs/transformers/main/en/model_doc/pvt#transformers.PvtModel">PvtModel</a> forward method, overrides the <code>__call__</code> special method.',ot,V,nt,q,Le,ie,Re,Te,Ve;return f=new ye({props:{title:"Pyramid Vision Transformer (PVT)",local:"pyramid-vision-transformer-pvt",headingTag:"h1"}}),B=new ye({props:{title:"Overview",local:"overview",headingTag:"h2"}}),A=new ye({props:{title:"PvtConfig",local:"transformers.PvtConfig",headingTag:"h2"}}),Y=new de({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 st({props:{anchor:"transformers.PvtConfig.example",$$slots:{default:[jt]},$$scope:{ctx:M}}}),O=new ye({props:{title:"PvtImageProcessor",local:"transformers.PvtImageProcessor",headingTag:"h2"}}),K=new de({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"}}),ee=new de({props:{name:"preprocess",anchor:"transformers.PvtImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), list['PIL.Image.Image'], list[numpy.ndarray], list['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"}}),te=new ye({props:{title:"PvtForImageClassification",local:"transformers.PvtForImageClassification",headingTag:"h2"}}),oe=new de({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"}}),ne=new de({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/vilt#transformers.ViltFeatureExtractor.__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 Pt({props:{$$slots:{default:[zt]},$$scope:{ctx:M}}}),R=new st({props:{anchor:"transformers.PvtForImageClassification.forward.example",$$slots:{default:[Jt]},$$scope:{ctx:M}}}),se=new ye({props:{title:"PvtModel",local:"transformers.PvtModel",headingTag:"h2"}}),ae=new de({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"}}),re=new de({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/vilt#transformers.ViltFeatureExtractor.__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 Pt({props:{$$slots:{default:[Ft]},$$scope:{ctx:M}}}),q=new st({props:{anchor:"transformers.PvtModel.forward.example",$$slots:{default:[Ut]},$$scope:{ctx:M}}}),ie=new xt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/pvt.md"}}),{c(){n=c("meta"),P=r(),l=c("p"),d=r(),g(f.$$.fragment),s=r(),T=c("div"),T.innerHTML=rt,we=r(),g(B.$$.fragment),$e=r(),G=c("p"),G.innerHTML=it,Me=r(),X=c("p"),X.textContent=lt,Ce=r(),H=c("p"),H.innerHTML=dt,Ie=r(),S=c("p"),S.innerHTML=ct,xe=r(),D=c("ul"),D.innerHTML=mt,je=r(),Q=c("table"),Q.innerHTML=pt,ze=r(),g(A.$$.fragment),Je=r(),w=c("div"),g(Y.$$.fragment),qe=r(),ce=c("p"),ce.innerHTML=ft,Ee=r(),me=c("p"),me.innerHTML=gt,Be=r(),g(W.$$.fragment),Fe=r(),g(O.$$.fragment),Ue=r(),x=c("div"),g(K.$$.fragment),Ge=r(),pe=c("p"),pe.textContent=ht,Xe=r(),k=c("div"),g(ee.$$.fragment),He=r(),fe=c("p"),fe.textContent=ut,Ze=r(),g(te.$$.fragment),Ne=r(),$=c("div"),g(oe.$$.fragment),Se=r(),ge=c("p"),ge.textContent=_t,De=r(),he=c("p"),he.innerHTML=vt,Qe=r(),C=c("div"),g(ne.$$.fragment),Ae=r(),ue=c("p"),ue.innerHTML=bt,Ye=r(),g(L.$$.fragment),Oe=r(),g(R.$$.fragment),We=r(),g(se.$$.fragment),ke=r(),j=c("div"),g(ae.$$.fragment),Ke=r(),_e=c("p"),_e.innerHTML=yt,et=r(),I=c("div"),g(re.$$.fragment),tt=r(),ve=c("p"),ve.innerHTML=Tt,ot=r(),g(V.$$.fragment),nt=r(),g(q.$$.fragment),Le=r(),g(ie.$$.fragment),Re=r(),Te=c("p"),this.h()},l(e){const t=It("svelte-u9bgzb",document.head);n=m(t,"META",{name:!0,content:!0}),t.forEach(o),P=i(e),l=m(e,"P",{}),N(l).forEach(o),d=i(e),h(f.$$.fragment,e),s=i(e),T=m(e,"DIV",{class:!0,"data-svelte-h":!0}),y(T)!=="svelte-13t8s2t"&&(T.innerHTML=rt),we=i(e),h(B.$$.fragment,e),$e=i(e),G=m(e,"P",{"data-svelte-h":!0}),y(G)!=="svelte-8q4zoa"&&(G.innerHTML=it),Me=i(e),X=m(e,"P",{"data-svelte-h":!0}),y(X)!=="svelte-vfdo9a"&&(X.textContent=lt),Ce=i(e),H=m(e,"P",{"data-svelte-h":!0}),y(H)!=="svelte-1m8halq"&&(H.innerHTML=dt),Ie=i(e),S=m(e,"P",{"data-svelte-h":!0}),y(S)!=="svelte-1x24ibz"&&(S.innerHTML=ct),xe=i(e),D=m(e,"UL",{"data-svelte-h":!0}),y(D)!=="svelte-xv3sau"&&(D.innerHTML=mt),je=i(e),Q=m(e,"TABLE",{"data-svelte-h":!0}),y(Q)!=="svelte-l7vv2w"&&(Q.innerHTML=pt),ze=i(e),h(A.$$.fragment,e),Je=i(e),w=m(e,"DIV",{class:!0});var z=N(w);h(Y.$$.fragment,z),qe=i(z),ce=m(z,"P",{"data-svelte-h":!0}),y(ce)!=="svelte-f8n6b1"&&(ce.innerHTML=ft),Ee=i(z),me=m(z,"P",{"data-svelte-h":!0}),y(me)!=="svelte-o55m63"&&(me.innerHTML=gt),Be=i(z),h(W.$$.fragment,z),z.forEach(o),Fe=i(e),h(O.$$.fragment,e),Ue=i(e),x=m(e,"DIV",{class:!0});var Z=N(x);h(K.$$.fragment,Z),Ge=i(Z),pe=m(Z,"P",{"data-svelte-h":!0}),y(pe)!=="svelte-1h0qwwc"&&(pe.textContent=ht),Xe=i(Z),k=m(Z,"DIV",{class:!0});var le=N(k);h(ee.$$.fragment,le),He=i(le),fe=m(le,"P",{"data-svelte-h":!0}),y(fe)!=="svelte-1x3yxsa"&&(fe.textContent=ut),le.forEach(o),Z.forEach(o),Ze=i(e),h(te.$$.fragment,e),Ne=i(e),$=m(e,"DIV",{class:!0});var J=N($);h(oe.$$.fragment,J),Se=i(J),ge=m(J,"P",{"data-svelte-h":!0}),y(ge)!=="svelte-ztbq9b"&&(ge.textContent=_t),De=i(J),he=m(J,"P",{"data-svelte-h":!0}),y(he)!=="svelte-68lg8f"&&(he.innerHTML=vt),Qe=i(J),C=m(J,"DIV",{class:!0});var F=N(C);h(ne.$$.fragment,F),Ae=i(F),ue=m(F,"P",{"data-svelte-h":!0}),y(ue)!=="svelte-1fd5fwt"&&(ue.innerHTML=bt),Ye=i(F),h(L.$$.fragment,F),Oe=i(F),h(R.$$.fragment,F),F.forEach(o),J.forEach(o),We=i(e),h(se.$$.fragment,e),ke=i(e),j=m(e,"DIV",{class:!0});var be=N(j);h(ae.$$.fragment,be),Ke=i(be),_e=m(be,"P",{"data-svelte-h":!0}),y(_e)!=="svelte-aq69vq"&&(_e.innerHTML=yt),et=i(be),I=m(be,"DIV",{class:!0});var E=N(I);h(re.$$.fragment,E),tt=i(E),ve=m(E,"P",{"data-svelte-h":!0}),y(ve)!=="svelte-n3tiyf"&&(ve.innerHTML=Tt),ot=i(E),h(V.$$.fragment,E),nt=i(E),h(q.$$.fragment,E),E.forEach(o),be.forEach(o),Le=i(e),h(ie.$$.fragment,e),Re=i(e),Te=m(e,"P",{}),N(Te).forEach(o),this.h()},h(){U(n,"name","hf:doc:metadata"),U(n,"content",Nt),U(T,"class","flex flex-wrap space-x-1"),U(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(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){p(document.head,n),a(e,P,t),a(e,l,t),a(e,d,t),u(f,e,t),a(e,s,t),a(e,T,t),a(e,we,t),u(B,e,t),a(e,$e,t),a(e,G,t),a(e,Me,t),a(e,X,t),a(e,Ce,t),a(e,H,t),a(e,Ie,t),a(e,S,t),a(e,xe,t),a(e,D,t),a(e,je,t),a(e,Q,t),a(e,ze,t),u(A,e,t),a(e,Je,t),a(e,w,t),u(Y,w,null),p(w,qe),p(w,ce),p(w,Ee),p(w,me),p(w,Be),u(W,w,null),a(e,Fe,t),u(O,e,t),a(e,Ue,t),a(e,x,t),u(K,x,null),p(x,Ge),p(x,pe),p(x,Xe),p(x,k),u(ee,k,null),p(k,He),p(k,fe),a(e,Ze,t),u(te,e,t),a(e,Ne,t),a(e,$,t),u(oe,$,null),p($,Se),p($,ge),p($,De),p($,he),p($,Qe),p($,C),u(ne,C,null),p(C,Ae),p(C,ue),p(C,Ye),u(L,C,null),p(C,Oe),u(R,C,null),a(e,We,t),u(se,e,t),a(e,ke,t),a(e,j,t),u(ae,j,null),p(j,Ke),p(j,_e),p(j,et),p(j,I),u(re,I,null),p(I,tt),p(I,ve),p(I,ot),u(V,I,null),p(I,nt),u(q,I,null),a(e,Le,t),u(ie,e,t),a(e,Re,t),a(e,Te,t),Ve=!0},p(e,[t]){const z={};t&2&&(z.$$scope={dirty:t,ctx:e}),W.$set(z);const Z={};t&2&&(Z.$$scope={dirty:t,ctx:e}),L.$set(Z);const le={};t&2&&(le.$$scope={dirty:t,ctx:e}),R.$set(le);const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),V.$set(J);const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),q.$set(F)},i(e){Ve||(_(f.$$.fragment,e),_(B.$$.fragment,e),_(A.$$.fragment,e),_(Y.$$.fragment,e),_(W.$$.fragment,e),_(O.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(oe.$$.fragment,e),_(ne.$$.fragment,e),_(L.$$.fragment,e),_(R.$$.fragment,e),_(se.$$.fragment,e),_(ae.$$.fragment,e),_(re.$$.fragment,e),_(V.$$.fragment,e),_(q.$$.fragment,e),_(ie.$$.fragment,e),Ve=!0)},o(e){v(f.$$.fragment,e),v(B.$$.fragment,e),v(A.$$.fragment,e),v(Y.$$.fragment,e),v(W.$$.fragment,e),v(O.$$.fragment,e),v(K.$$.fragment,e),v(ee.$$.fragment,e),v(te.$$.fragment,e),v(oe.$$.fragment,e),v(ne.$$.fragment,e),v(L.$$.fragment,e),v(R.$$.fragment,e),v(se.$$.fragment,e),v(ae.$$.fragment,e),v(re.$$.fragment,e),v(V.$$.fragment,e),v(q.$$.fragment,e),v(ie.$$.fragment,e),Ve=!1},d(e){e&&(o(P),o(l),o(d),o(s),o(T),o(we),o($e),o(G),o(Me),o(X),o(Ce),o(H),o(Ie),o(S),o(xe),o(D),o(je),o(Q),o(ze),o(Je),o(w),o(Fe),o(Ue),o(x),o(Ze),o(Ne),o($),o(We),o(ke),o(j),o(Le),o(Re),o(Te)),o(n),b(f,e),b(B,e),b(A,e),b(Y),b(W),b(O,e),b(K),b(ee),b(te,e),b(oe),b(ne),b(L),b(R),b(se,e),b(ae),b(re),b(V),b(q),b(ie,e)}}}const Nt='{"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 Wt(M){return $t(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Gt extends Mt{constructor(n){super(),Ct(this,n,Wt,Zt,wt,{})}}export{Gt as component};
