import{s as vt,o as bt,n as ye}from"../chunks/scheduler.9bc65507.js";import{S as yt,i as Tt,g as m,s,r as g,A as wt,h as p,f as a,c as r,j as Z,u as h,x as y,k as N,y as c,a as i,v as u,d as _,t as v,w as b}from"../chunks/index.707bf1b6.js";import{T as _t}from"../chunks/Tip.c2ecdbf4.js";import{D as ie}from"../chunks/Docstring.17db21ae.js";import{C as tt}from"../chunks/CodeBlock.54a9f38d.js";import{E as et}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as ve}from"../chunks/Heading.342b1fa6.js";function Pt(M){let o,T="Example:",l,d,f;return d=new tt({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(){o=m("p"),o.textContent=T,l=s(),g(d.$$.fragment)},l(n){o=p(n,"P",{"data-svelte-h":!0}),y(o)!=="svelte-11lpom8"&&(o.textContent=T),l=r(n),h(d.$$.fragment,n)},m(n,w){i(n,o,w),i(n,l,w),u(d,n,w),f=!0},p:ye,i(n){f||(_(d.$$.fragment,n),f=!0)},o(n){v(d.$$.fragment,n),f=!1},d(n){n&&(a(o),a(l)),b(d,n)}}}function $t(M){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=m("p"),o.innerHTML=T},l(l){o=p(l,"P",{"data-svelte-h":!0}),y(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(l,d){i(l,o,d)},p:ye,d(l){l&&a(o)}}}function Mt(M){let o,T="Example:",l,d,f;return d=new tt({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`,wrap:!1}}),{c(){o=m("p"),o.textContent=T,l=s(),g(d.$$.fragment)},l(n){o=p(n,"P",{"data-svelte-h":!0}),y(o)!=="svelte-11lpom8"&&(o.textContent=T),l=r(n),h(d.$$.fragment,n)},m(n,w){i(n,o,w),i(n,l,w),u(d,n,w),f=!0},p:ye,i(n){f||(_(d.$$.fragment,n),f=!0)},o(n){v(d.$$.fragment,n),f=!1},d(n){n&&(a(o),a(l)),b(d,n)}}}function Ct(M){let o,T=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=m("p"),o.innerHTML=T},l(l){o=p(l,"P",{"data-svelte-h":!0}),y(o)!=="svelte-fincs2"&&(o.innerHTML=T)},m(l,d){i(l,o,d)},p:ye,d(l){l&&a(o)}}}function It(M){let o,T="Example:",l,d,f;return d=new tt({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>]`,wrap:!1}}),{c(){o=m("p"),o.textContent=T,l=s(),g(d.$$.fragment)},l(n){o=p(n,"P",{"data-svelte-h":!0}),y(o)!=="svelte-11lpom8"&&(o.textContent=T),l=r(n),h(d.$$.fragment,n)},m(n,w){i(n,o,w),i(n,l,w),u(d,n,w),f=!0},p:ye,i(n){f||(_(d.$$.fragment,n),f=!0)},o(n){v(d.$$.fragment,n),f=!1},d(n){n&&(a(o),a(l)),b(d,n)}}}function xt(M){let o,T,l,d,f,n,w,Te,E,ot=`The PVT model was proposed in
<a href="https://arxiv.org/abs/2102.12122" rel="nofollow">Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions</a>
by Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, Ling Shao. The PVT is a type of
vision transformer that utilizes a pyramid structure to make it an effective backbone for dense prediction tasks. Specifically
it allows for more fine-grained inputs (4 x 4 pixels per patch) to be used, while simultaneously shrinking the sequence length
of the Transformer as it deepens - reducing the computational cost. Additionally, a spatial-reduction attention (SRA) layer
is used to further reduce the resource consumption when learning high-resolution features.`,we,G,nt="The abstract from the paper is the following:",Pe,X,at=`<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>`,$e,S,st='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>.',Me,H,rt="<li>PVTv1 on ImageNet-1K</li>",Ce,Q,it='<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>',Ie,A,xe,P,D,ke,le,lt=`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.`,We,de,dt=`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.`,Re,L,je,Y,ze,x,O,Ve,ce,ct="Constructs a PVT image processor.",qe,k,K,Be,me,mt="Preprocess an image or batch of images.",Fe,ee,Ue,$,te,Ee,pe,pt=`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.`,Ge,fe,ft=`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.`,Xe,C,oe,Se,ge,gt='The <a href="/docs/transformers/main/en/model_doc/pvt#transformers.PvtForImageClassification">PvtForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',He,W,Qe,R,Je,ne,Ze,j,ae,Ae,he,ht=`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.`,De,I,se,Ye,ue,ut='The <a href="/docs/transformers/main/en/model_doc/pvt#transformers.PvtModel">PvtModel</a> forward method, overrides the <code>__call__</code> special method.',Oe,V,Ke,q,Ne,be,Le;return f=new ve({props:{title:"Pyramid Vision Transformer (PVT)",local:"pyramid-vision-transformer-pvt",headingTag:"h1"}}),w=new ve({props:{title:"Overview",local:"overview",headingTag:"h2"}}),A=new ve({props:{title:"PvtConfig",local:"transformers.PvtConfig",headingTag:"h2"}}),D=new ie({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#L37"}}),L=new et({props:{anchor:"transformers.PvtConfig.example",$$slots:{default:[Pt]},$$scope:{ctx:M}}}),Y=new ve({props:{title:"PvtImageProcessor",local:"transformers.PvtImageProcessor",headingTag:"h2"}}),O=new ie({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>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#L41"}}),K=new ie({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/main/src/transformers/models/pvt/image_processing_pvt.py#L147"}}),ee=new ve({props:{title:"PvtForImageClassification",local:"transformers.PvtForImageClassification",headingTag:"h2"}}),te=new ie({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#L589"}}),oe=new ie({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/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__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#L604",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>
`}}),W=new _t({props:{$$slots:{default:[$t]},$$scope:{ctx:M}}}),R=new et({props:{anchor:"transformers.PvtForImageClassification.forward.example",$$slots:{default:[Mt]},$$scope:{ctx:M}}}),ne=new ve({props:{title:"PvtModel",local:"transformers.PvtModel",headingTag:"h2"}}),ae=new ie({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#L524"}}),se=new ie({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/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__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#L543",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 _t({props:{$$slots:{default:[Ct]},$$scope:{ctx:M}}}),q=new et({props:{anchor:"transformers.PvtModel.forward.example",$$slots:{default:[It]},$$scope:{ctx:M}}}),{c(){o=m("meta"),T=s(),l=m("p"),d=s(),g(f.$$.fragment),n=s(),g(w.$$.fragment),Te=s(),E=m("p"),E.innerHTML=ot,we=s(),G=m("p"),G.textContent=nt,Pe=s(),X=m("p"),X.innerHTML=at,$e=s(),S=m("p"),S.innerHTML=st,Me=s(),H=m("ul"),H.innerHTML=rt,Ce=s(),Q=m("table"),Q.innerHTML=it,Ie=s(),g(A.$$.fragment),xe=s(),P=m("div"),g(D.$$.fragment),ke=s(),le=m("p"),le.innerHTML=lt,We=s(),de=m("p"),de.innerHTML=dt,Re=s(),g(L.$$.fragment),je=s(),g(Y.$$.fragment),ze=s(),x=m("div"),g(O.$$.fragment),Ve=s(),ce=m("p"),ce.textContent=ct,qe=s(),k=m("div"),g(K.$$.fragment),Be=s(),me=m("p"),me.textContent=mt,Fe=s(),g(ee.$$.fragment),Ue=s(),$=m("div"),g(te.$$.fragment),Ee=s(),pe=m("p"),pe.textContent=pt,Ge=s(),fe=m("p"),fe.innerHTML=ft,Xe=s(),C=m("div"),g(oe.$$.fragment),Se=s(),ge=m("p"),ge.innerHTML=gt,He=s(),g(W.$$.fragment),Qe=s(),g(R.$$.fragment),Je=s(),g(ne.$$.fragment),Ze=s(),j=m("div"),g(ae.$$.fragment),Ae=s(),he=m("p"),he.innerHTML=ht,De=s(),I=m("div"),g(se.$$.fragment),Ye=s(),ue=m("p"),ue.innerHTML=ut,Oe=s(),g(V.$$.fragment),Ke=s(),g(q.$$.fragment),Ne=s(),be=m("p"),this.h()},l(e){const t=wt("svelte-u9bgzb",document.head);o=p(t,"META",{name:!0,content:!0}),t.forEach(a),T=r(e),l=p(e,"P",{}),Z(l).forEach(a),d=r(e),h(f.$$.fragment,e),n=r(e),h(w.$$.fragment,e),Te=r(e),E=p(e,"P",{"data-svelte-h":!0}),y(E)!=="svelte-8q4zoa"&&(E.innerHTML=ot),we=r(e),G=p(e,"P",{"data-svelte-h":!0}),y(G)!=="svelte-vfdo9a"&&(G.textContent=nt),Pe=r(e),X=p(e,"P",{"data-svelte-h":!0}),y(X)!=="svelte-1m8halq"&&(X.innerHTML=at),$e=r(e),S=p(e,"P",{"data-svelte-h":!0}),y(S)!=="svelte-1cc1uif"&&(S.innerHTML=st),Me=r(e),H=p(e,"UL",{"data-svelte-h":!0}),y(H)!=="svelte-xv3sau"&&(H.innerHTML=rt),Ce=r(e),Q=p(e,"TABLE",{"data-svelte-h":!0}),y(Q)!=="svelte-l7vv2w"&&(Q.innerHTML=it),Ie=r(e),h(A.$$.fragment,e),xe=r(e),P=p(e,"DIV",{class:!0});var z=Z(P);h(D.$$.fragment,z),ke=r(z),le=p(z,"P",{"data-svelte-h":!0}),y(le)!=="svelte-f8n6b1"&&(le.innerHTML=lt),We=r(z),de=p(z,"P",{"data-svelte-h":!0}),y(de)!=="svelte-o55m63"&&(de.innerHTML=dt),Re=r(z),h(L.$$.fragment,z),z.forEach(a),je=r(e),h(Y.$$.fragment,e),ze=r(e),x=p(e,"DIV",{class:!0});var J=Z(x);h(O.$$.fragment,J),Ve=r(J),ce=p(J,"P",{"data-svelte-h":!0}),y(ce)!=="svelte-1h0qwwc"&&(ce.textContent=ct),qe=r(J),k=p(J,"DIV",{class:!0});var re=Z(k);h(K.$$.fragment,re),Be=r(re),me=p(re,"P",{"data-svelte-h":!0}),y(me)!=="svelte-1x3yxsa"&&(me.textContent=mt),re.forEach(a),J.forEach(a),Fe=r(e),h(ee.$$.fragment,e),Ue=r(e),$=p(e,"DIV",{class:!0});var F=Z($);h(te.$$.fragment,F),Ee=r(F),pe=p(F,"P",{"data-svelte-h":!0}),y(pe)!=="svelte-ztbq9b"&&(pe.textContent=pt),Ge=r(F),fe=p(F,"P",{"data-svelte-h":!0}),y(fe)!=="svelte-68lg8f"&&(fe.innerHTML=ft),Xe=r(F),C=p(F,"DIV",{class:!0});var U=Z(C);h(oe.$$.fragment,U),Se=r(U),ge=p(U,"P",{"data-svelte-h":!0}),y(ge)!=="svelte-1fd5fwt"&&(ge.innerHTML=gt),He=r(U),h(W.$$.fragment,U),Qe=r(U),h(R.$$.fragment,U),U.forEach(a),F.forEach(a),Je=r(e),h(ne.$$.fragment,e),Ze=r(e),j=p(e,"DIV",{class:!0});var _e=Z(j);h(ae.$$.fragment,_e),Ae=r(_e),he=p(_e,"P",{"data-svelte-h":!0}),y(he)!=="svelte-aq69vq"&&(he.innerHTML=ht),De=r(_e),I=p(_e,"DIV",{class:!0});var B=Z(I);h(se.$$.fragment,B),Ye=r(B),ue=p(B,"P",{"data-svelte-h":!0}),y(ue)!=="svelte-n3tiyf"&&(ue.innerHTML=ut),Oe=r(B),h(V.$$.fragment,B),Ke=r(B),h(q.$$.fragment,B),B.forEach(a),_e.forEach(a),Ne=r(e),be=p(e,"P",{}),Z(be).forEach(a),this.h()},h(){N(o,"name","hf:doc:metadata"),N(o,"content",jt),N(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){c(document.head,o),i(e,T,t),i(e,l,t),i(e,d,t),u(f,e,t),i(e,n,t),u(w,e,t),i(e,Te,t),i(e,E,t),i(e,we,t),i(e,G,t),i(e,Pe,t),i(e,X,t),i(e,$e,t),i(e,S,t),i(e,Me,t),i(e,H,t),i(e,Ce,t),i(e,Q,t),i(e,Ie,t),u(A,e,t),i(e,xe,t),i(e,P,t),u(D,P,null),c(P,ke),c(P,le),c(P,We),c(P,de),c(P,Re),u(L,P,null),i(e,je,t),u(Y,e,t),i(e,ze,t),i(e,x,t),u(O,x,null),c(x,Ve),c(x,ce),c(x,qe),c(x,k),u(K,k,null),c(k,Be),c(k,me),i(e,Fe,t),u(ee,e,t),i(e,Ue,t),i(e,$,t),u(te,$,null),c($,Ee),c($,pe),c($,Ge),c($,fe),c($,Xe),c($,C),u(oe,C,null),c(C,Se),c(C,ge),c(C,He),u(W,C,null),c(C,Qe),u(R,C,null),i(e,Je,t),u(ne,e,t),i(e,Ze,t),i(e,j,t),u(ae,j,null),c(j,Ae),c(j,he),c(j,De),c(j,I),u(se,I,null),c(I,Ye),c(I,ue),c(I,Oe),u(V,I,null),c(I,Ke),u(q,I,null),i(e,Ne,t),i(e,be,t),Le=!0},p(e,[t]){const z={};t&2&&(z.$$scope={dirty:t,ctx:e}),L.$set(z);const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),W.$set(J);const re={};t&2&&(re.$$scope={dirty:t,ctx:e}),R.$set(re);const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),V.$set(F);const U={};t&2&&(U.$$scope={dirty:t,ctx:e}),q.$set(U)},i(e){Le||(_(f.$$.fragment,e),_(w.$$.fragment,e),_(A.$$.fragment,e),_(D.$$.fragment,e),_(L.$$.fragment,e),_(Y.$$.fragment,e),_(O.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(oe.$$.fragment,e),_(W.$$.fragment,e),_(R.$$.fragment,e),_(ne.$$.fragment,e),_(ae.$$.fragment,e),_(se.$$.fragment,e),_(V.$$.fragment,e),_(q.$$.fragment,e),Le=!0)},o(e){v(f.$$.fragment,e),v(w.$$.fragment,e),v(A.$$.fragment,e),v(D.$$.fragment,e),v(L.$$.fragment,e),v(Y.$$.fragment,e),v(O.$$.fragment,e),v(K.$$.fragment,e),v(ee.$$.fragment,e),v(te.$$.fragment,e),v(oe.$$.fragment,e),v(W.$$.fragment,e),v(R.$$.fragment,e),v(ne.$$.fragment,e),v(ae.$$.fragment,e),v(se.$$.fragment,e),v(V.$$.fragment,e),v(q.$$.fragment,e),Le=!1},d(e){e&&(a(T),a(l),a(d),a(n),a(Te),a(E),a(we),a(G),a(Pe),a(X),a($e),a(S),a(Me),a(H),a(Ce),a(Q),a(Ie),a(xe),a(P),a(je),a(ze),a(x),a(Fe),a(Ue),a($),a(Je),a(Ze),a(j),a(Ne),a(be)),a(o),b(f,e),b(w,e),b(A,e),b(D),b(L),b(Y,e),b(O),b(K),b(ee,e),b(te),b(oe),b(W),b(R),b(ne,e),b(ae),b(se),b(V),b(q)}}}const jt='{"title":"Pyramid Vision Transformer (PVT)","local":"pyramid-vision-transformer-pvt","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"PvtConfig","local":"transformers.PvtConfig","sections":[],"depth":2},{"title":"PvtImageProcessor","local":"transformers.PvtImageProcessor","sections":[],"depth":2},{"title":"PvtForImageClassification","local":"transformers.PvtForImageClassification","sections":[],"depth":2},{"title":"PvtModel","local":"transformers.PvtModel","sections":[],"depth":2}],"depth":1}';function zt(M){return bt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Wt extends yt{constructor(o){super(),Tt(this,o,zt,xt,vt,{})}}export{Wt as component};
