import{s as et,f as tt,o as ot,n as he}from"../chunks/scheduler.25b97de1.js";import{S as nt,i as st,g as u,s as i,r as b,A as at,h as f,f as s,c as l,j as ge,u as y,x as M,k as re,y as T,a as r,v as w,d as $,t as V,w as E}from"../chunks/index.d9030fc9.js";import{T as ke}from"../chunks/Tip.baa67368.js";import{D as ve}from"../chunks/Docstring.e257edda.js";import{C as Ue}from"../chunks/CodeBlock.e6cd0d95.js";import{F as rt,M as Ke}from"../chunks/Markdown.7217f838.js";import{E as We}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as Me,E as it}from"../chunks/EditOnGithub.91d95064.js";function lt(A){let t,p="Example:",o,a,g;return a=new Ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpVE1BRUNvbmZpZyUyQyUyMFZpVE1BRU1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFZpVCUyME1BRSUyMHZpdC1tYWUtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBWaVRNQUVDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwdml0LW1hZS1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBWaVRNQUVNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ViTMAEConfig, ViTMAEModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the vit-mae-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTMAEModel(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(){t=u("p"),t.textContent=p,o=i(),b(a.$$.fragment)},l(n){t=f(n,"P",{"data-svelte-h":!0}),M(t)!=="svelte-11lpom8"&&(t.textContent=p),o=l(n),y(a.$$.fragment,n)},m(n,_){r(n,t,_),r(n,o,_),w(a,n,_),g=!0},p:he,i(n){g||($(a.$$.fragment,n),g=!0)},o(n){V(a.$$.fragment,n),g=!1},d(n){n&&(s(t),s(o)),E(a,n)}}}function dt(A){let t,p=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=u("p"),t.innerHTML=p},l(o){t=f(o,"P",{"data-svelte-h":!0}),M(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(o,a){r(o,t,a)},p:he,d(o){o&&s(t)}}}function ct(A){let t,p="Examples:",o,a,g;return a=new Ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpVE1BRU1vZGVsJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnZpdC1tYWUtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFZpVE1BRU1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnZpdC1tYWUtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ViTMAEModel
<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-mae-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTMAEModel.from_pretrained(<span class="hljs-string">&quot;facebook/vit-mae-base&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>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`,wrap:!1}}),{c(){t=u("p"),t.textContent=p,o=i(),b(a.$$.fragment)},l(n){t=f(n,"P",{"data-svelte-h":!0}),M(t)!=="svelte-kvfsh7"&&(t.textContent=p),o=l(n),y(a.$$.fragment,n)},m(n,_){r(n,t,_),r(n,o,_),w(a,n,_),g=!0},p:he,i(n){g||($(a.$$.fragment,n),g=!0)},o(n){V(a.$$.fragment,n),g=!1},d(n){n&&(s(t),s(o)),E(a,n)}}}function mt(A){let t,p=`Note that we provide a script to pre-train this model on custom data in our <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-pretraining" rel="nofollow">examples
directory</a>.`;return{c(){t=u("p"),t.innerHTML=p},l(o){t=f(o,"P",{"data-svelte-h":!0}),M(t)!=="svelte-7i3y9o"&&(t.innerHTML=p)},m(o,a){r(o,t,a)},p:he,d(o){o&&s(t)}}}function pt(A){let t,p=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=u("p"),t.innerHTML=p},l(o){t=f(o,"P",{"data-svelte-h":!0}),M(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(o,a){r(o,t,a)},p:he,d(o){o&&s(t)}}}function ht(A){let t,p="Examples:",o,a,g;return a=new Ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpVE1BRUZvclByZVRyYWluaW5nJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnZpdC1tYWUtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFZpVE1BRUZvclByZVRyYWluaW5nLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnZpdC1tYWUtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBbWFzayUyMCUzRCUyMG91dHB1dHMubWFzayUwQWlkc19yZXN0b3JlJTIwJTNEJTIwb3V0cHV0cy5pZHNfcmVzdG9yZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ViTMAEForPreTraining
<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-mae-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTMAEForPreTraining.from_pretrained(<span class="hljs-string">&quot;facebook/vit-mae-base&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>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = outputs.mask
<span class="hljs-meta">&gt;&gt;&gt; </span>ids_restore = outputs.ids_restore`,wrap:!1}}),{c(){t=u("p"),t.textContent=p,o=i(),b(a.$$.fragment)},l(n){t=f(n,"P",{"data-svelte-h":!0}),M(t)!=="svelte-kvfsh7"&&(t.textContent=p),o=l(n),y(a.$$.fragment,n)},m(n,_){r(n,t,_),r(n,o,_),w(a,n,_),g=!0},p:he,i(n){g||($(a.$$.fragment,n),g=!0)},o(n){V(a.$$.fragment,n),g=!1},d(n){n&&(s(t),s(o)),E(a,n)}}}function ut(A){let t,p,o,a,g,n,_=`The bare ViTMAE Model transformer 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.`,Q,x,U,D,k,Z='The <a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.ViTMAEModel">ViTMAEModel</a> forward method, overrides the <code>__call__</code> special method.',J,d,j,B,te,se,O,P,G,ie,q,_e="The ViTMAE Model transformer with the decoder on top for self-supervised pre-training.",z,H,de,R,be=`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.`,ce,W,oe,ne,K,ue='The <a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.ViTMAEForPreTraining">ViTMAEForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',L,S,me,I,pe;return t=new Me({props:{title:"ViTMAEModel",local:"transformers.ViTMAEModel",headingTag:"h2"}}),a=new ve({props:{name:"class transformers.ViTMAEModel",anchor:"transformers.ViTMAEModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ViTMAEModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.ViTMAEConfig">ViTMAEConfig</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_31098/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_31098/src/transformers/models/vit_mae/modeling_vit_mae.py#L706"}}),U=new ve({props:{name:"forward",anchor:"transformers.ViTMAEModel.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"noise",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.ViTMAEModel.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_31098/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_31098/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ViTMAEModel.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.ViTMAEModel.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.ViTMAEModel.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.ViTMAEModel.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_31098/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ViTMAEModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, default <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings. This is mainly used to use the model on higher
resolution images.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/models/vit_mae/modeling_vit_mae.py#L734",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.vit_mae.modeling_vit_mae.ViTMAEModelOutput</code> 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_31098/en/model_doc/vit_mae#transformers.ViTMAEConfig"
>ViTMAEConfig</a>) and inputs.</p>
<ul>
<li><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.</li>
<li><strong>mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) — Tensor indicating which patches are masked (1) and which are not (0).</li>
<li><strong>ids_restore</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) — Tensor containing the original index of the (shuffled) masked patches.</li>
<li><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 + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer
plus the initial embedding outputs.</li>
<li><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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.vit_mae.modeling_vit_mae.ViTMAEModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),d=new ke({props:{$$slots:{default:[dt]},$$scope:{ctx:A}}}),B=new We({props:{anchor:"transformers.ViTMAEModel.forward.example",$$slots:{default:[ct]},$$scope:{ctx:A}}}),se=new Me({props:{title:"ViTMAEForPreTraining",local:"transformers.ViTMAEForPreTraining",headingTag:"h2"}}),G=new ve({props:{name:"class transformers.ViTMAEForPreTraining",anchor:"transformers.ViTMAEForPreTraining",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ViTMAEForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.ViTMAEConfig">ViTMAEConfig</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_31098/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_31098/src/transformers/models/vit_mae/modeling_vit_mae.py#L952"}}),H=new ke({props:{$$slots:{default:[mt]},$$scope:{ctx:A}}}),oe=new ve({props:{name:"forward",anchor:"transformers.ViTMAEForPreTraining.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"noise",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.ViTMAEForPreTraining.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_31098/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_31098/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ViTMAEForPreTraining.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.ViTMAEForPreTraining.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.ViTMAEForPreTraining.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.ViTMAEForPreTraining.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_31098/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ViTMAEForPreTraining.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, default <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings. This is mainly used to use the model on higher
resolution images.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/models/vit_mae/modeling_vit_mae.py#L1095",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.vit_mae.modeling_vit_mae.ViTMAEForPreTrainingOutput</code> 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_31098/en/model_doc/vit_mae#transformers.ViTMAEConfig"
>ViTMAEConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>) — Pixel reconstruction loss.</li>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, patch_size ** 2 * num_channels)</code>) — Pixel reconstruction logits.</li>
<li><strong>mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) — Tensor indicating which patches are masked (1) and which are not (0).</li>
<li><strong>ids_restore</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) — Tensor containing the original index of the (shuffled) masked patches.</li>
<li><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 + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer
plus the initial embedding outputs.</li>
<li><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>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.vit_mae.modeling_vit_mae.ViTMAEForPreTrainingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),S=new ke({props:{$$slots:{default:[pt]},$$scope:{ctx:A}}}),I=new We({props:{anchor:"transformers.ViTMAEForPreTraining.forward.example",$$slots:{default:[ht]},$$scope:{ctx:A}}}),{c(){b(t.$$.fragment),p=i(),o=u("div"),b(a.$$.fragment),g=i(),n=u("p"),n.innerHTML=_,Q=i(),x=u("div"),b(U.$$.fragment),D=i(),k=u("p"),k.innerHTML=Z,J=i(),b(d.$$.fragment),j=i(),b(B.$$.fragment),te=i(),b(se.$$.fragment),O=i(),P=u("div"),b(G.$$.fragment),ie=i(),q=u("p"),q.textContent=_e,z=i(),b(H.$$.fragment),de=i(),R=u("p"),R.innerHTML=be,ce=i(),W=u("div"),b(oe.$$.fragment),ne=i(),K=u("p"),K.innerHTML=ue,L=i(),b(S.$$.fragment),me=i(),b(I.$$.fragment),this.h()},l(m){y(t.$$.fragment,m),p=l(m),o=f(m,"DIV",{class:!0});var F=ge(o);y(a.$$.fragment,F),g=l(F),n=f(F,"P",{"data-svelte-h":!0}),M(n)!=="svelte-okthft"&&(n.innerHTML=_),Q=l(F),x=f(F,"DIV",{class:!0});var N=ge(x);y(U.$$.fragment,N),D=l(N),k=f(N,"P",{"data-svelte-h":!0}),M(k)!=="svelte-1llewh5"&&(k.innerHTML=Z),J=l(N),y(d.$$.fragment,N),j=l(N),y(B.$$.fragment,N),N.forEach(s),F.forEach(s),te=l(m),y(se.$$.fragment,m),O=l(m),P=f(m,"DIV",{class:!0});var C=ge(P);y(G.$$.fragment,C),ie=l(C),q=f(C,"P",{"data-svelte-h":!0}),M(q)!=="svelte-10cjq04"&&(q.textContent=_e),z=l(C),y(H.$$.fragment,C),de=l(C),R=f(C,"P",{"data-svelte-h":!0}),M(R)!=="svelte-1gjh92c"&&(R.innerHTML=be),ce=l(C),W=f(C,"DIV",{class:!0});var Y=ge(W);y(oe.$$.fragment,Y),ne=l(Y),K=f(Y,"P",{"data-svelte-h":!0}),M(K)!=="svelte-3499qp"&&(K.innerHTML=ue),L=l(Y),y(S.$$.fragment,Y),me=l(Y),y(I.$$.fragment,Y),Y.forEach(s),C.forEach(s),this.h()},h(){re(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(m,F){w(t,m,F),r(m,p,F),r(m,o,F),w(a,o,null),T(o,g),T(o,n),T(o,Q),T(o,x),w(U,x,null),T(x,D),T(x,k),T(x,J),w(d,x,null),T(x,j),w(B,x,null),r(m,te,F),w(se,m,F),r(m,O,F),r(m,P,F),w(G,P,null),T(P,ie),T(P,q),T(P,z),w(H,P,null),T(P,de),T(P,R),T(P,ce),T(P,W),w(oe,W,null),T(W,ne),T(W,K),T(W,L),w(S,W,null),T(W,me),w(I,W,null),pe=!0},p(m,F){const N={};F&2&&(N.$$scope={dirty:F,ctx:m}),d.$set(N);const C={};F&2&&(C.$$scope={dirty:F,ctx:m}),B.$set(C);const Y={};F&2&&(Y.$$scope={dirty:F,ctx:m}),H.$set(Y);const h={};F&2&&(h.$$scope={dirty:F,ctx:m}),S.$set(h);const v={};F&2&&(v.$$scope={dirty:F,ctx:m}),I.$set(v)},i(m){pe||($(t.$$.fragment,m),$(a.$$.fragment,m),$(U.$$.fragment,m),$(d.$$.fragment,m),$(B.$$.fragment,m),$(se.$$.fragment,m),$(G.$$.fragment,m),$(H.$$.fragment,m),$(oe.$$.fragment,m),$(S.$$.fragment,m),$(I.$$.fragment,m),pe=!0)},o(m){V(t.$$.fragment,m),V(a.$$.fragment,m),V(U.$$.fragment,m),V(d.$$.fragment,m),V(B.$$.fragment,m),V(se.$$.fragment,m),V(G.$$.fragment,m),V(H.$$.fragment,m),V(oe.$$.fragment,m),V(S.$$.fragment,m),V(I.$$.fragment,m),pe=!1},d(m){m&&(s(p),s(o),s(te),s(O),s(P)),E(t,m),E(a),E(U),E(d),E(B),E(se,m),E(G),E(H),E(oe),E(S),E(I)}}}function ft(A){let t,p;return t=new Ke({props:{$$slots:{default:[ut]},$$scope:{ctx:A}}}),{c(){b(t.$$.fragment)},l(o){y(t.$$.fragment,o)},m(o,a){w(t,o,a),p=!0},p(o,a){const g={};a&2&&(g.$$scope={dirty:a,ctx:o}),t.$set(g)},i(o){p||($(t.$$.fragment,o),p=!0)},o(o){V(t.$$.fragment,o),p=!1},d(o){E(t,o)}}}function gt(A){let t,p="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",o,a,g="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",n,_,Q=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,x,U,D=`<li>a single Tensor with <code>pixel_values</code> only and nothing else: <code>model(pixel_values)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([pixel_values, attention_mask])</code> or <code>model([pixel_values, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;pixel_values&quot;: pixel_values, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,k,Z,J=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){t=u("p"),t.innerHTML=p,o=i(),a=u("ul"),a.innerHTML=g,n=i(),_=u("p"),_.innerHTML=Q,x=i(),U=u("ul"),U.innerHTML=D,k=i(),Z=u("p"),Z.innerHTML=J},l(d){t=f(d,"P",{"data-svelte-h":!0}),M(t)!=="svelte-1ajbfxg"&&(t.innerHTML=p),o=l(d),a=f(d,"UL",{"data-svelte-h":!0}),M(a)!=="svelte-qm1t26"&&(a.innerHTML=g),n=l(d),_=f(d,"P",{"data-svelte-h":!0}),M(_)!=="svelte-1v9qsc5"&&(_.innerHTML=Q),x=l(d),U=f(d,"UL",{"data-svelte-h":!0}),M(U)!=="svelte-99h8aq"&&(U.innerHTML=D),k=l(d),Z=f(d,"P",{"data-svelte-h":!0}),M(Z)!=="svelte-1an3odd"&&(Z.innerHTML=J)},m(d,j){r(d,t,j),r(d,o,j),r(d,a,j),r(d,n,j),r(d,_,j),r(d,x,j),r(d,U,j),r(d,k,j),r(d,Z,j)},p:he,d(d){d&&(s(t),s(o),s(a),s(n),s(_),s(x),s(U),s(k),s(Z))}}}function _t(A){let t,p=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=u("p"),t.innerHTML=p},l(o){t=f(o,"P",{"data-svelte-h":!0}),M(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(o,a){r(o,t,a)},p:he,d(o){o&&s(t)}}}function Tt(A){let t,p="Examples:",o,a,g;return a=new Ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGVmlUTUFFTW9kZWwlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGdml0LW1hZS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZWaVRNQUVNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ2aXQtbWFlLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFViTMAEModel
<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-mae-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFViTMAEModel.from_pretrained(<span class="hljs-string">&quot;facebook/vit-mae-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`,wrap:!1}}),{c(){t=u("p"),t.textContent=p,o=i(),b(a.$$.fragment)},l(n){t=f(n,"P",{"data-svelte-h":!0}),M(t)!=="svelte-kvfsh7"&&(t.textContent=p),o=l(n),y(a.$$.fragment,n)},m(n,_){r(n,t,_),r(n,o,_),w(a,n,_),g=!0},p:he,i(n){g||($(a.$$.fragment,n),g=!0)},o(n){V(a.$$.fragment,n),g=!1},d(n){n&&(s(t),s(o)),E(a,n)}}}function Mt(A){let t,p="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",o,a,g="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",n,_,Q=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,x,U,D=`<li>a single Tensor with <code>pixel_values</code> only and nothing else: <code>model(pixel_values)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([pixel_values, attention_mask])</code> or <code>model([pixel_values, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;pixel_values&quot;: pixel_values, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,k,Z,J=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){t=u("p"),t.innerHTML=p,o=i(),a=u("ul"),a.innerHTML=g,n=i(),_=u("p"),_.innerHTML=Q,x=i(),U=u("ul"),U.innerHTML=D,k=i(),Z=u("p"),Z.innerHTML=J},l(d){t=f(d,"P",{"data-svelte-h":!0}),M(t)!=="svelte-1ajbfxg"&&(t.innerHTML=p),o=l(d),a=f(d,"UL",{"data-svelte-h":!0}),M(a)!=="svelte-qm1t26"&&(a.innerHTML=g),n=l(d),_=f(d,"P",{"data-svelte-h":!0}),M(_)!=="svelte-1v9qsc5"&&(_.innerHTML=Q),x=l(d),U=f(d,"UL",{"data-svelte-h":!0}),M(U)!=="svelte-99h8aq"&&(U.innerHTML=D),k=l(d),Z=f(d,"P",{"data-svelte-h":!0}),M(Z)!=="svelte-1an3odd"&&(Z.innerHTML=J)},m(d,j){r(d,t,j),r(d,o,j),r(d,a,j),r(d,n,j),r(d,_,j),r(d,x,j),r(d,U,j),r(d,k,j),r(d,Z,j)},p:he,d(d){d&&(s(t),s(o),s(a),s(n),s(_),s(x),s(U),s(k),s(Z))}}}function vt(A){let t,p=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=u("p"),t.innerHTML=p},l(o){t=f(o,"P",{"data-svelte-h":!0}),M(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(o,a){r(o,t,a)},p:he,d(o){o&&s(t)}}}function bt(A){let t,p="Examples:",o,a,g;return a=new Ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGVmlUTUFFRm9yUHJlVHJhaW5pbmclMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGdml0LW1hZS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZWaVRNQUVGb3JQcmVUcmFpbmluZy5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ2aXQtbWFlLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQW1hc2slMjAlM0QlMjBvdXRwdXRzLm1hc2slMEFpZHNfcmVzdG9yZSUyMCUzRCUyMG91dHB1dHMuaWRzX3Jlc3RvcmU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFViTMAEForPreTraining
<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-mae-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFViTMAEForPreTraining.from_pretrained(<span class="hljs-string">&quot;facebook/vit-mae-base&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>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = outputs.mask
<span class="hljs-meta">&gt;&gt;&gt; </span>ids_restore = outputs.ids_restore`,wrap:!1}}),{c(){t=u("p"),t.textContent=p,o=i(),b(a.$$.fragment)},l(n){t=f(n,"P",{"data-svelte-h":!0}),M(t)!=="svelte-kvfsh7"&&(t.textContent=p),o=l(n),y(a.$$.fragment,n)},m(n,_){r(n,t,_),r(n,o,_),w(a,n,_),g=!0},p:he,i(n){g||($(a.$$.fragment,n),g=!0)},o(n){V(a.$$.fragment,n),g=!1},d(n){n&&(s(t),s(o)),E(a,n)}}}function yt(A){let t,p,o,a,g,n,_=`The bare ViTMAE Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/pr_31098/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Q,x,U=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,D,k,Z,J,d,j,B,te='The <a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.TFViTMAEModel">TFViTMAEModel</a> forward method, overrides the <code>__call__</code> special method.',se,O,P,G,ie,q,_e,z,H,de,R,be=`The ViTMAE Model transformer with the decoder on top for self-supervised pre-training.
This model inherits from <a href="/docs/transformers/pr_31098/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,ce,W,oe=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,ne,K,ue,L,S,me,I,pe='The <a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.TFViTMAEForPreTraining">TFViTMAEForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',m,F,N,C,Y;return t=new Me({props:{title:"TFViTMAEModel",local:"transformers.TFViTMAEModel",headingTag:"h2"}}),a=new ve({props:{name:"class transformers.TFViTMAEModel",anchor:"transformers.TFViTMAEModel",parameters:[{name:"config",val:": ViTMAEConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFViTMAEModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.ViTMAEConfig">ViTMAEConfig</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_31098/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L927"}}),k=new ke({props:{$$slots:{default:[gt]},$$scope:{ctx:A}}}),d=new ve({props:{name:"call",anchor:"transformers.TFViTMAEModel.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"noise",val:": tf.Tensor = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFViTMAEModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_31098/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_31098/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.TFViTMAEModel.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</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.TFViTMAEModel.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFViTMAEModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFViTMAEModel.call.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_31098/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used
in eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFViTMAEModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFViTMAEModel.call.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the position encodings at the encoder and decoder.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L940",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.vit_mae.modeling_tf_vit_mae.TFViTMAEModelOutput</code> or a tuple of <code>tf.Tensor</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_31098/en/model_doc/vit_mae#transformers.ViTMAEConfig"
>ViTMAEConfig</a>) and inputs.</p>
<ul>
<li><strong>last_hidden_state</strong> (<code>tf.Tensor</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.</li>
<li><strong>mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) — Tensor indicating which patches are masked (1) and which are not (0).</li>
<li><strong>ids_restore</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) — Tensor containing the original index of the (shuffled) masked patches.</li>
<li><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer plus
the initial embedding outputs.</li>
<li><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.vit_mae.modeling_tf_vit_mae.TFViTMAEModelOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),O=new ke({props:{$$slots:{default:[_t]},$$scope:{ctx:A}}}),G=new We({props:{anchor:"transformers.TFViTMAEModel.call.example",$$slots:{default:[Tt]},$$scope:{ctx:A}}}),q=new Me({props:{title:"TFViTMAEForPreTraining",local:"transformers.TFViTMAEForPreTraining",headingTag:"h2"}}),H=new ve({props:{name:"class transformers.TFViTMAEForPreTraining",anchor:"transformers.TFViTMAEForPreTraining",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.TFViTMAEForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.ViTMAEConfig">ViTMAEConfig</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_31098/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L1148"}}),K=new ke({props:{$$slots:{default:[Mt]},$$scope:{ctx:A}}}),S=new ve({props:{name:"call",anchor:"transformers.TFViTMAEForPreTraining.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"noise",val:": tf.Tensor = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFViTMAEForPreTraining.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_31098/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/pr_31098/en/model_doc/layoutlmv2#transformers.LayoutLMv2FeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.TFViTMAEForPreTraining.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</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.TFViTMAEForPreTraining.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFViTMAEForPreTraining.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFViTMAEForPreTraining.call.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_31098/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used
in eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFViTMAEForPreTraining.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFViTMAEForPreTraining.call.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the position encodings at the encoder and decoder.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L1291",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.vit_mae.modeling_tf_vit_mae.TFViTMAEForPreTrainingOutput</code> or a tuple of <code>tf.Tensor</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_31098/en/model_doc/vit_mae#transformers.ViTMAEConfig"
>ViTMAEConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>) — Pixel reconstruction loss.</li>
<li><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, patch_size ** 2 * num_channels)</code>) — Pixel reconstruction logits.</li>
<li><strong>mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) — Tensor indicating which patches are masked (1) and which are not (0).</li>
<li><strong>ids_restore</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) — Tensor containing the original index of the (shuffled) masked patches.</li>
<li><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer plus
the initial embedding outputs.</li>
<li><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.vit_mae.modeling_tf_vit_mae.TFViTMAEForPreTrainingOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),F=new ke({props:{$$slots:{default:[vt]},$$scope:{ctx:A}}}),C=new We({props:{anchor:"transformers.TFViTMAEForPreTraining.call.example",$$slots:{default:[bt]},$$scope:{ctx:A}}}),{c(){b(t.$$.fragment),p=i(),o=u("div"),b(a.$$.fragment),g=i(),n=u("p"),n.innerHTML=_,Q=i(),x=u("p"),x.innerHTML=U,D=i(),b(k.$$.fragment),Z=i(),J=u("div"),b(d.$$.fragment),j=i(),B=u("p"),B.innerHTML=te,se=i(),b(O.$$.fragment),P=i(),b(G.$$.fragment),ie=i(),b(q.$$.fragment),_e=i(),z=u("div"),b(H.$$.fragment),de=i(),R=u("p"),R.innerHTML=be,ce=i(),W=u("p"),W.innerHTML=oe,ne=i(),b(K.$$.fragment),ue=i(),L=u("div"),b(S.$$.fragment),me=i(),I=u("p"),I.innerHTML=pe,m=i(),b(F.$$.fragment),N=i(),b(C.$$.fragment),this.h()},l(h){y(t.$$.fragment,h),p=l(h),o=f(h,"DIV",{class:!0});var v=ge(o);y(a.$$.fragment,v),g=l(v),n=f(v,"P",{"data-svelte-h":!0}),M(n)!=="svelte-u6mbda"&&(n.innerHTML=_),Q=l(v),x=f(v,"P",{"data-svelte-h":!0}),M(x)!=="svelte-1be7e3c"&&(x.innerHTML=U),D=l(v),y(k.$$.fragment,v),Z=l(v),J=f(v,"DIV",{class:!0});var ae=ge(J);y(d.$$.fragment,ae),j=l(ae),B=f(ae,"P",{"data-svelte-h":!0}),M(B)!=="svelte-yb7dvt"&&(B.innerHTML=te),se=l(ae),y(O.$$.fragment,ae),P=l(ae),y(G.$$.fragment,ae),ae.forEach(s),v.forEach(s),ie=l(h),y(q.$$.fragment,h),_e=l(h),z=f(h,"DIV",{class:!0});var ee=ge(z);y(H.$$.fragment,ee),de=l(ee),R=f(ee,"P",{"data-svelte-h":!0}),M(R)!=="svelte-1nwhk0p"&&(R.innerHTML=be),ce=l(ee),W=f(ee,"P",{"data-svelte-h":!0}),M(W)!=="svelte-1be7e3c"&&(W.innerHTML=oe),ne=l(ee),y(K.$$.fragment,ee),ue=l(ee),L=f(ee,"DIV",{class:!0});var X=ge(L);y(S.$$.fragment,X),me=l(X),I=f(X,"P",{"data-svelte-h":!0}),M(I)!=="svelte-1sjr3qx"&&(I.innerHTML=pe),m=l(X),y(F.$$.fragment,X),N=l(X),y(C.$$.fragment,X),X.forEach(s),ee.forEach(s),this.h()},h(){re(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(h,v){w(t,h,v),r(h,p,v),r(h,o,v),w(a,o,null),T(o,g),T(o,n),T(o,Q),T(o,x),T(o,D),w(k,o,null),T(o,Z),T(o,J),w(d,J,null),T(J,j),T(J,B),T(J,se),w(O,J,null),T(J,P),w(G,J,null),r(h,ie,v),w(q,h,v),r(h,_e,v),r(h,z,v),w(H,z,null),T(z,de),T(z,R),T(z,ce),T(z,W),T(z,ne),w(K,z,null),T(z,ue),T(z,L),w(S,L,null),T(L,me),T(L,I),T(L,m),w(F,L,null),T(L,N),w(C,L,null),Y=!0},p(h,v){const ae={};v&2&&(ae.$$scope={dirty:v,ctx:h}),k.$set(ae);const ee={};v&2&&(ee.$$scope={dirty:v,ctx:h}),O.$set(ee);const X={};v&2&&(X.$$scope={dirty:v,ctx:h}),G.$set(X);const $e={};v&2&&($e.$$scope={dirty:v,ctx:h}),K.$set($e);const Te={};v&2&&(Te.$$scope={dirty:v,ctx:h}),F.$set(Te);const Je={};v&2&&(Je.$$scope={dirty:v,ctx:h}),C.$set(Je)},i(h){Y||($(t.$$.fragment,h),$(a.$$.fragment,h),$(k.$$.fragment,h),$(d.$$.fragment,h),$(O.$$.fragment,h),$(G.$$.fragment,h),$(q.$$.fragment,h),$(H.$$.fragment,h),$(K.$$.fragment,h),$(S.$$.fragment,h),$(F.$$.fragment,h),$(C.$$.fragment,h),Y=!0)},o(h){V(t.$$.fragment,h),V(a.$$.fragment,h),V(k.$$.fragment,h),V(d.$$.fragment,h),V(O.$$.fragment,h),V(G.$$.fragment,h),V(q.$$.fragment,h),V(H.$$.fragment,h),V(K.$$.fragment,h),V(S.$$.fragment,h),V(F.$$.fragment,h),V(C.$$.fragment,h),Y=!1},d(h){h&&(s(p),s(o),s(ie),s(_e),s(z)),E(t,h),E(a),E(k),E(d),E(O),E(G),E(q,h),E(H),E(K),E(S),E(F),E(C)}}}function wt(A){let t,p;return t=new Ke({props:{$$slots:{default:[yt]},$$scope:{ctx:A}}}),{c(){b(t.$$.fragment)},l(o){y(t.$$.fragment,o)},m(o,a){w(t,o,a),p=!0},p(o,a){const g={};a&2&&(g.$$scope={dirty:a,ctx:o}),t.$set(g)},i(o){p||($(t.$$.fragment,o),p=!0)},o(o){V(t.$$.fragment,o),p=!1},d(o){E(t,o)}}}function $t(A){let t,p,o,a,g,n,_,Q,x,U=`The ViTMAE model was proposed in <a href="https://arxiv.org/abs/2111.06377v2" rel="nofollow">Masked Autoencoders Are Scalable Vision Learners</a> by Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li,
Piotr Dollár, Ross Girshick. The paper shows that, by pre-training a Vision Transformer (ViT) to reconstruct pixel values for masked patches, one can get results after
fine-tuning that outperform supervised pre-training.`,D,k,Z="The abstract from the paper is the following:",J,d,j=`<em>This paper shows that masked autoencoders (MAE) are scalable self-supervised learners for computer vision. Our MAE approach is simple: we mask random patches of the
input image and reconstruct the missing pixels. It is based on two core designs. First, we develop an asymmetric encoder-decoder architecture, with an encoder that operates
only on the visible subset of patches (without mask tokens), along with a lightweight decoder that reconstructs the original image from the latent representation and mask
tokens. Second, we find that masking a high proportion of the input image, e.g., 75%, yields a nontrivial and meaningful self-supervisory task. Coupling these two designs
enables us to train large models efficiently and effectively: we accelerate training (by 3x or more) and improve accuracy. Our scalable approach allows for learning high-capacity
models that generalize well: e.g., a vanilla ViT-Huge model achieves the best accuracy (87.8%) among methods that use only ImageNet-1K data. Transfer performance in downstream
tasks outperforms supervised pre-training and shows promising scaling behavior.</em>`,B,te,se,O,P,G='MAE architecture. Taken from the <a href="https://arxiv.org/abs/2111.06377">original paper.</a>',ie,q,_e=`This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>. TensorFlow version of the model was contributed by <a href="https://github.com/sayakpaul" rel="nofollow">sayakpaul</a> and
<a href="https://github.com/ariG23498" rel="nofollow">ariG23498</a> (equal contribution). The original code can be found <a href="https://github.com/facebookresearch/mae" rel="nofollow">here</a>.`,z,H,de,R,be=`<li>MAE (masked auto encoding) is a method for self-supervised pre-training of Vision Transformers (ViTs). The pre-training objective is relatively simple:
by masking a large portion (75%) of the image patches, the model must reconstruct raw pixel values. One can use <a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.ViTMAEForPreTraining">ViTMAEForPreTraining</a> for this purpose.</li> <li>After pre-training, one “throws away” the decoder used to reconstruct pixels, and one uses the encoder for fine-tuning/linear probing. This means that after
fine-tuning, one can directly plug in the weights into a <a href="/docs/transformers/pr_31098/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</a>.</li> <li>One can use <a href="/docs/transformers/pr_31098/en/model_doc/vit#transformers.ViTImageProcessor">ViTImageProcessor</a> to prepare images for the model. See the code examples for more info.</li> <li>Note that the encoder of MAE is only used to encode the visual patches. The encoded patches are then concatenated with mask tokens, which the decoder (which also
consists of Transformer blocks) takes as input. Each mask token is a shared, learned vector that indicates the presence of a missing patch to be predicted. Fixed
sin/cos position embeddings are added both to the input of the encoder and the decoder.</li> <li>For a visual understanding of how MAEs work you can check out this <a href="https://keras.io/examples/vision/masked_image_modeling/" rel="nofollow">post</a>.</li>`,ce,W,oe,ne,K=`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.`,ue,L,S=`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.`,me,I,pe,m,F="For the best speedups, we recommend loading the model in half-precision (e.g. <code>torch.float16</code> or <code>torch.bfloat16</code>).",N,C,Y="On a local benchmark (A100-40GB, PyTorch 2.3.0, OS Ubuntu 22.04) with <code>float32</code> and <code>facebook/vit-mae-base</code> model, we saw the following speedups during inference.",h,v,ae="<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>11</td> <td>6</td> <td>1.83</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>",ee,X,$e,Te,Je="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ViTMAE.",Ze,Ve,Ye='<li><a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.ViTMAEForPreTraining">ViTMAEForPreTraining</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-pretraining" rel="nofollow">example script</a>, allowing you to pre-train the model from scratch/further pre-train the model on custom data.</li> <li>A notebook that illustrates how to visualize reconstructed pixel values with <a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.ViTMAEForPreTraining">ViTMAEForPreTraining</a> can be found <a href="https://github.com/NielsRogge/Transformers-Tutorials/blob/master/ViTMAE/ViT_MAE_visualization_demo.ipynb" rel="nofollow">here</a>.</li>',ze,Ee,Xe="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.",He,xe,Le,le,Fe,Ne,je,Qe=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_31098/en/model_doc/vit_mae#transformers.ViTMAEModel">ViTMAEModel</a>. It is used to instantiate an ViT
MAE 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-mae-base" rel="nofollow">facebook/vit-mae-base</a> architecture.`,Ge,Ce,De=`Configuration objects inherit from <a href="/docs/transformers/pr_31098/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_31098/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Se,ye,Ie,we,qe,Ae,Re,Pe,Be;return g=new Me({props:{title:"ViTMAE",local:"vitmae",headingTag:"h1"}}),_=new Me({props:{title:"Overview",local:"overview",headingTag:"h2"}}),H=new Me({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),W=new Me({props:{title:"Using Scaled Dot Product Attention (SDPA)",local:"using-scaled-dot-product-attention-sdpa",headingTag:"h3"}}),I=new Ue({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpVE1BRU1vZGVsJTBBbW9kZWwlMjAlM0QlMjBWaVRNQUVNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ2aXQtbWFlLWJhc2UlMjIlMkMlMjBhdHRuX2ltcGxlbWVudGF0aW9uJTNEJTIyc2RwYSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEEuLi4=",highlighted:`from transformers import ViTMAEModel
model = <span class="hljs-module-access"><span class="hljs-module"><span class="hljs-identifier">ViTMAEModel</span>.</span></span>from<span class="hljs-constructor">_pretrained(<span class="hljs-string">&quot;facebook/vit-mae-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}}),X=new Me({props:{title:"Resources",local:"resources",headingTag:"h2"}}),xe=new Me({props:{title:"ViTMAEConfig",local:"transformers.ViTMAEConfig",headingTag:"h2"}}),Fe=new ve({props:{name:"class transformers.ViTMAEConfig",anchor:"transformers.ViTMAEConfig",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-12"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"qkv_bias",val:" = True"},{name:"decoder_num_attention_heads",val:" = 16"},{name:"decoder_hidden_size",val:" = 512"},{name:"decoder_num_hidden_layers",val:" = 8"},{name:"decoder_intermediate_size",val:" = 2048"},{name:"mask_ratio",val:" = 0.75"},{name:"norm_pix_loss",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ViTMAEConfig.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.ViTMAEConfig.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.ViTMAEConfig.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.ViTMAEConfig.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.ViTMAEConfig.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.ViTMAEConfig.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.ViTMAEConfig.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.ViTMAEConfig.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.ViTMAEConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.ViTMAEConfig.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.ViTMAEConfig.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.ViTMAEConfig.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.ViTMAEConfig.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"},{anchor:"transformers.ViTMAEConfig.decoder_num_attention_heads",description:`<strong>decoder_num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the decoder.`,name:"decoder_num_attention_heads"},{anchor:"transformers.ViTMAEConfig.decoder_hidden_size",description:`<strong>decoder_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the decoder.`,name:"decoder_hidden_size"},{anchor:"transformers.ViTMAEConfig.decoder_num_hidden_layers",description:`<strong>decoder_num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of hidden layers in the decoder.`,name:"decoder_num_hidden_layers"},{anchor:"transformers.ViTMAEConfig.decoder_intermediate_size",description:`<strong>decoder_intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the decoder.`,name:"decoder_intermediate_size"},{anchor:"transformers.ViTMAEConfig.mask_ratio",description:`<strong>mask_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 0.75) &#x2014;
The ratio of the number of masked tokens in the input sequence.`,name:"mask_ratio"},{anchor:"transformers.ViTMAEConfig.norm_pix_loss",description:`<strong>norm_pix_loss</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to train with normalized pixels (see Table 3 in the paper). Using normalized pixels improved
representation quality in the experiments of the authors.`,name:"norm_pix_loss"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/models/vit_mae/configuration_vit_mae.py#L24"}}),ye=new We({props:{anchor:"transformers.ViTMAEConfig.example",$$slots:{default:[lt]},$$scope:{ctx:A}}}),we=new rt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[wt],pytorch:[ft]},$$scope:{ctx:A}}}),Ae=new it({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/vit_mae.md"}}),{c(){t=u("meta"),p=i(),o=u("p"),a=i(),b(g.$$.fragment),n=i(),b(_.$$.fragment),Q=i(),x=u("p"),x.innerHTML=U,D=i(),k=u("p"),k.textContent=Z,J=i(),d=u("p"),d.innerHTML=j,B=i(),te=u("img"),O=i(),P=u("small"),P.innerHTML=G,ie=i(),q=u("p"),q.innerHTML=_e,z=i(),b(H.$$.fragment),de=i(),R=u("ul"),R.innerHTML=be,ce=i(),b(W.$$.fragment),oe=i(),ne=u("p"),ne.innerHTML=K,ue=i(),L=u("p"),L.innerHTML=S,me=i(),b(I.$$.fragment),pe=i(),m=u("p"),m.innerHTML=F,N=i(),C=u("p"),C.innerHTML=Y,h=i(),v=u("table"),v.innerHTML=ae,ee=i(),b(X.$$.fragment),$e=i(),Te=u("p"),Te.textContent=Je,Ze=i(),Ve=u("ul"),Ve.innerHTML=Ye,ze=i(),Ee=u("p"),Ee.textContent=Xe,He=i(),b(xe.$$.fragment),Le=i(),le=u("div"),b(Fe.$$.fragment),Ne=i(),je=u("p"),je.innerHTML=Qe,Ge=i(),Ce=u("p"),Ce.innerHTML=De,Se=i(),b(ye.$$.fragment),Ie=i(),b(we.$$.fragment),qe=i(),b(Ae.$$.fragment),Re=i(),Pe=u("p"),this.h()},l(e){const c=at("svelte-u9bgzb",document.head);t=f(c,"META",{name:!0,content:!0}),c.forEach(s),p=l(e),o=f(e,"P",{}),ge(o).forEach(s),a=l(e),y(g.$$.fragment,e),n=l(e),y(_.$$.fragment,e),Q=l(e),x=f(e,"P",{"data-svelte-h":!0}),M(x)!=="svelte-5dx8db"&&(x.innerHTML=U),D=l(e),k=f(e,"P",{"data-svelte-h":!0}),M(k)!=="svelte-vfdo9a"&&(k.textContent=Z),J=l(e),d=f(e,"P",{"data-svelte-h":!0}),M(d)!=="svelte-11f68yf"&&(d.innerHTML=j),B=l(e),te=f(e,"IMG",{src:!0,alt:!0,width:!0}),O=l(e),P=f(e,"SMALL",{"data-svelte-h":!0}),M(P)!=="svelte-rtuuvp"&&(P.innerHTML=G),ie=l(e),q=f(e,"P",{"data-svelte-h":!0}),M(q)!=="svelte-3rb8sy"&&(q.innerHTML=_e),z=l(e),y(H.$$.fragment,e),de=l(e),R=f(e,"UL",{"data-svelte-h":!0}),M(R)!=="svelte-402ofu"&&(R.innerHTML=be),ce=l(e),y(W.$$.fragment,e),oe=l(e),ne=f(e,"P",{"data-svelte-h":!0}),M(ne)!=="svelte-1cid2pe"&&(ne.innerHTML=K),ue=l(e),L=f(e,"P",{"data-svelte-h":!0}),M(L)!=="svelte-1x11lxg"&&(L.innerHTML=S),me=l(e),y(I.$$.fragment,e),pe=l(e),m=f(e,"P",{"data-svelte-h":!0}),M(m)!=="svelte-djb2w0"&&(m.innerHTML=F),N=l(e),C=f(e,"P",{"data-svelte-h":!0}),M(C)!=="svelte-18is2cp"&&(C.innerHTML=Y),h=l(e),v=f(e,"TABLE",{"data-svelte-h":!0}),M(v)!=="svelte-1yf64vi"&&(v.innerHTML=ae),ee=l(e),y(X.$$.fragment,e),$e=l(e),Te=f(e,"P",{"data-svelte-h":!0}),M(Te)!=="svelte-15wot93"&&(Te.textContent=Je),Ze=l(e),Ve=f(e,"UL",{"data-svelte-h":!0}),M(Ve)!=="svelte-t4cfsd"&&(Ve.innerHTML=Ye),ze=l(e),Ee=f(e,"P",{"data-svelte-h":!0}),M(Ee)!=="svelte-1xesile"&&(Ee.textContent=Xe),He=l(e),y(xe.$$.fragment,e),Le=l(e),le=f(e,"DIV",{class:!0});var fe=ge(le);y(Fe.$$.fragment,fe),Ne=l(fe),je=f(fe,"P",{"data-svelte-h":!0}),M(je)!=="svelte-1achrjq"&&(je.innerHTML=Qe),Ge=l(fe),Ce=f(fe,"P",{"data-svelte-h":!0}),M(Ce)!=="svelte-1eopo2z"&&(Ce.innerHTML=De),Se=l(fe),y(ye.$$.fragment,fe),fe.forEach(s),Ie=l(e),y(we.$$.fragment,e),qe=l(e),y(Ae.$$.fragment,e),Re=l(e),Pe=f(e,"P",{}),ge(Pe).forEach(s),this.h()},h(){re(t,"name","hf:doc:metadata"),re(t,"content",Vt),tt(te.src,se="https://user-images.githubusercontent.com/11435359/146857310-f258c86c-fde6-48e8-9cee-badd2b21bd2c.png")||re(te,"src",se),re(te,"alt","drawing"),re(te,"width","600"),re(le,"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,c){T(document.head,t),r(e,p,c),r(e,o,c),r(e,a,c),w(g,e,c),r(e,n,c),w(_,e,c),r(e,Q,c),r(e,x,c),r(e,D,c),r(e,k,c),r(e,J,c),r(e,d,c),r(e,B,c),r(e,te,c),r(e,O,c),r(e,P,c),r(e,ie,c),r(e,q,c),r(e,z,c),w(H,e,c),r(e,de,c),r(e,R,c),r(e,ce,c),w(W,e,c),r(e,oe,c),r(e,ne,c),r(e,ue,c),r(e,L,c),r(e,me,c),w(I,e,c),r(e,pe,c),r(e,m,c),r(e,N,c),r(e,C,c),r(e,h,c),r(e,v,c),r(e,ee,c),w(X,e,c),r(e,$e,c),r(e,Te,c),r(e,Ze,c),r(e,Ve,c),r(e,ze,c),r(e,Ee,c),r(e,He,c),w(xe,e,c),r(e,Le,c),r(e,le,c),w(Fe,le,null),T(le,Ne),T(le,je),T(le,Ge),T(le,Ce),T(le,Se),w(ye,le,null),r(e,Ie,c),w(we,e,c),r(e,qe,c),w(Ae,e,c),r(e,Re,c),r(e,Pe,c),Be=!0},p(e,[c]){const fe={};c&2&&(fe.$$scope={dirty:c,ctx:e}),ye.$set(fe);const Oe={};c&2&&(Oe.$$scope={dirty:c,ctx:e}),we.$set(Oe)},i(e){Be||($(g.$$.fragment,e),$(_.$$.fragment,e),$(H.$$.fragment,e),$(W.$$.fragment,e),$(I.$$.fragment,e),$(X.$$.fragment,e),$(xe.$$.fragment,e),$(Fe.$$.fragment,e),$(ye.$$.fragment,e),$(we.$$.fragment,e),$(Ae.$$.fragment,e),Be=!0)},o(e){V(g.$$.fragment,e),V(_.$$.fragment,e),V(H.$$.fragment,e),V(W.$$.fragment,e),V(I.$$.fragment,e),V(X.$$.fragment,e),V(xe.$$.fragment,e),V(Fe.$$.fragment,e),V(ye.$$.fragment,e),V(we.$$.fragment,e),V(Ae.$$.fragment,e),Be=!1},d(e){e&&(s(p),s(o),s(a),s(n),s(Q),s(x),s(D),s(k),s(J),s(d),s(B),s(te),s(O),s(P),s(ie),s(q),s(z),s(de),s(R),s(ce),s(oe),s(ne),s(ue),s(L),s(me),s(pe),s(m),s(N),s(C),s(h),s(v),s(ee),s($e),s(Te),s(Ze),s(Ve),s(ze),s(Ee),s(He),s(Le),s(le),s(Ie),s(qe),s(Re),s(Pe)),s(t),E(g,e),E(_,e),E(H,e),E(W,e),E(I,e),E(X,e),E(xe,e),E(Fe),E(ye),E(we,e),E(Ae,e)}}}const Vt='{"title":"ViTMAE","local":"vitmae","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":"ViTMAEConfig","local":"transformers.ViTMAEConfig","sections":[],"depth":2},{"title":"ViTMAEModel","local":"transformers.ViTMAEModel","sections":[],"depth":2},{"title":"ViTMAEForPreTraining","local":"transformers.ViTMAEForPreTraining","sections":[],"depth":2},{"title":"TFViTMAEModel","local":"transformers.TFViTMAEModel","sections":[],"depth":2},{"title":"TFViTMAEForPreTraining","local":"transformers.TFViTMAEForPreTraining","sections":[],"depth":2}],"depth":1}';function Et(A){return ot(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Pt extends nt{constructor(t){super(),st(this,t,Et,$t,et,{})}}export{Pt as component};
