import{s as Pt,f as Gt,o as Lt,n as Ve}from"../chunks/scheduler.25b97de1.js";import{S as Rt,i as Et,g as l,s as r,r as h,A as qt,h as d,f as n,c as i,j as ge,u,x as p,k as I,y as f,a as o,v as g,d as _,t as M,w as b}from"../chunks/index.d9030fc9.js";import{T as Ht}from"../chunks/Tip.baa67368.js";import{D as Ne}from"../chunks/Docstring.ffac8efa.js";import{C as nt}from"../chunks/CodeBlock.e6cd0d95.js";import{E as _t}from"../chunks/ExampleCodeBlock.22dfe688.js";import{P as Yt}from"../chunks/PipelineTag.5f100392.js";import{H as P,E as At}from"../chunks/EditOnGithub.91d95064.js";function Xt(N){let s,v="Example:",c,m,T;return m=new nt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpVE1TTk1vZGVsJTJDJTIwVmlUTVNOQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFZpVCUyME1TTiUyMHZpdC1tc24tYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBWaVRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjB2aXQtbXNuLWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFZpVE1TTk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ViTMSNModel, ViTMSNConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ViT MSN vit-msn-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ViTConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the vit-msn-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTMSNModel(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(){s=l("p"),s.textContent=v,c=r(),h(m.$$.fragment)},l(a){s=d(a,"P",{"data-svelte-h":!0}),p(s)!=="svelte-11lpom8"&&(s.textContent=v),c=i(a),u(m.$$.fragment,a)},m(a,w){o(a,s,w),o(a,c,w),g(m,a,w),T=!0},p:Ve,i(a){T||(_(m.$$.fragment,a),T=!0)},o(a){M(m.$$.fragment,a),T=!1},d(a){a&&(n(s),n(c)),b(m,a)}}}function Qt(N){let s,v=`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(){s=l("p"),s.innerHTML=v},l(c){s=d(c,"P",{"data-svelte-h":!0}),p(s)!=="svelte-fincs2"&&(s.innerHTML=v)},m(c,m){o(c,s,m)},p:Ve,d(c){c&&n(s)}}}function Dt(N){let s,v="Examples:",c,m,T;return m=new nt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpVE1TTk1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGdml0LW1zbi1zbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyMFZpVE1TTk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnZpdC1tc24tc21hbGwlMjIpJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ViTMSNModel
<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> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/vit-msn-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTMSNModel.from_pretrained(<span class="hljs-string">&quot;facebook/vit-msn-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=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`,wrap:!1}}),{c(){s=l("p"),s.textContent=v,c=r(),h(m.$$.fragment)},l(a){s=d(a,"P",{"data-svelte-h":!0}),p(s)!=="svelte-kvfsh7"&&(s.textContent=v),c=i(a),u(m.$$.fragment,a)},m(a,w){o(a,s,w),o(a,c,w),g(m,a,w),T=!0},p:Ve,i(a){T||(_(m.$$.fragment,a),T=!0)},o(a){M(m.$$.fragment,a),T=!1},d(a){a&&(n(s),n(c)),b(m,a)}}}function Ot(N){let s,v=`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(){s=l("p"),s.innerHTML=v},l(c){s=d(c,"P",{"data-svelte-h":!0}),p(s)!=="svelte-fincs2"&&(s.innerHTML=v)},m(c,m){o(c,s,m)},p:Ve,d(c){c&&n(s)}}}function Kt(N){let s,v="Examples:",c,m,T;return m=new nt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpVE1TTkZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdG9yY2gubWFudWFsX3NlZWQoMiklMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnZpdC1tc24tc21hbGwlMjIpJTBBbW9kZWwlMjAlM0QlMjBWaVRNU05Gb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnZpdC1tc24tc21hbGwlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ViTMSNForImageClassification
<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> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>torch.manual_seed(<span class="hljs-number">2</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/vit-msn-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTMSNForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/vit-msn-small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=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])
tusker`,wrap:!1}}),{c(){s=l("p"),s.textContent=v,c=r(),h(m.$$.fragment)},l(a){s=d(a,"P",{"data-svelte-h":!0}),p(s)!=="svelte-kvfsh7"&&(s.textContent=v),c=i(a),u(m.$$.fragment,a)},m(a,w){o(a,s,w),o(a,c,w),g(m,a,w),T=!0},p:Ve,i(a){T||(_(m.$$.fragment,a),T=!0)},o(a){M(m.$$.fragment,a),T=!1},d(a){a&&(n(s),n(c)),b(m,a)}}}function en(N){let s,v,c,m,T,a,w,Ce,G,Mt=`The ViTMSN model was proposed in <a href="https://arxiv.org/abs/2204.07141" rel="nofollow">Masked Siamese Networks for Label-Efficient Learning</a> by Mahmoud Assran, Mathilde Caron, Ishan Misra, Piotr Bojanowski, Florian Bordes,
Pascal Vincent, Armand Joulin, Michael Rabbat, Nicolas Ballas. The paper presents a joint-embedding architecture to match the prototypes
of masked patches with that of the unmasked patches. With this setup, their method yields excellent performance in the low-shot and extreme low-shot
regimes.`,Se,L,bt="The abstract from the paper is the following:",je,R,Tt=`<em>We propose Masked Siamese Networks (MSN), a self-supervised learning framework for learning image representations. Our
approach matches the representation of an image view containing randomly masked patches to the representation of the original
unmasked image. This self-supervised pre-training strategy is particularly scalable when applied to Vision Transformers since only the
unmasked patches are processed by the network. As a result, MSNs improve the scalability of joint-embedding architectures,
while producing representations of a high semantic level that perform competitively on low-shot image classification. For instance,
on ImageNet-1K, with only 5,000 annotated images, our base MSN model achieves 72.4% top-1 accuracy,
and with 1% of ImageNet-1K labels, we achieve 75.7% top-1 accuracy, setting a new state-of-the-art for self-supervised learning on this benchmark.</em>`,xe,Z,vt,ke,E,wt='MSN architecture. Taken from the <a href="https://arxiv.org/abs/2204.07141">original paper.</a>',Je,q,yt='This model was contributed by <a href="https://huggingface.co/sayakpaul" rel="nofollow">sayakpaul</a>. The original code can be found <a href="https://github.com/facebookresearch/msn" rel="nofollow">here</a>.',Ie,Y,Ue,A,$t=`<li>MSN (masked siamese networks) is a method for self-supervised pre-training of Vision Transformers (ViTs). The pre-training
objective is to match the prototypes assigned to the unmasked views of the images to that of the masked views of the same images.</li> <li>The authors have only released pre-trained weights of the backbone (ImageNet-1k pre-training). So, to use that on your own image classification dataset,
use the <a href="/docs/transformers/pr_29969/en/model_doc/vit_msn#transformers.ViTMSNForImageClassification">ViTMSNForImageClassification</a> class which is initialized from <a href="/docs/transformers/pr_29969/en/model_doc/vit_msn#transformers.ViTMSNModel">ViTMSNModel</a>. Follow
<a href="https://github.com/huggingface/notebooks/blob/main/examples/image_classification.ipynb" rel="nofollow">this notebook</a> for a detailed tutorial on fine-tuning.</li> <li>MSN is particularly useful in the low-shot and extreme low-shot regimes. Notably, it achieves 75.7% top-1 accuracy with only 1% of ImageNet-1K
labels when fine-tuned.</li>`,Ze,X,Fe,Q,Nt=`PyTorch includes a native scaled dot-product attention (SDPA) operator as part of <code>torch.nn.functional</code>. This function
encompasses several implementations that can be applied depending on the inputs and the hardware in use. See the
<a href="https://pytorch.org/docs/stable/generated/torch.nn.functional.scaled_dot_product_attention.html" rel="nofollow">official documentation</a>
or the <a href="https://huggingface.co/docs/transformers/main/en/perf_infer_gpu_one#pytorch-scaled-dot-product-attention" rel="nofollow">GPU Inference</a>
page for more information.`,We,D,Vt=`SDPA is used by default for <code>torch&gt;=2.1.1</code> when an implementation is available, but you may also set
<code>attn_implementation=&quot;sdpa&quot;</code> in <code>from_pretrained()</code> to explicitly request SDPA to be used.`,ze,O,Be,K,Ct="For the best speedups, we recommend loading the model in half-precision (e.g. <code>torch.float16</code> or <code>torch.bfloat16</code>).",He,ee,St="On a local benchmark (A100-40GB, PyTorch 2.3.0, OS Ubuntu 22.04) with <code>float32</code> and <code>facebook/vit-msn-base</code> model, we saw the following speedups during inference.",Pe,te,jt="<thead><tr><th>Batch size</th> <th>Average inference time (ms), eager mode</th> <th>Average inference time (ms), sdpa model</th> <th>Speed up, Sdpa / Eager (x)</th></tr></thead> <tbody><tr><td>1</td> <td>7</td> <td>6</td> <td>1.17</td></tr> <tr><td>2</td> <td>8</td> <td>6</td> <td>1.33</td></tr> <tr><td>4</td> <td>8</td> <td>6</td> <td>1.33</td></tr> <tr><td>8</td> <td>8</td> <td>6</td> <td>1.33</td></tr></tbody>",Ge,ne,Le,oe,xt="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ViT MSN.",Re,se,Ee,ae,kt='<li><a href="/docs/transformers/pr_29969/en/model_doc/vit_msn#transformers.ViTMSNForImageClassification">ViTMSNForImageClassification</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification" rel="nofollow">example script</a> and <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb" rel="nofollow">notebook</a>.</li> <li>See also: <a href="../tasks/image_classification">Image classification task guide</a></li>',qe,re,Jt="If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",Ye,ie,Ae,y,le,ot,_e,It=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_29969/en/model_doc/vit_msn#transformers.ViTMSNModel">ViTMSNModel</a>. It is used to instantiate an ViT
MSN 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 ViT
<a href="https://huggingface.co/facebook/vit_msn_base" rel="nofollow">facebook/vit_msn_base</a> architecture.`,st,Me,Ut=`Configuration objects inherit from <a href="/docs/transformers/pr_29969/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/pr_29969/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,at,F,Xe,de,Qe,S,ce,rt,be,Zt=`The bare ViTMSN Model 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> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,it,V,me,lt,Te,Ft='The <a href="/docs/transformers/pr_29969/en/model_doc/vit_msn#transformers.ViTMSNModel">ViTMSNModel</a> forward method, overrides the <code>__call__</code> special method.',dt,W,ct,z,De,pe,Oe,$,fe,mt,ve,Wt="ViTMSN Model with an image classification head on top e.g. for ImageNet.",pt,we,zt=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,ft,C,he,ht,ye,Bt='The <a href="/docs/transformers/pr_29969/en/model_doc/vit_msn#transformers.ViTMSNForImageClassification">ViTMSNForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',ut,B,gt,H,Ke,ue,et,$e,tt;return T=new P({props:{title:"ViTMSN",local:"vitmsn",headingTag:"h1"}}),w=new P({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Y=new P({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),X=new P({props:{title:"Using Scaled Dot Product Attention (SDPA)",local:"using-scaled-dot-product-attention-sdpa",headingTag:"h3"}}),O=new nt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpVE1TTkZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFtb2RlbCUyMCUzRCUyMFZpVE1TTkZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGdml0LW1zbi1iYXNlJTIyJTJDJTIwYXR0bl9pbXBsZW1lbnRhdGlvbiUzRCUyMnNkcGElMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBLi4u",highlighted:`from transformers import ViTMSNForImageClassification
model = <span class="hljs-module-access"><span class="hljs-module"><span class="hljs-identifier">ViTMSNForImageClassification</span>.</span></span>from<span class="hljs-constructor">_pretrained(<span class="hljs-string">&quot;facebook/vit-msn-base&quot;</span>, <span class="hljs-params">attn_implementation</span>=<span class="hljs-string">&quot;sdpa&quot;</span>, <span class="hljs-params">torch_dtype</span>=<span class="hljs-params">torch</span>.<span class="hljs-params">float16</span>)</span>
...`,wrap:!1}}),ne=new P({props:{title:"Resources",local:"resources",headingTag:"h2"}}),se=new Yt({props:{pipeline:"image-classification"}}),ie=new P({props:{title:"ViTMSNConfig",local:"transformers.ViTMSNConfig",headingTag:"h2"}}),le=new Ne({props:{name:"class transformers.ViTMSNConfig",anchor:"transformers.ViTMSNConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"qkv_bias",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ViTMSNConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.ViTMSNConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.ViTMSNConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.ViTMSNConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.ViTMSNConfig.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.ViTMSNConfig.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.ViTMSNConfig.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.ViTMSNConfig.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.ViTMSNConfig.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.ViTMSNConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.ViTMSNConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.ViTMSNConfig.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.ViTMSNConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/vit_msn/configuration_vit_msn.py#L24"}}),F=new _t({props:{anchor:"transformers.ViTMSNConfig.example",$$slots:{default:[Xt]},$$scope:{ctx:N}}}),de=new P({props:{title:"ViTMSNModel",local:"transformers.ViTMSNModel",headingTag:"h2"}}),ce=new Ne({props:{name:"class transformers.ViTMSNModel",anchor:"transformers.ViTMSNModel",parameters:[{name:"config",val:": ViTMSNConfig"},{name:"use_mask_token",val:": bool = False"}],parametersDescription:[{anchor:"transformers.ViTMSNModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_29969/en/model_doc/vit_msn#transformers.ViTMSNConfig">ViTMSNConfig</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/pr_29969/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/vr_29969/src/transformers/models/vit_msn/modeling_vit_msn.py#L530"}}),me=new Ne({props:{name:"forward",anchor:"transformers.ViTMSNModel.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"bool_masked_pos",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"interpolate_pos_encoding",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ViTMSNModel.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/pr_29969/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_29969/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ViTMSNModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ViTMSNModel.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.ViTMSNModel.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.ViTMSNModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.ViTMSNModel.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/pr_29969/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ViTMSNModel.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, num_patches)</code>, <em>optional</em>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0).`,name:"bool_masked_pos"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/vit_msn/modeling_vit_msn.py#L558",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_29969/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/pr_29969/en/model_doc/vit_msn#transformers.ViTMSNConfig"
>ViTMSNConfig</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/pr_29969/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),W=new Ht({props:{$$slots:{default:[Qt]},$$scope:{ctx:N}}}),z=new _t({props:{anchor:"transformers.ViTMSNModel.forward.example",$$slots:{default:[Dt]},$$scope:{ctx:N}}}),pe=new P({props:{title:"ViTMSNForImageClassification",local:"transformers.ViTMSNForImageClassification",headingTag:"h2"}}),fe=new Ne({props:{name:"class transformers.ViTMSNForImageClassification",anchor:"transformers.ViTMSNForImageClassification",parameters:[{name:"config",val:": ViTMSNConfig"}],parametersDescription:[{anchor:"transformers.ViTMSNForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_29969/en/model_doc/vit_msn#transformers.ViTMSNConfig">ViTMSNConfig</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/pr_29969/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/vr_29969/src/transformers/models/vit_msn/modeling_vit_msn.py#L637"}}),he=new Ne({props:{name:"forward",anchor:"transformers.ViTMSNForImageClassification.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"interpolate_pos_encoding",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ViTMSNForImageClassification.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/pr_29969/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_29969/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ViTMSNForImageClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.ViTMSNForImageClassification.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.ViTMSNForImageClassification.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.ViTMSNForImageClassification.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.ViTMSNForImageClassification.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/pr_29969/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_29969/src/transformers/models/vit_msn/modeling_vit_msn.py#L656",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_29969/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/pr_29969/en/model_doc/vit_msn#transformers.ViTMSNConfig"
>ViTMSNConfig</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/pr_29969/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),B=new Ht({props:{$$slots:{default:[Ot]},$$scope:{ctx:N}}}),H=new _t({props:{anchor:"transformers.ViTMSNForImageClassification.forward.example",$$slots:{default:[Kt]},$$scope:{ctx:N}}}),ue=new At({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/vit_msn.md"}}),{c(){s=l("meta"),v=r(),c=l("p"),m=r(),h(T.$$.fragment),a=r(),h(w.$$.fragment),Ce=r(),G=l("p"),G.innerHTML=Mt,Se=r(),L=l("p"),L.textContent=bt,je=r(),R=l("p"),R.innerHTML=Tt,xe=r(),Z=l("img"),ke=r(),E=l("small"),E.innerHTML=wt,Je=r(),q=l("p"),q.innerHTML=yt,Ie=r(),h(Y.$$.fragment),Ue=r(),A=l("ul"),A.innerHTML=$t,Ze=r(),h(X.$$.fragment),Fe=r(),Q=l("p"),Q.innerHTML=Nt,We=r(),D=l("p"),D.innerHTML=Vt,ze=r(),h(O.$$.fragment),Be=r(),K=l("p"),K.innerHTML=Ct,He=r(),ee=l("p"),ee.innerHTML=St,Pe=r(),te=l("table"),te.innerHTML=jt,Ge=r(),h(ne.$$.fragment),Le=r(),oe=l("p"),oe.textContent=xt,Re=r(),h(se.$$.fragment),Ee=r(),ae=l("ul"),ae.innerHTML=kt,qe=r(),re=l("p"),re.textContent=Jt,Ye=r(),h(ie.$$.fragment),Ae=r(),y=l("div"),h(le.$$.fragment),ot=r(),_e=l("p"),_e.innerHTML=It,st=r(),Me=l("p"),Me.innerHTML=Ut,at=r(),h(F.$$.fragment),Xe=r(),h(de.$$.fragment),Qe=r(),S=l("div"),h(ce.$$.fragment),rt=r(),be=l("p"),be.innerHTML=Zt,it=r(),V=l("div"),h(me.$$.fragment),lt=r(),Te=l("p"),Te.innerHTML=Ft,dt=r(),h(W.$$.fragment),ct=r(),h(z.$$.fragment),De=r(),h(pe.$$.fragment),Oe=r(),$=l("div"),h(fe.$$.fragment),mt=r(),ve=l("p"),ve.textContent=Wt,pt=r(),we=l("p"),we.innerHTML=zt,ft=r(),C=l("div"),h(he.$$.fragment),ht=r(),ye=l("p"),ye.innerHTML=Bt,ut=r(),h(B.$$.fragment),gt=r(),h(H.$$.fragment),Ke=r(),h(ue.$$.fragment),et=r(),$e=l("p"),this.h()},l(e){const t=qt("svelte-u9bgzb",document.head);s=d(t,"META",{name:!0,content:!0}),t.forEach(n),v=i(e),c=d(e,"P",{}),ge(c).forEach(n),m=i(e),u(T.$$.fragment,e),a=i(e),u(w.$$.fragment,e),Ce=i(e),G=d(e,"P",{"data-svelte-h":!0}),p(G)!=="svelte-lk3nii"&&(G.innerHTML=Mt),Se=i(e),L=d(e,"P",{"data-svelte-h":!0}),p(L)!=="svelte-vfdo9a"&&(L.textContent=bt),je=i(e),R=d(e,"P",{"data-svelte-h":!0}),p(R)!=="svelte-abxoxf"&&(R.innerHTML=Tt),xe=i(e),Z=d(e,"IMG",{src:!0,alt:!0,width:!0}),ke=i(e),E=d(e,"SMALL",{"data-svelte-h":!0}),p(E)!=="svelte-1iymhb9"&&(E.innerHTML=wt),Je=i(e),q=d(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-ig50j8"&&(q.innerHTML=yt),Ie=i(e),u(Y.$$.fragment,e),Ue=i(e),A=d(e,"UL",{"data-svelte-h":!0}),p(A)!=="svelte-1h99qn5"&&(A.innerHTML=$t),Ze=i(e),u(X.$$.fragment,e),Fe=i(e),Q=d(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-1cid2pe"&&(Q.innerHTML=Nt),We=i(e),D=d(e,"P",{"data-svelte-h":!0}),p(D)!=="svelte-1x11lxg"&&(D.innerHTML=Vt),ze=i(e),u(O.$$.fragment,e),Be=i(e),K=d(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-djb2w0"&&(K.innerHTML=Ct),He=i(e),ee=d(e,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-r19fu6"&&(ee.innerHTML=St),Pe=i(e),te=d(e,"TABLE",{"data-svelte-h":!0}),p(te)!=="svelte-vyu660"&&(te.innerHTML=jt),Ge=i(e),u(ne.$$.fragment,e),Le=i(e),oe=d(e,"P",{"data-svelte-h":!0}),p(oe)!=="svelte-s3w6c0"&&(oe.textContent=xt),Re=i(e),u(se.$$.fragment,e),Ee=i(e),ae=d(e,"UL",{"data-svelte-h":!0}),p(ae)!=="svelte-7fz3uk"&&(ae.innerHTML=kt),qe=i(e),re=d(e,"P",{"data-svelte-h":!0}),p(re)!=="svelte-1xesile"&&(re.textContent=Jt),Ye=i(e),u(ie.$$.fragment,e),Ae=i(e),y=d(e,"DIV",{class:!0});var j=ge(y);u(le.$$.fragment,j),ot=i(j),_e=d(j,"P",{"data-svelte-h":!0}),p(_e)!=="svelte-v6ltiq"&&(_e.innerHTML=It),st=i(j),Me=d(j,"P",{"data-svelte-h":!0}),p(Me)!=="svelte-1xp2kwr"&&(Me.innerHTML=Ut),at=i(j),u(F.$$.fragment,j),j.forEach(n),Xe=i(e),u(de.$$.fragment,e),Qe=i(e),S=d(e,"DIV",{class:!0});var U=ge(S);u(ce.$$.fragment,U),rt=i(U),be=d(U,"P",{"data-svelte-h":!0}),p(be)!=="svelte-f45q49"&&(be.innerHTML=Zt),it=i(U),V=d(U,"DIV",{class:!0});var x=ge(V);u(me.$$.fragment,x),lt=i(x),Te=d(x,"P",{"data-svelte-h":!0}),p(Te)!=="svelte-1xvin6e"&&(Te.innerHTML=Ft),dt=i(x),u(W.$$.fragment,x),ct=i(x),u(z.$$.fragment,x),x.forEach(n),U.forEach(n),De=i(e),u(pe.$$.fragment,e),Oe=i(e),$=d(e,"DIV",{class:!0});var k=ge($);u(fe.$$.fragment,k),mt=i(k),ve=d(k,"P",{"data-svelte-h":!0}),p(ve)!=="svelte-73jzbh"&&(ve.textContent=Wt),pt=i(k),we=d(k,"P",{"data-svelte-h":!0}),p(we)!=="svelte-1gjh92c"&&(we.innerHTML=zt),ft=i(k),C=d(k,"DIV",{class:!0});var J=ge(C);u(he.$$.fragment,J),ht=i(J),ye=d(J,"P",{"data-svelte-h":!0}),p(ye)!=="svelte-fm9nhw"&&(ye.innerHTML=Bt),ut=i(J),u(B.$$.fragment,J),gt=i(J),u(H.$$.fragment,J),J.forEach(n),k.forEach(n),Ke=i(e),u(ue.$$.fragment,e),et=i(e),$e=d(e,"P",{}),ge($e).forEach(n),this.h()},h(){I(s,"name","hf:doc:metadata"),I(s,"content",tn),Gt(Z.src,vt="https://i.ibb.co/W6PQMdC/Screenshot-2022-09-13-at-9-08-40-AM.png")||I(Z,"src",vt),I(Z,"alt","drawing"),I(Z,"width","600"),I(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I($,"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){f(document.head,s),o(e,v,t),o(e,c,t),o(e,m,t),g(T,e,t),o(e,a,t),g(w,e,t),o(e,Ce,t),o(e,G,t),o(e,Se,t),o(e,L,t),o(e,je,t),o(e,R,t),o(e,xe,t),o(e,Z,t),o(e,ke,t),o(e,E,t),o(e,Je,t),o(e,q,t),o(e,Ie,t),g(Y,e,t),o(e,Ue,t),o(e,A,t),o(e,Ze,t),g(X,e,t),o(e,Fe,t),o(e,Q,t),o(e,We,t),o(e,D,t),o(e,ze,t),g(O,e,t),o(e,Be,t),o(e,K,t),o(e,He,t),o(e,ee,t),o(e,Pe,t),o(e,te,t),o(e,Ge,t),g(ne,e,t),o(e,Le,t),o(e,oe,t),o(e,Re,t),g(se,e,t),o(e,Ee,t),o(e,ae,t),o(e,qe,t),o(e,re,t),o(e,Ye,t),g(ie,e,t),o(e,Ae,t),o(e,y,t),g(le,y,null),f(y,ot),f(y,_e),f(y,st),f(y,Me),f(y,at),g(F,y,null),o(e,Xe,t),g(de,e,t),o(e,Qe,t),o(e,S,t),g(ce,S,null),f(S,rt),f(S,be),f(S,it),f(S,V),g(me,V,null),f(V,lt),f(V,Te),f(V,dt),g(W,V,null),f(V,ct),g(z,V,null),o(e,De,t),g(pe,e,t),o(e,Oe,t),o(e,$,t),g(fe,$,null),f($,mt),f($,ve),f($,pt),f($,we),f($,ft),f($,C),g(he,C,null),f(C,ht),f(C,ye),f(C,ut),g(B,C,null),f(C,gt),g(H,C,null),o(e,Ke,t),g(ue,e,t),o(e,et,t),o(e,$e,t),tt=!0},p(e,[t]){const j={};t&2&&(j.$$scope={dirty:t,ctx:e}),F.$set(j);const U={};t&2&&(U.$$scope={dirty:t,ctx:e}),W.$set(U);const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),z.$set(x);const k={};t&2&&(k.$$scope={dirty:t,ctx:e}),B.$set(k);const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),H.$set(J)},i(e){tt||(_(T.$$.fragment,e),_(w.$$.fragment,e),_(Y.$$.fragment,e),_(X.$$.fragment,e),_(O.$$.fragment,e),_(ne.$$.fragment,e),_(se.$$.fragment,e),_(ie.$$.fragment,e),_(le.$$.fragment,e),_(F.$$.fragment,e),_(de.$$.fragment,e),_(ce.$$.fragment,e),_(me.$$.fragment,e),_(W.$$.fragment,e),_(z.$$.fragment,e),_(pe.$$.fragment,e),_(fe.$$.fragment,e),_(he.$$.fragment,e),_(B.$$.fragment,e),_(H.$$.fragment,e),_(ue.$$.fragment,e),tt=!0)},o(e){M(T.$$.fragment,e),M(w.$$.fragment,e),M(Y.$$.fragment,e),M(X.$$.fragment,e),M(O.$$.fragment,e),M(ne.$$.fragment,e),M(se.$$.fragment,e),M(ie.$$.fragment,e),M(le.$$.fragment,e),M(F.$$.fragment,e),M(de.$$.fragment,e),M(ce.$$.fragment,e),M(me.$$.fragment,e),M(W.$$.fragment,e),M(z.$$.fragment,e),M(pe.$$.fragment,e),M(fe.$$.fragment,e),M(he.$$.fragment,e),M(B.$$.fragment,e),M(H.$$.fragment,e),M(ue.$$.fragment,e),tt=!1},d(e){e&&(n(v),n(c),n(m),n(a),n(Ce),n(G),n(Se),n(L),n(je),n(R),n(xe),n(Z),n(ke),n(E),n(Je),n(q),n(Ie),n(Ue),n(A),n(Ze),n(Fe),n(Q),n(We),n(D),n(ze),n(Be),n(K),n(He),n(ee),n(Pe),n(te),n(Ge),n(Le),n(oe),n(Re),n(Ee),n(ae),n(qe),n(re),n(Ye),n(Ae),n(y),n(Xe),n(Qe),n(S),n(De),n(Oe),n($),n(Ke),n(et),n($e)),n(s),b(T,e),b(w,e),b(Y,e),b(X,e),b(O,e),b(ne,e),b(se,e),b(ie,e),b(le),b(F),b(de,e),b(ce),b(me),b(W),b(z),b(pe,e),b(fe),b(he),b(B),b(H),b(ue,e)}}}const tn='{"title":"ViTMSN","local":"vitmsn","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[{"title":"Using Scaled Dot Product Attention (SDPA)","local":"using-scaled-dot-product-attention-sdpa","sections":[],"depth":3}],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"ViTMSNConfig","local":"transformers.ViTMSNConfig","sections":[],"depth":2},{"title":"ViTMSNModel","local":"transformers.ViTMSNModel","sections":[],"depth":2},{"title":"ViTMSNForImageClassification","local":"transformers.ViTMSNForImageClassification","sections":[],"depth":2}],"depth":1}';function nn(N){return Lt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class pn extends Rt{constructor(s){super(),Et(this,s,nn,en,Pt,{})}}export{pn as component};
