import{s as bo,o as yo,n as He}from"../chunks/scheduler.9bc65507.js";import{S as wo,i as To,g as n,s as l,u as v,A as Po,h as a,f as t,c as d,j as f,v as _,y as g,k as m,o,a as c,w as b,d as y,t as w,x as T}from"../chunks/index.78c82d43.js";import{T as _o}from"../chunks/Tip.87d55b76.js";import{D as be}from"../chunks/Docstring.f3d04bd2.js";import{C as Rt}from"../chunks/CodeBlock.48618ec2.js";import{I as Le}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Et}from"../chunks/ExampleCodeBlock.872b014d.js";function Mo(I){let i,P="Example:",p,h,u;return h=new Rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFB2dE1vZGVsJTJDJTIwUHZ0Q29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFBWVCUyMFhyZW55YSUyRnB2dC10aW55LTIyNCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBQdnRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBYcmVueWElMkZwdnQtdGlueS0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFB2dE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PvtModel, PvtConfig

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){i=n("p"),i.textContent=P,p=l(),v(h.$$.fragment)},l(s){i=a(s,"P",{"data-svelte-h":!0}),g(i)!=="svelte-11lpom8"&&(i.textContent=P),p=d(s),_(h.$$.fragment,s)},m(s,M){c(s,i,M),c(s,p,M),b(h,s,M),u=!0},p:He,i(s){u||(y(h.$$.fragment,s),u=!0)},o(s){w(h.$$.fragment,s),u=!1},d(s){s&&(t(i),t(p)),T(h,s)}}}function $o(I){let i,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(){i=n("p"),i.innerHTML=P},l(p){i=a(p,"P",{"data-svelte-h":!0}),g(i)!=="svelte-fincs2"&&(i.innerHTML=P)},m(p,h){c(p,i,h)},p:He,d(p){p&&t(i)}}}function Co(I){let i,P="Example:",p,h,u;return h=new Rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFB2dEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlpldGF0ZWNoJTJGcHZ0LXRpbnktMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwUHZ0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyWmV0YXRlY2glMkZwdnQtdGlueS0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, PvtForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`}}),{c(){i=n("p"),i.textContent=P,p=l(),v(h.$$.fragment)},l(s){i=a(s,"P",{"data-svelte-h":!0}),g(i)!=="svelte-11lpom8"&&(i.textContent=P),p=d(s),_(h.$$.fragment,s)},m(s,M){c(s,i,M),c(s,p,M),b(h,s,M),u=!0},p:He,i(s){u||(y(h.$$.fragment,s),u=!0)},o(s){w(h.$$.fragment,s),u=!1},d(s){s&&(t(i),t(p)),T(h,s)}}}function Io(I){let i,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(){i=n("p"),i.innerHTML=P},l(p){i=a(p,"P",{"data-svelte-h":!0}),g(i)!=="svelte-fincs2"&&(i.innerHTML=P)},m(p,h){c(p,i,h)},p:He,d(p){p&&t(i)}}}function xo(I){let i,P="Example:",p,h,u;return h=new Rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFB2dE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJaZXRhdGVjaCUyRnB2dC10aW55LTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMFB2dE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJaZXRhdGVjaCUyRnB2dC10aW55LTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, PvtModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">50</span>, <span class="hljs-number">512</span>]`}}),{c(){i=n("p"),i.textContent=P,p=l(),v(h.$$.fragment)},l(s){i=a(s,"P",{"data-svelte-h":!0}),g(i)!=="svelte-11lpom8"&&(i.textContent=P),p=d(s),_(h.$$.fragment,s)},m(s,M){c(s,i,M),c(s,p,M),b(h,s,M),u=!0},p:He,i(s){u||(y(h.$$.fragment,s),u=!0)},o(s){w(h.$$.fragment,s),u=!1},d(s){s&&(t(i),t(p)),T(h,s)}}}function jo(I){let i,P,p,h,u,s,M,O,ut,ye,Vt="Pyramid Vision Transformer (PVT)",Xe,F,L,We,K,vt,we,qt="Overview",Qe,ee,Bt=`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.`,De,te,St="The abstract from the paper is the following:",Ye,oe,Gt=`<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>`,Oe,ne,At='This model was contributed by [Xrenya](&lt;<a href="https://huggingface.co/Xrenya" rel="nofollow">https://huggingface.co/Xrenya</a>). The original code can be found <a href="https://github.com/whai362/PVT" rel="nofollow">here</a>.',Ke,ae,Ht="<li>PVTv1 on ImageNet-1K</li>",et,se,Xt='<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>',tt,N,W,Ee,re,_t,Te,Qt="PvtConfig",ot,$,ie,bt,Pe,Dt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/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.`,yt,Me,Yt=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/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/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,wt,E,nt,U,R,Re,le,Tt,$e,Ot="PvtImageProcessor",at,z,de,Pt,Ce,Kt="Constructs a PVT image processor.",Mt,V,ce,$t,Ie,eo="Preprocess an image or batch of images.",st,J,q,Ve,me,Ct,xe,to="PvtForImageClassification",rt,C,pe,It,je,oo=`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.`,xt,ze,no=`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.`,jt,x,he,zt,ke,ao='The <a href="/docs/transformers/v4.33.3/en/model_doc/pvt#transformers.PvtForImageClassification">PvtForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',kt,B,Ft,S,it,Z,G,qe,fe,Nt,Fe,so="PvtModel",lt,k,ge,Ut,Ne,ro=`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.`,Jt,j,ue,Zt,Ue,io='The <a href="/docs/transformers/v4.33.3/en/model_doc/pvt#transformers.PvtModel">PvtModel</a> forward method, overrides the <code>__call__</code> special method.',Lt,A,Wt,H,dt,Be,ct;return O=new Le({}),K=new Le({}),re=new Le({}),ie=new be({props:{name:"class transformers.PvtConfig",anchor:"transformers.PvtConfig",parameters:[{name:"image_size",val:": int = 224"},{name:"num_channels",val:": int = 3"},{name:"num_encoder_blocks",val:": int = 4"},{name:"depths",val:": typing.List[int] = [2, 2, 2, 2]"},{name:"sequence_reduction_ratios",val:": typing.List[int] = [8, 4, 2, 1]"},{name:"hidden_sizes",val:": typing.List[int] = [64, 128, 320, 512]"},{name:"patch_sizes",val:": typing.List[int] = [4, 2, 2, 2]"},{name:"strides",val:": typing.List[int] = [4, 2, 2, 2]"},{name:"num_attention_heads",val:": typing.List[int] = [1, 2, 5, 8]"},{name:"mlp_ratios",val:": typing.List[int] = [8, 8, 4, 4]"},{name:"hidden_act",val:": typing.Mapping[str, typing.Callable] = 'gelu'"},{name:"hidden_dropout_prob",val:": float = 0.0"},{name:"attention_probs_dropout_prob",val:": float = 0.0"},{name:"initializer_range",val:": float = 0.02"},{name:"drop_path_rate",val:": float = 0.0"},{name:"layer_norm_eps",val:": float = 1e-06"},{name:"qkv_bias",val:": bool = True"},{name:"num_labels",val:": int = 1000"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PvtConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The input image size`,name:"image_size"},{anchor:"transformers.PvtConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.PvtConfig.num_encoder_blocks",description:`<strong>num_encoder_blocks</strong> (<code>[int]</code>, <em>optional</em>., defaults to 4) &#x2014;
The number of encoder blocks (i.e. stages in the Mix Transformer encoder).`,name:"num_encoder_blocks"},{anchor:"transformers.PvtConfig.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 2, 2, 2]</code>) &#x2014;
The number of layers in each encoder block.`,name:"depths"},{anchor:"transformers.PvtConfig.sequence_reduction_ratios",description:`<strong>sequence_reduction_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[8, 4, 2, 1]</code>) &#x2014;
Sequence reduction ratios in each encoder block.`,name:"sequence_reduction_ratios"},{anchor:"transformers.PvtConfig.hidden_sizes",description:`<strong>hidden_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[64, 128, 320, 512]</code>) &#x2014;
Dimension of each of the encoder blocks.`,name:"hidden_sizes"},{anchor:"transformers.PvtConfig.patch_sizes",description:`<strong>patch_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 2, 2, 2]</code>) &#x2014;
Patch size before each encoder block.`,name:"patch_sizes"},{anchor:"transformers.PvtConfig.strides",description:`<strong>strides</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 2, 2, 2]</code>) &#x2014;
Stride before each encoder block.`,name:"strides"},{anchor:"transformers.PvtConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 2, 5, 8]</code>) &#x2014;
Number of attention heads for each attention layer in each block of the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.PvtConfig.mlp_ratios",description:`<strong>mlp_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[8, 8, 4, 4]</code>) &#x2014;
Ratio of the size of the hidden layer compared to the size of the input layer of the Mix FFNs in the
encoder blocks.`,name:"mlp_ratios"},{anchor:"transformers.PvtConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.PvtConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.PvtConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.PvtConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.PvtConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for stochastic depth, used in the blocks of the Transformer encoder.`,name:"drop_path_rate"},{anchor:"transformers.PvtConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-6) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.PvtConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not a learnable bias should be added to the queries, keys and values.`,name:"qkv_bias"},{anchor:"transformers.PvtConfig.num_labels",description:`<strong>num_labels</strong> (&#x2018;int&#x2019;, <em>optional</em>, defaults to 1000) &#x2014;
The number of classes.`,name:"num_labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/pvt/configuration_pvt.py#L37"}}),E=new Et({props:{anchor:"transformers.PvtConfig.example",$$slots:{default:[Mo]},$$scope:{ctx:I}}}),le=new Le({}),de=new be({props:{name:"class transformers.PvtImageProcessor",anchor:"transformers.PvtImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PvtImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>(size[&quot;height&quot;], size[&quot;width&quot;])</code>. Can be overridden by the <code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.PvtImageProcessor.size",description:`<strong>size</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.PvtImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by the <code>resample</code> parameter in the
<code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.PvtImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.PvtImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter in the
<code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.PvtImageProcessor.do_normalize",description:"<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True) -- Whether to normalize the image. Can be overridden by the </code>do_normalize<code>parameter in the</code>preprocess`\nmethod.",name:"do_normalize"},{anchor:"transformers.PvtImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_DEFAULT_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.PvtImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_DEFAULT_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/pvt/image_processing_pvt.py#L41"}}),ce=new be({props:{name:"preprocess",anchor:"transformers.PvtImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension] = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.PvtImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. 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/v4.33.3/src/transformers/models/pvt/image_processing_pvt.py#L147"}}),me=new Le({}),pe=new be({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/v4.33.3/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/v4.33.3/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/v4.33.3/src/transformers/models/pvt/modeling_pvt.py#L593"}}),he=new be({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/v4.33.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.33.3/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__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/v4.33.3/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/v4.33.3/src/transformers/models/pvt/modeling_pvt.py#L608",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/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/v4.33.3/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:`
<p><a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),B=new _o({props:{$$slots:{default:[$o]},$$scope:{ctx:I}}}),S=new Et({props:{anchor:"transformers.PvtForImageClassification.forward.example",$$slots:{default:[Co]},$$scope:{ctx:I}}}),fe=new Le({}),ge=new be({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/v4.33.3/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/v4.33.3/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/v4.33.3/src/transformers/models/pvt/modeling_pvt.py#L528"}}),ue=new be({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/v4.33.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.33.3/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__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/v4.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/pvt/modeling_pvt.py#L547",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/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/v4.33.3/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:`
<p><a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),A=new _o({props:{$$slots:{default:[Io]},$$scope:{ctx:I}}}),H=new Et({props:{anchor:"transformers.PvtModel.forward.example",$$slots:{default:[xo]},$$scope:{ctx:I}}}),{c(){i=n("meta"),P=l(),p=n("p"),h=l(),u=n("h1"),s=n("a"),M=n("span"),v(O.$$.fragment),ut=l(),ye=n("span"),ye.textContent=Vt,Xe=l(),F=n("h2"),L=n("a"),We=n("span"),v(K.$$.fragment),vt=l(),we=n("span"),we.textContent=qt,Qe=l(),ee=n("p"),ee.innerHTML=Bt,De=l(),te=n("p"),te.textContent=St,Ye=l(),oe=n("p"),oe.innerHTML=Gt,Oe=l(),ne=n("p"),ne.innerHTML=At,Ke=l(),ae=n("ul"),ae.innerHTML=Ht,et=l(),se=n("table"),se.innerHTML=Xt,tt=l(),N=n("h2"),W=n("a"),Ee=n("span"),v(re.$$.fragment),_t=l(),Te=n("span"),Te.textContent=Qt,ot=l(),$=n("div"),v(ie.$$.fragment),bt=l(),Pe=n("p"),Pe.innerHTML=Dt,yt=l(),Me=n("p"),Me.innerHTML=Yt,wt=l(),v(E.$$.fragment),nt=l(),U=n("h2"),R=n("a"),Re=n("span"),v(le.$$.fragment),Tt=l(),$e=n("span"),$e.textContent=Ot,at=l(),z=n("div"),v(de.$$.fragment),Pt=l(),Ce=n("p"),Ce.textContent=Kt,Mt=l(),V=n("div"),v(ce.$$.fragment),$t=l(),Ie=n("p"),Ie.textContent=eo,st=l(),J=n("h2"),q=n("a"),Ve=n("span"),v(me.$$.fragment),Ct=l(),xe=n("span"),xe.textContent=to,rt=l(),C=n("div"),v(pe.$$.fragment),It=l(),je=n("p"),je.textContent=oo,xt=l(),ze=n("p"),ze.innerHTML=no,jt=l(),x=n("div"),v(he.$$.fragment),zt=l(),ke=n("p"),ke.innerHTML=ao,kt=l(),v(B.$$.fragment),Ft=l(),v(S.$$.fragment),it=l(),Z=n("h2"),G=n("a"),qe=n("span"),v(fe.$$.fragment),Nt=l(),Fe=n("span"),Fe.textContent=so,lt=l(),k=n("div"),v(ge.$$.fragment),Ut=l(),Ne=n("p"),Ne.innerHTML=ro,Jt=l(),j=n("div"),v(ue.$$.fragment),Zt=l(),Ue=n("p"),Ue.innerHTML=io,Lt=l(),v(A.$$.fragment),Wt=l(),v(H.$$.fragment),dt=l(),Be=n("p"),this.h()},l(e){const r=Po("svelte-1phssyn",document.head);i=a(r,"META",{name:!0,content:!0}),r.forEach(t),P=d(e),p=a(e,"P",{}),f(p).forEach(t),h=d(e),u=a(e,"H1",{class:!0});var ve=f(u);s=a(ve,"A",{id:!0,class:!0,href:!0});var Se=f(s);M=a(Se,"SPAN",{});var Ge=f(M);_(O.$$.fragment,Ge),Ge.forEach(t),Se.forEach(t),ut=d(ve),ye=a(ve,"SPAN",{"data-svelte-h":!0}),g(ye)!=="svelte-16ul8sz"&&(ye.textContent=Vt),ve.forEach(t),Xe=d(e),F=a(e,"H2",{class:!0});var _e=f(F);L=a(_e,"A",{id:!0,class:!0,href:!0});var Ae=f(L);We=a(Ae,"SPAN",{});var lo=f(We);_(K.$$.fragment,lo),lo.forEach(t),Ae.forEach(t),vt=d(_e),we=a(_e,"SPAN",{"data-svelte-h":!0}),g(we)!=="svelte-1jsw1pg"&&(we.textContent=qt),_e.forEach(t),Qe=d(e),ee=a(e,"P",{"data-svelte-h":!0}),g(ee)!=="svelte-8q4zoa"&&(ee.innerHTML=Bt),De=d(e),te=a(e,"P",{"data-svelte-h":!0}),g(te)!=="svelte-vfdo9a"&&(te.textContent=St),Ye=d(e),oe=a(e,"P",{"data-svelte-h":!0}),g(oe)!=="svelte-1m8halq"&&(oe.innerHTML=Gt),Oe=d(e),ne=a(e,"P",{"data-svelte-h":!0}),g(ne)!=="svelte-1cc1uif"&&(ne.innerHTML=At),Ke=d(e),ae=a(e,"UL",{"data-svelte-h":!0}),g(ae)!=="svelte-xv3sau"&&(ae.innerHTML=Ht),et=d(e),se=a(e,"TABLE",{"data-svelte-h":!0}),g(se)!=="svelte-l7vv2w"&&(se.innerHTML=Xt),tt=d(e),N=a(e,"H2",{class:!0});var mt=f(N);W=a(mt,"A",{id:!0,class:!0,href:!0});var co=f(W);Ee=a(co,"SPAN",{});var mo=f(Ee);_(re.$$.fragment,mo),mo.forEach(t),co.forEach(t),_t=d(mt),Te=a(mt,"SPAN",{"data-svelte-h":!0}),g(Te)!=="svelte-1vwsr83"&&(Te.textContent=Qt),mt.forEach(t),ot=d(e),$=a(e,"DIV",{class:!0});var X=f($);_(ie.$$.fragment,X),bt=d(X),Pe=a(X,"P",{"data-svelte-h":!0}),g(Pe)!=="svelte-wj124h"&&(Pe.innerHTML=Dt),yt=d(X),Me=a(X,"P",{"data-svelte-h":!0}),g(Me)!=="svelte-cfh5wl"&&(Me.innerHTML=Yt),wt=d(X),_(E.$$.fragment,X),X.forEach(t),nt=d(e),U=a(e,"H2",{class:!0});var pt=f(U);R=a(pt,"A",{id:!0,class:!0,href:!0});var po=f(R);Re=a(po,"SPAN",{});var ho=f(Re);_(le.$$.fragment,ho),ho.forEach(t),po.forEach(t),Tt=d(pt),$e=a(pt,"SPAN",{"data-svelte-h":!0}),g($e)!=="svelte-dr52be"&&($e.textContent=Ot),pt.forEach(t),at=d(e),z=a(e,"DIV",{class:!0});var Je=f(z);_(de.$$.fragment,Je),Pt=d(Je),Ce=a(Je,"P",{"data-svelte-h":!0}),g(Ce)!=="svelte-1h0qwwc"&&(Ce.textContent=Kt),Mt=d(Je),V=a(Je,"DIV",{class:!0});var ht=f(V);_(ce.$$.fragment,ht),$t=d(ht),Ie=a(ht,"P",{"data-svelte-h":!0}),g(Ie)!=="svelte-1x3yxsa"&&(Ie.textContent=eo),ht.forEach(t),Je.forEach(t),st=d(e),J=a(e,"H2",{class:!0});var ft=f(J);q=a(ft,"A",{id:!0,class:!0,href:!0});var fo=f(q);Ve=a(fo,"SPAN",{});var go=f(Ve);_(me.$$.fragment,go),go.forEach(t),fo.forEach(t),Ct=d(ft),xe=a(ft,"SPAN",{"data-svelte-h":!0}),g(xe)!=="svelte-gp9mcl"&&(xe.textContent=to),ft.forEach(t),rt=d(e),C=a(e,"DIV",{class:!0});var Q=f(C);_(pe.$$.fragment,Q),It=d(Q),je=a(Q,"P",{"data-svelte-h":!0}),g(je)!=="svelte-ztbq9b"&&(je.textContent=oo),xt=d(Q),ze=a(Q,"P",{"data-svelte-h":!0}),g(ze)!=="svelte-68lg8f"&&(ze.innerHTML=no),jt=d(Q),x=a(Q,"DIV",{class:!0});var D=f(x);_(he.$$.fragment,D),zt=d(D),ke=a(D,"P",{"data-svelte-h":!0}),g(ke)!=="svelte-6tsb9r"&&(ke.innerHTML=ao),kt=d(D),_(B.$$.fragment,D),Ft=d(D),_(S.$$.fragment,D),D.forEach(t),Q.forEach(t),it=d(e),Z=a(e,"H2",{class:!0});var gt=f(Z);G=a(gt,"A",{id:!0,class:!0,href:!0});var uo=f(G);qe=a(uo,"SPAN",{});var vo=f(qe);_(fe.$$.fragment,vo),vo.forEach(t),uo.forEach(t),Nt=d(gt),Fe=a(gt,"SPAN",{"data-svelte-h":!0}),g(Fe)!=="svelte-whd53k"&&(Fe.textContent=so),gt.forEach(t),lt=d(e),k=a(e,"DIV",{class:!0});var Ze=f(k);_(ge.$$.fragment,Ze),Ut=d(Ze),Ne=a(Ze,"P",{"data-svelte-h":!0}),g(Ne)!=="svelte-aq69vq"&&(Ne.innerHTML=ro),Jt=d(Ze),j=a(Ze,"DIV",{class:!0});var Y=f(j);_(ue.$$.fragment,Y),Zt=d(Y),Ue=a(Y,"P",{"data-svelte-h":!0}),g(Ue)!=="svelte-1pjyom9"&&(Ue.innerHTML=io),Lt=d(Y),_(A.$$.fragment,Y),Wt=d(Y),_(H.$$.fragment,Y),Y.forEach(t),Ze.forEach(t),dt=d(e),Be=a(e,"P",{}),f(Be).forEach(t),this.h()},h(){m(i,"name","hf:doc:metadata"),m(i,"content",JSON.stringify(zo)),m(s,"id","pyramid-vision-transformer-pvt"),m(s,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(s,"href","#pyramid-vision-transformer-pvt"),m(u,"class","relative group"),m(L,"id","overview"),m(L,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(L,"href","#overview"),m(F,"class","relative group"),m(W,"id","transformers.PvtConfig"),m(W,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(W,"href","#transformers.PvtConfig"),m(N,"class","relative group"),m($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(R,"id","transformers.PvtImageProcessor"),m(R,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(R,"href","#transformers.PvtImageProcessor"),m(U,"class","relative group"),m(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(q,"id","transformers.PvtForImageClassification"),m(q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(q,"href","#transformers.PvtForImageClassification"),m(J,"class","relative group"),m(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(G,"id","transformers.PvtModel"),m(G,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(G,"href","#transformers.PvtModel"),m(Z,"class","relative group"),m(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(k,"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,r){o(document.head,i),c(e,P,r),c(e,p,r),c(e,h,r),c(e,u,r),o(u,s),o(s,M),b(O,M,null),o(u,ut),o(u,ye),c(e,Xe,r),c(e,F,r),o(F,L),o(L,We),b(K,We,null),o(F,vt),o(F,we),c(e,Qe,r),c(e,ee,r),c(e,De,r),c(e,te,r),c(e,Ye,r),c(e,oe,r),c(e,Oe,r),c(e,ne,r),c(e,Ke,r),c(e,ae,r),c(e,et,r),c(e,se,r),c(e,tt,r),c(e,N,r),o(N,W),o(W,Ee),b(re,Ee,null),o(N,_t),o(N,Te),c(e,ot,r),c(e,$,r),b(ie,$,null),o($,bt),o($,Pe),o($,yt),o($,Me),o($,wt),b(E,$,null),c(e,nt,r),c(e,U,r),o(U,R),o(R,Re),b(le,Re,null),o(U,Tt),o(U,$e),c(e,at,r),c(e,z,r),b(de,z,null),o(z,Pt),o(z,Ce),o(z,Mt),o(z,V),b(ce,V,null),o(V,$t),o(V,Ie),c(e,st,r),c(e,J,r),o(J,q),o(q,Ve),b(me,Ve,null),o(J,Ct),o(J,xe),c(e,rt,r),c(e,C,r),b(pe,C,null),o(C,It),o(C,je),o(C,xt),o(C,ze),o(C,jt),o(C,x),b(he,x,null),o(x,zt),o(x,ke),o(x,kt),b(B,x,null),o(x,Ft),b(S,x,null),c(e,it,r),c(e,Z,r),o(Z,G),o(G,qe),b(fe,qe,null),o(Z,Nt),o(Z,Fe),c(e,lt,r),c(e,k,r),b(ge,k,null),o(k,Ut),o(k,Ne),o(k,Jt),o(k,j),b(ue,j,null),o(j,Zt),o(j,Ue),o(j,Lt),b(A,j,null),o(j,Wt),b(H,j,null),c(e,dt,r),c(e,Be,r),ct=!0},p(e,[r]){const ve={};r&2&&(ve.$$scope={dirty:r,ctx:e}),E.$set(ve);const Se={};r&2&&(Se.$$scope={dirty:r,ctx:e}),B.$set(Se);const Ge={};r&2&&(Ge.$$scope={dirty:r,ctx:e}),S.$set(Ge);const _e={};r&2&&(_e.$$scope={dirty:r,ctx:e}),A.$set(_e);const Ae={};r&2&&(Ae.$$scope={dirty:r,ctx:e}),H.$set(Ae)},i(e){ct||(y(O.$$.fragment,e),y(K.$$.fragment,e),y(re.$$.fragment,e),y(ie.$$.fragment,e),y(E.$$.fragment,e),y(le.$$.fragment,e),y(de.$$.fragment,e),y(ce.$$.fragment,e),y(me.$$.fragment,e),y(pe.$$.fragment,e),y(he.$$.fragment,e),y(B.$$.fragment,e),y(S.$$.fragment,e),y(fe.$$.fragment,e),y(ge.$$.fragment,e),y(ue.$$.fragment,e),y(A.$$.fragment,e),y(H.$$.fragment,e),ct=!0)},o(e){w(O.$$.fragment,e),w(K.$$.fragment,e),w(re.$$.fragment,e),w(ie.$$.fragment,e),w(E.$$.fragment,e),w(le.$$.fragment,e),w(de.$$.fragment,e),w(ce.$$.fragment,e),w(me.$$.fragment,e),w(pe.$$.fragment,e),w(he.$$.fragment,e),w(B.$$.fragment,e),w(S.$$.fragment,e),w(fe.$$.fragment,e),w(ge.$$.fragment,e),w(ue.$$.fragment,e),w(A.$$.fragment,e),w(H.$$.fragment,e),ct=!1},d(e){e&&(t(P),t(p),t(h),t(u),t(Xe),t(F),t(Qe),t(ee),t(De),t(te),t(Ye),t(oe),t(Oe),t(ne),t(Ke),t(ae),t(et),t(se),t(tt),t(N),t(ot),t($),t(nt),t(U),t(at),t(z),t(st),t(J),t(rt),t(C),t(it),t(Z),t(lt),t(k),t(dt),t(Be)),t(i),T(O),T(K),T(re),T(ie),T(E),T(le),T(de),T(ce),T(me),T(pe),T(he),T(B),T(S),T(fe),T(ge),T(ue),T(A),T(H)}}}const zo={local:"pyramid-vision-transformer-pvt",sections:[{local:"overview",title:"Overview"},{local:"transformers.PvtConfig",title:"PvtConfig"},{local:"transformers.PvtImageProcessor",title:"PvtImageProcessor"},{local:"transformers.PvtForImageClassification",title:"PvtForImageClassification"},{local:"transformers.PvtModel",title:"PvtModel"}],title:"Pyramid Vision Transformer (PVT)"};function ko(I){return yo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Eo extends wo{constructor(i){super(),To(this,i,ko,jo,bo,{})}}export{Eo as component};
