import{s as nt,A as st,o as at,n as pe}from"../chunks/scheduler.01eeda35.js";import{S as rt,i as it,g as m,s as i,r as y,A as lt,h as p,f as s,c as l,j as fe,u as w,x as T,k as oe,y as M,a as r,v as $,d as V,t as E,w as x}from"../chunks/index.6dd51b66.js";import{T as je}from"../chunks/Tip.de9bae2b.js";import{D as be}from"../chunks/Docstring.cb556860.js";import{C as Je}from"../chunks/CodeBlock.19ec9b8c.js";import{F as dt,M as ot}from"../chunks/Markdown.3138439e.js";import{E as Ze}from"../chunks/ExampleCodeBlock.69db56ad.js";import{H as ve,E as ct}from"../chunks/index.58fe8f9d.js";function mt(k){let t,h="Example:",o,a,g;return a=new Je({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=m("p"),t.textContent=h,o=i(),y(a.$$.fragment)},l(n){t=p(n,"P",{"data-svelte-h":!0}),T(t)!=="svelte-11lpom8"&&(t.textContent=h),o=l(n),w(a.$$.fragment,n)},m(n,_){r(n,t,_),r(n,o,_),$(a,n,_),g=!0},p:pe,i(n){g||(V(a.$$.fragment,n),g=!0)},o(n){E(a.$$.fragment,n),g=!1},d(n){n&&(s(t),s(o)),x(a,n)}}}function pt(k){let t,h=`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=m("p"),t.innerHTML=h},l(o){t=p(o,"P",{"data-svelte-h":!0}),T(t)!=="svelte-fincs2"&&(t.innerHTML=h)},m(o,a){r(o,t,a)},p:pe,d(o){o&&s(t)}}}function ht(k){let t,h="Examples:",o,a,g;return a=new Je({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=m("p"),t.textContent=h,o=i(),y(a.$$.fragment)},l(n){t=p(n,"P",{"data-svelte-h":!0}),T(t)!=="svelte-kvfsh7"&&(t.textContent=h),o=l(n),w(a.$$.fragment,n)},m(n,_){r(n,t,_),r(n,o,_),$(a,n,_),g=!0},p:pe,i(n){g||(V(a.$$.fragment,n),g=!0)},o(n){E(a.$$.fragment,n),g=!1},d(n){n&&(s(t),s(o)),x(a,n)}}}function ut(k){let t,h=`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=m("p"),t.innerHTML=h},l(o){t=p(o,"P",{"data-svelte-h":!0}),T(t)!=="svelte-7i3y9o"&&(t.innerHTML=h)},m(o,a){r(o,t,a)},p:pe,d(o){o&&s(t)}}}function ft(k){let t,h=`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=m("p"),t.innerHTML=h},l(o){t=p(o,"P",{"data-svelte-h":!0}),T(t)!=="svelte-fincs2"&&(t.innerHTML=h)},m(o,a){r(o,t,a)},p:pe,d(o){o&&s(t)}}}function gt(k){let t,h="Examples:",o,a,g;return a=new Je({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=m("p"),t.textContent=h,o=i(),y(a.$$.fragment)},l(n){t=p(n,"P",{"data-svelte-h":!0}),T(t)!=="svelte-kvfsh7"&&(t.textContent=h),o=l(n),w(a.$$.fragment,n)},m(n,_){r(n,t,_),r(n,o,_),$(a,n,_),g=!0},p:pe,i(n){g||(V(a.$$.fragment,n),g=!0)},o(n){E(a.$$.fragment,n),g=!1},d(n){n&&(s(t),s(o)),x(a,n)}}}function _t(k){let t,h,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.`,ee,F,A,Q,j,Z='The <a href="/docs/transformers/main/en/model_doc/vit_mae#transformers.ViTMAEModel">ViTMAEModel</a> forward method, overrides the <code>__call__</code> special method.',P,d,C,B,te,ne,D,J,G,ae,q,ge="The ViTMAE Model transformer with the decoder on top for self-supervised pre-training.",z,H,_e,O,re=`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.`,de,W,ie,ce,L,he='The <a href="/docs/transformers/main/en/model_doc/vit_mae#transformers.ViTMAEForPreTraining">ViTMAEForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',I,S,me,R,Te;return t=new ve({props:{title:"ViTMAEModel",local:"transformers.ViTMAEModel",headingTag:"h2"}}),a=new be({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/vit_mae/modeling_vit_mae.py#L706"}}),A=new be({props:{name:"forward",anchor:"transformers.ViTMAEModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"noise",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/vilt#transformers.ViltFeatureExtractor.__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/main/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/main/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/main/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 je({props:{$$slots:{default:[pt]},$$scope:{ctx:k}}}),B=new Ze({props:{anchor:"transformers.ViTMAEModel.forward.example",$$slots:{default:[ht]},$$scope:{ctx:k}}}),ne=new ve({props:{title:"ViTMAEForPreTraining",local:"transformers.ViTMAEForPreTraining",headingTag:"h2"}}),G=new be({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/vit_mae/modeling_vit_mae.py#L951"}}),H=new je({props:{$$slots:{default:[ut]},$$scope:{ctx:k}}}),ie=new be({props:{name:"forward",anchor:"transformers.ViTMAEForPreTraining.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"noise",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/vilt#transformers.ViltFeatureExtractor.__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/main/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/main/src/transformers/models/vit_mae/modeling_vit_mae.py#L1094",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/main/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 je({props:{$$slots:{default:[ft]},$$scope:{ctx:k}}}),R=new Ze({props:{anchor:"transformers.ViTMAEForPreTraining.forward.example",$$slots:{default:[gt]},$$scope:{ctx:k}}}),{c(){y(t.$$.fragment),h=i(),o=m("div"),y(a.$$.fragment),g=i(),n=m("p"),n.innerHTML=_,ee=i(),F=m("div"),y(A.$$.fragment),Q=i(),j=m("p"),j.innerHTML=Z,P=i(),y(d.$$.fragment),C=i(),y(B.$$.fragment),te=i(),y(ne.$$.fragment),D=i(),J=m("div"),y(G.$$.fragment),ae=i(),q=m("p"),q.textContent=ge,z=i(),y(H.$$.fragment),_e=i(),O=m("p"),O.innerHTML=re,de=i(),W=m("div"),y(ie.$$.fragment),ce=i(),L=m("p"),L.innerHTML=he,I=i(),y(S.$$.fragment),me=i(),y(R.$$.fragment),this.h()},l(f){w(t.$$.fragment,f),h=l(f),o=p(f,"DIV",{class:!0});var v=fe(o);w(a.$$.fragment,v),g=l(v),n=p(v,"P",{"data-svelte-h":!0}),T(n)!=="svelte-okthft"&&(n.innerHTML=_),ee=l(v),F=p(v,"DIV",{class:!0});var N=fe(F);w(A.$$.fragment,N),Q=l(N),j=p(N,"P",{"data-svelte-h":!0}),T(j)!=="svelte-579ik6"&&(j.innerHTML=Z),P=l(N),w(d.$$.fragment,N),C=l(N),w(B.$$.fragment,N),N.forEach(s),v.forEach(s),te=l(f),w(ne.$$.fragment,f),D=l(f),J=p(f,"DIV",{class:!0});var U=fe(J);w(G.$$.fragment,U),ae=l(U),q=p(U,"P",{"data-svelte-h":!0}),T(q)!=="svelte-10cjq04"&&(q.textContent=ge),z=l(U),w(H.$$.fragment,U),_e=l(U),O=p(U,"P",{"data-svelte-h":!0}),T(O)!=="svelte-1gjh92c"&&(O.innerHTML=re),de=l(U),W=p(U,"DIV",{class:!0});var Y=fe(W);w(ie.$$.fragment,Y),ce=l(Y),L=p(Y,"P",{"data-svelte-h":!0}),T(L)!=="svelte-ym1rz2"&&(L.innerHTML=he),I=l(Y),w(S.$$.fragment,Y),me=l(Y),w(R.$$.fragment,Y),Y.forEach(s),U.forEach(s),this.h()},h(){oe(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),oe(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),oe(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),oe(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(f,v){$(t,f,v),r(f,h,v),r(f,o,v),$(a,o,null),M(o,g),M(o,n),M(o,ee),M(o,F),$(A,F,null),M(F,Q),M(F,j),M(F,P),$(d,F,null),M(F,C),$(B,F,null),r(f,te,v),$(ne,f,v),r(f,D,v),r(f,J,v),$(G,J,null),M(J,ae),M(J,q),M(J,z),$(H,J,null),M(J,_e),M(J,O),M(J,de),M(J,W),$(ie,W,null),M(W,ce),M(W,L),M(W,I),$(S,W,null),M(W,me),$(R,W,null),Te=!0},p(f,v){const N={};v&2&&(N.$$scope={dirty:v,ctx:f}),d.$set(N);const U={};v&2&&(U.$$scope={dirty:v,ctx:f}),B.$set(U);const Y={};v&2&&(Y.$$scope={dirty:v,ctx:f}),H.$set(Y);const u={};v&2&&(u.$$scope={dirty:v,ctx:f}),S.$set(u);const b={};v&2&&(b.$$scope={dirty:v,ctx:f}),R.$set(b)},i(f){Te||(V(t.$$.fragment,f),V(a.$$.fragment,f),V(A.$$.fragment,f),V(d.$$.fragment,f),V(B.$$.fragment,f),V(ne.$$.fragment,f),V(G.$$.fragment,f),V(H.$$.fragment,f),V(ie.$$.fragment,f),V(S.$$.fragment,f),V(R.$$.fragment,f),Te=!0)},o(f){E(t.$$.fragment,f),E(a.$$.fragment,f),E(A.$$.fragment,f),E(d.$$.fragment,f),E(B.$$.fragment,f),E(ne.$$.fragment,f),E(G.$$.fragment,f),E(H.$$.fragment,f),E(ie.$$.fragment,f),E(S.$$.fragment,f),E(R.$$.fragment,f),Te=!1},d(f){f&&(s(h),s(o),s(te),s(D),s(J)),x(t,f),x(a),x(A),x(d),x(B),x(ne,f),x(G),x(H),x(ie),x(S),x(R)}}}function Tt(k){let t,h;return t=new ot({props:{$$slots:{default:[_t]},$$scope:{ctx:k}}}),{c(){y(t.$$.fragment)},l(o){w(t.$$.fragment,o)},m(o,a){$(t,o,a),h=!0},p(o,a){const g={};a&2&&(g.$$scope={dirty:a,ctx:o}),t.$set(g)},i(o){h||(V(t.$$.fragment,o),h=!0)},o(o){E(t.$$.fragment,o),h=!1},d(o){x(t,o)}}}function Mt(k){let t,h="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,_,ee=`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:`,F,A,Q=`<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>`,j,Z,P=`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=m("p"),t.innerHTML=h,o=i(),a=m("ul"),a.innerHTML=g,n=i(),_=m("p"),_.innerHTML=ee,F=i(),A=m("ul"),A.innerHTML=Q,j=i(),Z=m("p"),Z.innerHTML=P},l(d){t=p(d,"P",{"data-svelte-h":!0}),T(t)!=="svelte-1ajbfxg"&&(t.innerHTML=h),o=l(d),a=p(d,"UL",{"data-svelte-h":!0}),T(a)!=="svelte-qm1t26"&&(a.innerHTML=g),n=l(d),_=p(d,"P",{"data-svelte-h":!0}),T(_)!=="svelte-1v9qsc5"&&(_.innerHTML=ee),F=l(d),A=p(d,"UL",{"data-svelte-h":!0}),T(A)!=="svelte-99h8aq"&&(A.innerHTML=Q),j=l(d),Z=p(d,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-1an3odd"&&(Z.innerHTML=P)},m(d,C){r(d,t,C),r(d,o,C),r(d,a,C),r(d,n,C),r(d,_,C),r(d,F,C),r(d,A,C),r(d,j,C),r(d,Z,C)},p:pe,d(d){d&&(s(t),s(o),s(a),s(n),s(_),s(F),s(A),s(j),s(Z))}}}function vt(k){let t,h=`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=m("p"),t.innerHTML=h},l(o){t=p(o,"P",{"data-svelte-h":!0}),T(t)!=="svelte-fincs2"&&(t.innerHTML=h)},m(o,a){r(o,t,a)},p:pe,d(o){o&&s(t)}}}function bt(k){let t,h="Examples:",o,a,g;return a=new Je({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=m("p"),t.textContent=h,o=i(),y(a.$$.fragment)},l(n){t=p(n,"P",{"data-svelte-h":!0}),T(t)!=="svelte-kvfsh7"&&(t.textContent=h),o=l(n),w(a.$$.fragment,n)},m(n,_){r(n,t,_),r(n,o,_),$(a,n,_),g=!0},p:pe,i(n){g||(V(a.$$.fragment,n),g=!0)},o(n){E(a.$$.fragment,n),g=!1},d(n){n&&(s(t),s(o)),x(a,n)}}}function yt(k){let t,h="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,_,ee=`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:`,F,A,Q=`<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>`,j,Z,P=`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=m("p"),t.innerHTML=h,o=i(),a=m("ul"),a.innerHTML=g,n=i(),_=m("p"),_.innerHTML=ee,F=i(),A=m("ul"),A.innerHTML=Q,j=i(),Z=m("p"),Z.innerHTML=P},l(d){t=p(d,"P",{"data-svelte-h":!0}),T(t)!=="svelte-1ajbfxg"&&(t.innerHTML=h),o=l(d),a=p(d,"UL",{"data-svelte-h":!0}),T(a)!=="svelte-qm1t26"&&(a.innerHTML=g),n=l(d),_=p(d,"P",{"data-svelte-h":!0}),T(_)!=="svelte-1v9qsc5"&&(_.innerHTML=ee),F=l(d),A=p(d,"UL",{"data-svelte-h":!0}),T(A)!=="svelte-99h8aq"&&(A.innerHTML=Q),j=l(d),Z=p(d,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-1an3odd"&&(Z.innerHTML=P)},m(d,C){r(d,t,C),r(d,o,C),r(d,a,C),r(d,n,C),r(d,_,C),r(d,F,C),r(d,A,C),r(d,j,C),r(d,Z,C)},p:pe,d(d){d&&(s(t),s(o),s(a),s(n),s(_),s(F),s(A),s(j),s(Z))}}}function wt(k){let t,h=`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=m("p"),t.innerHTML=h},l(o){t=p(o,"P",{"data-svelte-h":!0}),T(t)!=="svelte-fincs2"&&(t.innerHTML=h)},m(o,a){r(o,t,a)},p:pe,d(o){o&&s(t)}}}function $t(k){let t,h="Examples:",o,a,g;return a=new Je({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=m("p"),t.textContent=h,o=i(),y(a.$$.fragment)},l(n){t=p(n,"P",{"data-svelte-h":!0}),T(t)!=="svelte-kvfsh7"&&(t.textContent=h),o=l(n),w(a.$$.fragment,n)},m(n,_){r(n,t,_),r(n,o,_),$(a,n,_),g=!0},p:pe,i(n){g||(V(a.$$.fragment,n),g=!0)},o(n){E(a.$$.fragment,n),g=!1},d(n){n&&(s(t),s(o)),x(a,n)}}}function Vt(k){let t,h,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/main/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.)`,ee,F,A=`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.`,Q,j,Z,P,d,C,B,te='The <a href="/docs/transformers/main/en/model_doc/vit_mae#transformers.TFViTMAEModel">TFViTMAEModel</a> forward method, overrides the <code>__call__</code> special method.',ne,D,J,G,ae,q,ge,z,H,_e,O,re=`The ViTMAE Model transformer with the decoder on top for self-supervised pre-training.
This model inherits from <a href="/docs/transformers/main/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.)`,de,W,ie=`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.`,ce,L,he,I,S,me,R,Te='The <a href="/docs/transformers/main/en/model_doc/vit_mae#transformers.TFViTMAEForPreTraining">TFViTMAEForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',f,v,N,U,Y;return t=new ve({props:{title:"TFViTMAEModel",local:"transformers.TFViTMAEModel",headingTag:"h2"}}),a=new be({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/main/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/main/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/main/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L927"}}),j=new je({props:{$$slots:{default:[Mt]},$$scope:{ctx:k}}}),d=new be({props:{name:"call",anchor:"transformers.TFViTMAEModel.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"noise",val:": Optional[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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/vilt#transformers.ViltFeatureExtractor.__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/main/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/main/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/main/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>
`}}),D=new je({props:{$$slots:{default:[vt]},$$scope:{ctx:k}}}),G=new Ze({props:{anchor:"transformers.TFViTMAEModel.call.example",$$slots:{default:[bt]},$$scope:{ctx:k}}}),q=new ve({props:{title:"TFViTMAEForPreTraining",local:"transformers.TFViTMAEForPreTraining",headingTag:"h2"}}),H=new be({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/main/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/main/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/main/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L1148"}}),L=new je({props:{$$slots:{default:[yt]},$$scope:{ctx:k}}}),S=new be({props:{name:"call",anchor:"transformers.TFViTMAEForPreTraining.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"noise",val:": Optional[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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/vilt#transformers.ViltFeatureExtractor.__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/main/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/main/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/main/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>
`}}),v=new je({props:{$$slots:{default:[wt]},$$scope:{ctx:k}}}),U=new Ze({props:{anchor:"transformers.TFViTMAEForPreTraining.call.example",$$slots:{default:[$t]},$$scope:{ctx:k}}}),{c(){y(t.$$.fragment),h=i(),o=m("div"),y(a.$$.fragment),g=i(),n=m("p"),n.innerHTML=_,ee=i(),F=m("p"),F.innerHTML=A,Q=i(),y(j.$$.fragment),Z=i(),P=m("div"),y(d.$$.fragment),C=i(),B=m("p"),B.innerHTML=te,ne=i(),y(D.$$.fragment),J=i(),y(G.$$.fragment),ae=i(),y(q.$$.fragment),ge=i(),z=m("div"),y(H.$$.fragment),_e=i(),O=m("p"),O.innerHTML=re,de=i(),W=m("p"),W.innerHTML=ie,ce=i(),y(L.$$.fragment),he=i(),I=m("div"),y(S.$$.fragment),me=i(),R=m("p"),R.innerHTML=Te,f=i(),y(v.$$.fragment),N=i(),y(U.$$.fragment),this.h()},l(u){w(t.$$.fragment,u),h=l(u),o=p(u,"DIV",{class:!0});var b=fe(o);w(a.$$.fragment,b),g=l(b),n=p(b,"P",{"data-svelte-h":!0}),T(n)!=="svelte-1fdtwjl"&&(n.innerHTML=_),ee=l(b),F=p(b,"P",{"data-svelte-h":!0}),T(F)!=="svelte-1be7e3c"&&(F.innerHTML=A),Q=l(b),w(j.$$.fragment,b),Z=l(b),P=p(b,"DIV",{class:!0});var se=fe(P);w(d.$$.fragment,se),C=l(se),B=p(se,"P",{"data-svelte-h":!0}),T(B)!=="svelte-1c9bdsm"&&(B.innerHTML=te),ne=l(se),w(D.$$.fragment,se),J=l(se),w(G.$$.fragment,se),se.forEach(s),b.forEach(s),ae=l(u),w(q.$$.fragment,u),ge=l(u),z=p(u,"DIV",{class:!0});var K=fe(z);w(H.$$.fragment,K),_e=l(K),O=p(K,"P",{"data-svelte-h":!0}),T(O)!=="svelte-gfhire"&&(O.innerHTML=re),de=l(K),W=p(K,"P",{"data-svelte-h":!0}),T(W)!=="svelte-1be7e3c"&&(W.innerHTML=ie),ce=l(K),w(L.$$.fragment,K),he=l(K),I=p(K,"DIV",{class:!0});var X=fe(I);w(S.$$.fragment,X),me=l(X),R=p(X,"P",{"data-svelte-h":!0}),T(R)!=="svelte-1ydaxfq"&&(R.innerHTML=Te),f=l(X),w(v.$$.fragment,X),N=l(X),w(U.$$.fragment,X),X.forEach(s),K.forEach(s),this.h()},h(){oe(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),oe(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),oe(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),oe(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(u,b){$(t,u,b),r(u,h,b),r(u,o,b),$(a,o,null),M(o,g),M(o,n),M(o,ee),M(o,F),M(o,Q),$(j,o,null),M(o,Z),M(o,P),$(d,P,null),M(P,C),M(P,B),M(P,ne),$(D,P,null),M(P,J),$(G,P,null),r(u,ae,b),$(q,u,b),r(u,ge,b),r(u,z,b),$(H,z,null),M(z,_e),M(z,O),M(z,de),M(z,W),M(z,ce),$(L,z,null),M(z,he),M(z,I),$(S,I,null),M(I,me),M(I,R),M(I,f),$(v,I,null),M(I,N),$(U,I,null),Y=!0},p(u,b){const se={};b&2&&(se.$$scope={dirty:b,ctx:u}),j.$set(se);const K={};b&2&&(K.$$scope={dirty:b,ctx:u}),D.$set(K);const X={};b&2&&(X.$$scope={dirty:b,ctx:u}),G.$set(X);const Pe={};b&2&&(Pe.$$scope={dirty:b,ctx:u}),L.$set(Pe);const $e={};b&2&&($e.$$scope={dirty:b,ctx:u}),v.$set($e);const Me={};b&2&&(Me.$$scope={dirty:b,ctx:u}),U.$set(Me)},i(u){Y||(V(t.$$.fragment,u),V(a.$$.fragment,u),V(j.$$.fragment,u),V(d.$$.fragment,u),V(D.$$.fragment,u),V(G.$$.fragment,u),V(q.$$.fragment,u),V(H.$$.fragment,u),V(L.$$.fragment,u),V(S.$$.fragment,u),V(v.$$.fragment,u),V(U.$$.fragment,u),Y=!0)},o(u){E(t.$$.fragment,u),E(a.$$.fragment,u),E(j.$$.fragment,u),E(d.$$.fragment,u),E(D.$$.fragment,u),E(G.$$.fragment,u),E(q.$$.fragment,u),E(H.$$.fragment,u),E(L.$$.fragment,u),E(S.$$.fragment,u),E(v.$$.fragment,u),E(U.$$.fragment,u),Y=!1},d(u){u&&(s(h),s(o),s(ae),s(ge),s(z)),x(t,u),x(a),x(j),x(d),x(D),x(G),x(q,u),x(H),x(L),x(S),x(v),x(U)}}}function Et(k){let t,h;return t=new ot({props:{$$slots:{default:[Vt]},$$scope:{ctx:k}}}),{c(){y(t.$$.fragment)},l(o){w(t.$$.fragment,o)},m(o,a){$(t,o,a),h=!0},p(o,a){const g={};a&2&&(g.$$scope={dirty:a,ctx:o}),t.$set(g)},i(o){h||(V(t.$$.fragment,o),h=!0)},o(o){E(t.$$.fragment,o),h=!1},d(o){x(t,o)}}}function xt(k){let t,h,o,a,g,n,_,ee='<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/> <img alt="TensorFlow" src="https://img.shields.io/badge/TensorFlow-FF6F00?style=flat&amp;logo=tensorflow&amp;logoColor=white"/> <img alt="FlashAttention" src="https://img.shields.io/badge/%E2%9A%A1%EF%B8%8E%20FlashAttention-eae0c8?style=flat"/> <img alt="SDPA" src="https://img.shields.io/badge/SDPA-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/>',F,A,Q,j,Z=`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.`,P,d,C="The abstract from the paper is the following:",B,te,ne=`<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>`,D,J,G,ae,q,ge='MAE architecture. Taken from the <a href="https://arxiv.org/abs/2111.06377">original paper.</a>',z,H,_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>.`,O,re,de,W,ie=`<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/main/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/main/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</a>.</li> <li>One can use <a href="/docs/transformers/main/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,L,he,I,S=`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.`,me,R,Te=`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.`,f,v,N,U,Y="For the best speedups, we recommend loading the model in half-precision (e.g. <code>torch.float16</code> or <code>torch.bfloat16</code>).",u,b,se="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.",K,X,Pe="<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>",$e,Me,ze,Ve,Qe="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ViTMAE.",He,Ee,De='<li><a href="/docs/transformers/main/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/main/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>',Ie,xe,Oe="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.",Le,Fe,Re,le,Ae,Se,Ce,Ke=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/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.`,Ye,Ue,et=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Xe,ye,qe,we,Be,ke,Ne,We,Ge;return g=new ve({props:{title:"ViTMAE",local:"vitmae",headingTag:"h1"}}),A=new ve({props:{title:"Overview",local:"overview",headingTag:"h2"}}),re=new ve({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),L=new ve({props:{title:"Using Scaled Dot Product Attention (SDPA)",local:"using-scaled-dot-product-attention-sdpa",headingTag:"h3"}}),v=new Je({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}}),Me=new ve({props:{title:"Resources",local:"resources",headingTag:"h2"}}),Fe=new ve({props:{title:"ViTMAEConfig",local:"transformers.ViTMAEConfig",headingTag:"h2"}}),Ae=new be({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/main/src/transformers/models/vit_mae/configuration_vit_mae.py#L24"}}),ye=new Ze({props:{anchor:"transformers.ViTMAEConfig.example",$$slots:{default:[mt]},$$scope:{ctx:k}}}),we=new dt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Et],pytorch:[Tt]},$$scope:{ctx:k}}}),ke=new ct({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/vit_mae.md"}}),{c(){t=m("meta"),h=i(),o=m("p"),a=i(),y(g.$$.fragment),n=i(),_=m("div"),_.innerHTML=ee,F=i(),y(A.$$.fragment),Q=i(),j=m("p"),j.innerHTML=Z,P=i(),d=m("p"),d.textContent=C,B=i(),te=m("p"),te.innerHTML=ne,D=i(),J=m("img"),ae=i(),q=m("small"),q.innerHTML=ge,z=i(),H=m("p"),H.innerHTML=_e,O=i(),y(re.$$.fragment),de=i(),W=m("ul"),W.innerHTML=ie,ce=i(),y(L.$$.fragment),he=i(),I=m("p"),I.innerHTML=S,me=i(),R=m("p"),R.innerHTML=Te,f=i(),y(v.$$.fragment),N=i(),U=m("p"),U.innerHTML=Y,u=i(),b=m("p"),b.innerHTML=se,K=i(),X=m("table"),X.innerHTML=Pe,$e=i(),y(Me.$$.fragment),ze=i(),Ve=m("p"),Ve.textContent=Qe,He=i(),Ee=m("ul"),Ee.innerHTML=De,Ie=i(),xe=m("p"),xe.textContent=Oe,Le=i(),y(Fe.$$.fragment),Re=i(),le=m("div"),y(Ae.$$.fragment),Se=i(),Ce=m("p"),Ce.innerHTML=Ke,Ye=i(),Ue=m("p"),Ue.innerHTML=et,Xe=i(),y(ye.$$.fragment),qe=i(),y(we.$$.fragment),Be=i(),y(ke.$$.fragment),Ne=i(),We=m("p"),this.h()},l(e){const c=lt("svelte-u9bgzb",document.head);t=p(c,"META",{name:!0,content:!0}),c.forEach(s),h=l(e),o=p(e,"P",{}),fe(o).forEach(s),a=l(e),w(g.$$.fragment,e),n=l(e),_=p(e,"DIV",{class:!0,"data-svelte-h":!0}),T(_)!=="svelte-1xi1xpk"&&(_.innerHTML=ee),F=l(e),w(A.$$.fragment,e),Q=l(e),j=p(e,"P",{"data-svelte-h":!0}),T(j)!=="svelte-5dx8db"&&(j.innerHTML=Z),P=l(e),d=p(e,"P",{"data-svelte-h":!0}),T(d)!=="svelte-vfdo9a"&&(d.textContent=C),B=l(e),te=p(e,"P",{"data-svelte-h":!0}),T(te)!=="svelte-11f68yf"&&(te.innerHTML=ne),D=l(e),J=p(e,"IMG",{src:!0,alt:!0,width:!0}),ae=l(e),q=p(e,"SMALL",{"data-svelte-h":!0}),T(q)!=="svelte-rtuuvp"&&(q.innerHTML=ge),z=l(e),H=p(e,"P",{"data-svelte-h":!0}),T(H)!=="svelte-3rb8sy"&&(H.innerHTML=_e),O=l(e),w(re.$$.fragment,e),de=l(e),W=p(e,"UL",{"data-svelte-h":!0}),T(W)!=="svelte-jj54br"&&(W.innerHTML=ie),ce=l(e),w(L.$$.fragment,e),he=l(e),I=p(e,"P",{"data-svelte-h":!0}),T(I)!=="svelte-1cid2pe"&&(I.innerHTML=S),me=l(e),R=p(e,"P",{"data-svelte-h":!0}),T(R)!=="svelte-1x11lxg"&&(R.innerHTML=Te),f=l(e),w(v.$$.fragment,e),N=l(e),U=p(e,"P",{"data-svelte-h":!0}),T(U)!=="svelte-djb2w0"&&(U.innerHTML=Y),u=l(e),b=p(e,"P",{"data-svelte-h":!0}),T(b)!=="svelte-18is2cp"&&(b.innerHTML=se),K=l(e),X=p(e,"TABLE",{"data-svelte-h":!0}),T(X)!=="svelte-1yf64vi"&&(X.innerHTML=Pe),$e=l(e),w(Me.$$.fragment,e),ze=l(e),Ve=p(e,"P",{"data-svelte-h":!0}),T(Ve)!=="svelte-15wot93"&&(Ve.textContent=Qe),He=l(e),Ee=p(e,"UL",{"data-svelte-h":!0}),T(Ee)!=="svelte-chvuel"&&(Ee.innerHTML=De),Ie=l(e),xe=p(e,"P",{"data-svelte-h":!0}),T(xe)!=="svelte-1xesile"&&(xe.textContent=Oe),Le=l(e),w(Fe.$$.fragment,e),Re=l(e),le=p(e,"DIV",{class:!0});var ue=fe(le);w(Ae.$$.fragment,ue),Se=l(ue),Ce=p(ue,"P",{"data-svelte-h":!0}),T(Ce)!=="svelte-1uhocrp"&&(Ce.innerHTML=Ke),Ye=l(ue),Ue=p(ue,"P",{"data-svelte-h":!0}),T(Ue)!=="svelte-o55m63"&&(Ue.innerHTML=et),Xe=l(ue),w(ye.$$.fragment,ue),ue.forEach(s),qe=l(e),w(we.$$.fragment,e),Be=l(e),w(ke.$$.fragment,e),Ne=l(e),We=p(e,"P",{}),fe(We).forEach(s),this.h()},h(){oe(t,"name","hf:doc:metadata"),oe(t,"content",Ft),oe(_,"class","flex flex-wrap space-x-1"),st(J.src,G="https://user-images.githubusercontent.com/11435359/146857310-f258c86c-fde6-48e8-9cee-badd2b21bd2c.png")||oe(J,"src",G),oe(J,"alt","drawing"),oe(J,"width","600"),oe(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){M(document.head,t),r(e,h,c),r(e,o,c),r(e,a,c),$(g,e,c),r(e,n,c),r(e,_,c),r(e,F,c),$(A,e,c),r(e,Q,c),r(e,j,c),r(e,P,c),r(e,d,c),r(e,B,c),r(e,te,c),r(e,D,c),r(e,J,c),r(e,ae,c),r(e,q,c),r(e,z,c),r(e,H,c),r(e,O,c),$(re,e,c),r(e,de,c),r(e,W,c),r(e,ce,c),$(L,e,c),r(e,he,c),r(e,I,c),r(e,me,c),r(e,R,c),r(e,f,c),$(v,e,c),r(e,N,c),r(e,U,c),r(e,u,c),r(e,b,c),r(e,K,c),r(e,X,c),r(e,$e,c),$(Me,e,c),r(e,ze,c),r(e,Ve,c),r(e,He,c),r(e,Ee,c),r(e,Ie,c),r(e,xe,c),r(e,Le,c),$(Fe,e,c),r(e,Re,c),r(e,le,c),$(Ae,le,null),M(le,Se),M(le,Ce),M(le,Ye),M(le,Ue),M(le,Xe),$(ye,le,null),r(e,qe,c),$(we,e,c),r(e,Be,c),$(ke,e,c),r(e,Ne,c),r(e,We,c),Ge=!0},p(e,[c]){const ue={};c&2&&(ue.$$scope={dirty:c,ctx:e}),ye.$set(ue);const tt={};c&2&&(tt.$$scope={dirty:c,ctx:e}),we.$set(tt)},i(e){Ge||(V(g.$$.fragment,e),V(A.$$.fragment,e),V(re.$$.fragment,e),V(L.$$.fragment,e),V(v.$$.fragment,e),V(Me.$$.fragment,e),V(Fe.$$.fragment,e),V(Ae.$$.fragment,e),V(ye.$$.fragment,e),V(we.$$.fragment,e),V(ke.$$.fragment,e),Ge=!0)},o(e){E(g.$$.fragment,e),E(A.$$.fragment,e),E(re.$$.fragment,e),E(L.$$.fragment,e),E(v.$$.fragment,e),E(Me.$$.fragment,e),E(Fe.$$.fragment,e),E(Ae.$$.fragment,e),E(ye.$$.fragment,e),E(we.$$.fragment,e),E(ke.$$.fragment,e),Ge=!1},d(e){e&&(s(h),s(o),s(a),s(n),s(_),s(F),s(Q),s(j),s(P),s(d),s(B),s(te),s(D),s(J),s(ae),s(q),s(z),s(H),s(O),s(de),s(W),s(ce),s(he),s(I),s(me),s(R),s(f),s(N),s(U),s(u),s(b),s(K),s(X),s($e),s(ze),s(Ve),s(He),s(Ee),s(Ie),s(xe),s(Le),s(Re),s(le),s(qe),s(Be),s(Ne),s(We)),s(t),x(g,e),x(A,e),x(re,e),x(L,e),x(v,e),x(Me,e),x(Fe,e),x(Ae),x(ye),x(we,e),x(ke,e)}}}const Ft='{"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 At(k){return at(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zt extends rt{constructor(t){super(),it(this,t,At,xt,nt,{})}}export{zt as component};
