import{s as yn,f as bn,o as wn,n as q}from"../chunks/scheduler.9bc65507.js";import{S as $n,i as Vn,g as c,s as l,r as T,A as En,h as m,f as n,c as d,j as S,u as M,x as f,k as J,y as h,a,v,d as y,t as b,w}from"../chunks/index.707bf1b6.js";import{T as Ze}from"../chunks/Tip.c2ecdbf4.js";import{D as ee}from"../chunks/Docstring.17db21ae.js";import{C as Ke}from"../chunks/CodeBlock.54a9f38d.js";import{E as Oe}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as ue}from"../chunks/Heading.342b1fa6.js";function xn($){let t,g="Example:",r,i,_;return i=new Ke({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=c("p"),t.textContent=g,r=l(),T(i.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),f(t)!=="svelte-11lpom8"&&(t.textContent=g),r=d(o),M(i.$$.fragment,o)},m(o,u){a(o,t,u),a(o,r,u),v(i,o,u),_=!0},p:q,i(o){_||(y(i.$$.fragment,o),_=!0)},o(o){b(i.$$.fragment,o),_=!1},d(o){o&&(n(t),n(r)),w(i,o)}}}function Fn($){let t,g=`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=c("p"),t.innerHTML=g},l(r){t=m(r,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=g)},m(r,i){a(r,t,i)},p:q,d(r){r&&n(t)}}}function kn($){let t,g="Examples:",r,i,_;return i=new Ke({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=c("p"),t.textContent=g,r=l(),T(i.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),f(t)!=="svelte-kvfsh7"&&(t.textContent=g),r=d(o),M(i.$$.fragment,o)},m(o,u){a(o,t,u),a(o,r,u),v(i,o,u),_=!0},p:q,i(o){_||(y(i.$$.fragment,o),_=!0)},o(o){b(i.$$.fragment,o),_=!1},d(o){o&&(n(t),n(r)),w(i,o)}}}function An($){let t,g=`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=c("p"),t.innerHTML=g},l(r){t=m(r,"P",{"data-svelte-h":!0}),f(t)!=="svelte-7i3y9o"&&(t.innerHTML=g)},m(r,i){a(r,t,i)},p:q,d(r){r&&n(t)}}}function jn($){let t,g=`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=c("p"),t.innerHTML=g},l(r){t=m(r,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=g)},m(r,i){a(r,t,i)},p:q,d(r){r&&n(t)}}}function Cn($){let t,g="Examples:",r,i,_;return i=new Ke({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=c("p"),t.textContent=g,r=l(),T(i.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),f(t)!=="svelte-kvfsh7"&&(t.textContent=g),r=d(o),M(i.$$.fragment,o)},m(o,u){a(o,t,u),a(o,r,u),v(i,o,u),_=!0},p:q,i(o){_||(y(i.$$.fragment,o),_=!0)},o(o){b(i.$$.fragment,o),_=!1},d(o){o&&(n(t),n(r)),w(i,o)}}}function Jn($){let t,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",r,i,_="<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>",o,u,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:`,F,E,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,x,O=`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=c("p"),t.innerHTML=g,r=l(),i=c("ul"),i.innerHTML=_,o=l(),u=c("p"),u.innerHTML=Q,F=l(),E=c("ul"),E.innerHTML=D,k=l(),x=c("p"),x.innerHTML=O},l(p){t=m(p,"P",{"data-svelte-h":!0}),f(t)!=="svelte-1ajbfxg"&&(t.innerHTML=g),r=d(p),i=m(p,"UL",{"data-svelte-h":!0}),f(i)!=="svelte-qm1t26"&&(i.innerHTML=_),o=d(p),u=m(p,"P",{"data-svelte-h":!0}),f(u)!=="svelte-1v9qsc5"&&(u.innerHTML=Q),F=d(p),E=m(p,"UL",{"data-svelte-h":!0}),f(E)!=="svelte-99h8aq"&&(E.innerHTML=D),k=d(p),x=m(p,"P",{"data-svelte-h":!0}),f(x)!=="svelte-1an3odd"&&(x.innerHTML=O)},m(p,V){a(p,t,V),a(p,r,V),a(p,i,V),a(p,o,V),a(p,u,V),a(p,F,V),a(p,E,V),a(p,k,V),a(p,x,V)},p:q,d(p){p&&(n(t),n(r),n(i),n(o),n(u),n(F),n(E),n(k),n(x))}}}function Un($){let t,g=`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=c("p"),t.innerHTML=g},l(r){t=m(r,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=g)},m(r,i){a(r,t,i)},p:q,d(r){r&&n(t)}}}function zn($){let t,g="Examples:",r,i,_;return i=new Ke({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=c("p"),t.textContent=g,r=l(),T(i.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),f(t)!=="svelte-kvfsh7"&&(t.textContent=g),r=d(o),M(i.$$.fragment,o)},m(o,u){a(o,t,u),a(o,r,u),v(i,o,u),_=!0},p:q,i(o){_||(y(i.$$.fragment,o),_=!0)},o(o){b(i.$$.fragment,o),_=!1},d(o){o&&(n(t),n(r)),w(i,o)}}}function Pn($){let t,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",r,i,_="<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>",o,u,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:`,F,E,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,x,O=`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=c("p"),t.innerHTML=g,r=l(),i=c("ul"),i.innerHTML=_,o=l(),u=c("p"),u.innerHTML=Q,F=l(),E=c("ul"),E.innerHTML=D,k=l(),x=c("p"),x.innerHTML=O},l(p){t=m(p,"P",{"data-svelte-h":!0}),f(t)!=="svelte-1ajbfxg"&&(t.innerHTML=g),r=d(p),i=m(p,"UL",{"data-svelte-h":!0}),f(i)!=="svelte-qm1t26"&&(i.innerHTML=_),o=d(p),u=m(p,"P",{"data-svelte-h":!0}),f(u)!=="svelte-1v9qsc5"&&(u.innerHTML=Q),F=d(p),E=m(p,"UL",{"data-svelte-h":!0}),f(E)!=="svelte-99h8aq"&&(E.innerHTML=D),k=d(p),x=m(p,"P",{"data-svelte-h":!0}),f(x)!=="svelte-1an3odd"&&(x.innerHTML=O)},m(p,V){a(p,t,V),a(p,r,V),a(p,i,V),a(p,o,V),a(p,u,V),a(p,F,V),a(p,E,V),a(p,k,V),a(p,x,V)},p:q,d(p){p&&(n(t),n(r),n(i),n(o),n(u),n(F),n(E),n(k),n(x))}}}function Zn($){let t,g=`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=c("p"),t.innerHTML=g},l(r){t=m(r,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=g)},m(r,i){a(r,t,i)},p:q,d(r){r&&n(t)}}}function Wn($){let t,g="Examples:",r,i,_;return i=new Ke({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=c("p"),t.textContent=g,r=l(),T(i.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),f(t)!=="svelte-kvfsh7"&&(t.textContent=g),r=d(o),M(i.$$.fragment,o)},m(o,u){a(o,t,u),a(o,r,u),v(i,o,u),_=!0},p:q,i(o){_||(y(i.$$.fragment,o),_=!0)},o(o){b(i.$$.fragment,o),_=!1},d(o){o&&(n(t),n(r)),w(i,o)}}}function Hn($){let t,g,r,i,_,o,u,Q,F,E=`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,x="The abstract from the paper is the following:",O,p,V=`<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>`,et,fe,Qt="Tips:",tt,ge,Dt=`<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>`,nt,te,Ot,ot,_e,Kt='MAE architecture. Taken from the <a href="https://arxiv.org/abs/2111.06377">original paper.</a>',st,Te,en=`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>.`,at,Me,rt,ve,tn="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ViTMAE.",it,ye,nn='<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>',lt,be,on="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.",dt,we,ct,U,$e,yt,We,sn=`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.`,bt,He,an=`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.`,wt,ne,mt,Ve,pt,R,Ee,$t,Ie,rn=`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.`,Vt,W,xe,Et,Le,ln='The <a href="/docs/transformers/main/en/model_doc/vit_mae#transformers.ViTMAEModel">ViTMAEModel</a> forward method, overrides the <code>__call__</code> special method.',xt,oe,Ft,se,ht,Fe,ut,A,ke,kt,qe,dn="The ViTMAE Model transformer with the decoder on top for self-supervised pre-training.",At,ae,jt,Re,cn=`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.`,Ct,H,Ae,Jt,Ne,mn='The <a href="/docs/transformers/main/en/model_doc/vit_mae#transformers.ViTMAEForPreTraining">ViTMAEForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',Ut,re,zt,ie,ft,je,gt,j,Ce,Pt,Be,pn=`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.)`,Zt,Ge,hn=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.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.`,Wt,le,Ht,I,Je,It,Ye,un='The <a href="/docs/transformers/main/en/model_doc/vit_mae#transformers.TFViTMAEModel">TFViTMAEModel</a> forward method, overrides the <code>__call__</code> special method.',Lt,de,qt,ce,_t,Ue,Tt,C,ze,Rt,Xe,fn=`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.)`,Nt,Se,gn=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.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.`,Bt,me,Gt,L,Pe,Yt,Qe,_n='The <a href="/docs/transformers/main/en/model_doc/vit_mae#transformers.TFViTMAEForPreTraining">TFViTMAEForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',Xt,pe,St,he,Mt,De,vt;return _=new ue({props:{title:"ViTMAE",local:"vitmae",headingTag:"h1"}}),u=new ue({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Me=new ue({props:{title:"Resources",local:"resources",headingTag:"h2"}}),we=new ue({props:{title:"ViTMAEConfig",local:"transformers.ViTMAEConfig",headingTag:"h2"}}),$e=new ee({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 probabilitiy 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#L29"}}),ne=new Oe({props:{anchor:"transformers.ViTMAEConfig.example",$$slots:{default:[xn]},$$scope:{ctx:$}}}),Ve=new ue({props:{title:"ViTMAEModel",local:"transformers.ViTMAEModel",headingTag:"h2"}}),Ee=new ee({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#L637"}}),xe=new ee({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"}],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/levit#transformers.LevitFeatureExtractor.__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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/vit_mae/modeling_vit_mae.py#L661",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>
`}}),oe=new Ze({props:{$$slots:{default:[Fn]},$$scope:{ctx:$}}}),se=new Oe({props:{anchor:"transformers.ViTMAEModel.forward.example",$$slots:{default:[kn]},$$scope:{ctx:$}}}),Fe=new ue({props:{title:"ViTMAEForPreTraining",local:"transformers.ViTMAEForPreTraining",headingTag:"h2"}}),ke=new ee({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#L849"}}),ae=new Ze({props:{$$slots:{default:[An]},$$scope:{ctx:$}}}),Ae=new ee({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"}],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/levit#transformers.LevitFeatureExtractor.__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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/vit_mae/modeling_vit_mae.py#L962",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>
`}}),re=new Ze({props:{$$slots:{default:[jn]},$$scope:{ctx:$}}}),ie=new Oe({props:{anchor:"transformers.ViTMAEForPreTraining.forward.example",$$slots:{default:[Cn]},$$scope:{ctx:$}}}),je=new ue({props:{title:"TFViTMAEModel",local:"transformers.TFViTMAEModel",headingTag:"h2"}}),Ce=new ee({props:{name:"class transformers.TFViTMAEModel",anchor:"transformers.TFViTMAEModel",parameters:[{name:"*args",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#L778"}}),le=new Ze({props:{$$slots:{default:[Jn]},$$scope:{ctx:$}}}),Je=new ee({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"}],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/levit#transformers.LevitFeatureExtractor.__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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L787",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>
`}}),de=new Ze({props:{$$slots:{default:[Un]},$$scope:{ctx:$}}}),ce=new Oe({props:{anchor:"transformers.TFViTMAEModel.call.example",$$slots:{default:[zn]},$$scope:{ctx:$}}}),Ue=new ue({props:{title:"TFViTMAEForPreTraining",local:"transformers.TFViTMAEForPreTraining",headingTag:"h2"}}),ze=new ee({props:{name:"class transformers.TFViTMAEForPreTraining",anchor:"transformers.TFViTMAEForPreTraining",parameters:[{name:"*args",val:""},{name:"**kwargs",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#L939"}}),me=new Ze({props:{$$slots:{default:[Pn]},$$scope:{ctx:$}}}),Pe=new ee({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"}],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/levit#transformers.LevitFeatureExtractor.__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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L1063",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>
`}}),pe=new Ze({props:{$$slots:{default:[Zn]},$$scope:{ctx:$}}}),he=new Oe({props:{anchor:"transformers.TFViTMAEForPreTraining.call.example",$$slots:{default:[Wn]},$$scope:{ctx:$}}}),{c(){t=c("meta"),g=l(),r=c("p"),i=l(),T(_.$$.fragment),o=l(),T(u.$$.fragment),Q=l(),F=c("p"),F.innerHTML=E,D=l(),k=c("p"),k.textContent=x,O=l(),p=c("p"),p.innerHTML=V,et=l(),fe=c("p"),fe.textContent=Qt,tt=l(),ge=c("ul"),ge.innerHTML=Dt,nt=l(),te=c("img"),ot=l(),_e=c("small"),_e.innerHTML=Kt,st=l(),Te=c("p"),Te.innerHTML=en,at=l(),T(Me.$$.fragment),rt=l(),ve=c("p"),ve.textContent=tn,it=l(),ye=c("ul"),ye.innerHTML=nn,lt=l(),be=c("p"),be.textContent=on,dt=l(),T(we.$$.fragment),ct=l(),U=c("div"),T($e.$$.fragment),yt=l(),We=c("p"),We.innerHTML=sn,bt=l(),He=c("p"),He.innerHTML=an,wt=l(),T(ne.$$.fragment),mt=l(),T(Ve.$$.fragment),pt=l(),R=c("div"),T(Ee.$$.fragment),$t=l(),Ie=c("p"),Ie.innerHTML=rn,Vt=l(),W=c("div"),T(xe.$$.fragment),Et=l(),Le=c("p"),Le.innerHTML=ln,xt=l(),T(oe.$$.fragment),Ft=l(),T(se.$$.fragment),ht=l(),T(Fe.$$.fragment),ut=l(),A=c("div"),T(ke.$$.fragment),kt=l(),qe=c("p"),qe.textContent=dn,At=l(),T(ae.$$.fragment),jt=l(),Re=c("p"),Re.innerHTML=cn,Ct=l(),H=c("div"),T(Ae.$$.fragment),Jt=l(),Ne=c("p"),Ne.innerHTML=mn,Ut=l(),T(re.$$.fragment),zt=l(),T(ie.$$.fragment),ft=l(),T(je.$$.fragment),gt=l(),j=c("div"),T(Ce.$$.fragment),Pt=l(),Be=c("p"),Be.innerHTML=pn,Zt=l(),Ge=c("p"),Ge.innerHTML=hn,Wt=l(),T(le.$$.fragment),Ht=l(),I=c("div"),T(Je.$$.fragment),It=l(),Ye=c("p"),Ye.innerHTML=un,Lt=l(),T(de.$$.fragment),qt=l(),T(ce.$$.fragment),_t=l(),T(Ue.$$.fragment),Tt=l(),C=c("div"),T(ze.$$.fragment),Rt=l(),Xe=c("p"),Xe.innerHTML=fn,Nt=l(),Se=c("p"),Se.innerHTML=gn,Bt=l(),T(me.$$.fragment),Gt=l(),L=c("div"),T(Pe.$$.fragment),Yt=l(),Qe=c("p"),Qe.innerHTML=_n,Xt=l(),T(pe.$$.fragment),St=l(),T(he.$$.fragment),Mt=l(),De=c("p"),this.h()},l(e){const s=En("svelte-u9bgzb",document.head);t=m(s,"META",{name:!0,content:!0}),s.forEach(n),g=d(e),r=m(e,"P",{}),S(r).forEach(n),i=d(e),M(_.$$.fragment,e),o=d(e),M(u.$$.fragment,e),Q=d(e),F=m(e,"P",{"data-svelte-h":!0}),f(F)!=="svelte-5dx8db"&&(F.innerHTML=E),D=d(e),k=m(e,"P",{"data-svelte-h":!0}),f(k)!=="svelte-vfdo9a"&&(k.textContent=x),O=d(e),p=m(e,"P",{"data-svelte-h":!0}),f(p)!=="svelte-11f68yf"&&(p.innerHTML=V),et=d(e),fe=m(e,"P",{"data-svelte-h":!0}),f(fe)!=="svelte-axv494"&&(fe.textContent=Qt),tt=d(e),ge=m(e,"UL",{"data-svelte-h":!0}),f(ge)!=="svelte-jj54br"&&(ge.innerHTML=Dt),nt=d(e),te=m(e,"IMG",{src:!0,alt:!0,width:!0}),ot=d(e),_e=m(e,"SMALL",{"data-svelte-h":!0}),f(_e)!=="svelte-rtuuvp"&&(_e.innerHTML=Kt),st=d(e),Te=m(e,"P",{"data-svelte-h":!0}),f(Te)!=="svelte-3rb8sy"&&(Te.innerHTML=en),at=d(e),M(Me.$$.fragment,e),rt=d(e),ve=m(e,"P",{"data-svelte-h":!0}),f(ve)!=="svelte-15wot93"&&(ve.textContent=tn),it=d(e),ye=m(e,"UL",{"data-svelte-h":!0}),f(ye)!=="svelte-chvuel"&&(ye.innerHTML=nn),lt=d(e),be=m(e,"P",{"data-svelte-h":!0}),f(be)!=="svelte-1xesile"&&(be.textContent=on),dt=d(e),M(we.$$.fragment,e),ct=d(e),U=m(e,"DIV",{class:!0});var N=S(U);M($e.$$.fragment,N),yt=d(N),We=m(N,"P",{"data-svelte-h":!0}),f(We)!=="svelte-1uhocrp"&&(We.innerHTML=sn),bt=d(N),He=m(N,"P",{"data-svelte-h":!0}),f(He)!=="svelte-o55m63"&&(He.innerHTML=an),wt=d(N),M(ne.$$.fragment,N),N.forEach(n),mt=d(e),M(Ve.$$.fragment,e),pt=d(e),R=m(e,"DIV",{class:!0});var K=S(R);M(Ee.$$.fragment,K),$t=d(K),Ie=m(K,"P",{"data-svelte-h":!0}),f(Ie)!=="svelte-okthft"&&(Ie.innerHTML=rn),Vt=d(K),W=m(K,"DIV",{class:!0});var B=S(W);M(xe.$$.fragment,B),Et=d(B),Le=m(B,"P",{"data-svelte-h":!0}),f(Le)!=="svelte-579ik6"&&(Le.innerHTML=ln),xt=d(B),M(oe.$$.fragment,B),Ft=d(B),M(se.$$.fragment,B),B.forEach(n),K.forEach(n),ht=d(e),M(Fe.$$.fragment,e),ut=d(e),A=m(e,"DIV",{class:!0});var z=S(A);M(ke.$$.fragment,z),kt=d(z),qe=m(z,"P",{"data-svelte-h":!0}),f(qe)!=="svelte-10cjq04"&&(qe.textContent=dn),At=d(z),M(ae.$$.fragment,z),jt=d(z),Re=m(z,"P",{"data-svelte-h":!0}),f(Re)!=="svelte-1gjh92c"&&(Re.innerHTML=cn),Ct=d(z),H=m(z,"DIV",{class:!0});var G=S(H);M(Ae.$$.fragment,G),Jt=d(G),Ne=m(G,"P",{"data-svelte-h":!0}),f(Ne)!=="svelte-ym1rz2"&&(Ne.innerHTML=mn),Ut=d(G),M(re.$$.fragment,G),zt=d(G),M(ie.$$.fragment,G),G.forEach(n),z.forEach(n),ft=d(e),M(je.$$.fragment,e),gt=d(e),j=m(e,"DIV",{class:!0});var P=S(j);M(Ce.$$.fragment,P),Pt=d(P),Be=m(P,"P",{"data-svelte-h":!0}),f(Be)!=="svelte-1fdtwjl"&&(Be.innerHTML=pn),Zt=d(P),Ge=m(P,"P",{"data-svelte-h":!0}),f(Ge)!=="svelte-1ivrf8m"&&(Ge.innerHTML=hn),Wt=d(P),M(le.$$.fragment,P),Ht=d(P),I=m(P,"DIV",{class:!0});var Y=S(I);M(Je.$$.fragment,Y),It=d(Y),Ye=m(Y,"P",{"data-svelte-h":!0}),f(Ye)!=="svelte-1c9bdsm"&&(Ye.innerHTML=un),Lt=d(Y),M(de.$$.fragment,Y),qt=d(Y),M(ce.$$.fragment,Y),Y.forEach(n),P.forEach(n),_t=d(e),M(Ue.$$.fragment,e),Tt=d(e),C=m(e,"DIV",{class:!0});var Z=S(C);M(ze.$$.fragment,Z),Rt=d(Z),Xe=m(Z,"P",{"data-svelte-h":!0}),f(Xe)!=="svelte-gfhire"&&(Xe.innerHTML=fn),Nt=d(Z),Se=m(Z,"P",{"data-svelte-h":!0}),f(Se)!=="svelte-1ivrf8m"&&(Se.innerHTML=gn),Bt=d(Z),M(me.$$.fragment,Z),Gt=d(Z),L=m(Z,"DIV",{class:!0});var X=S(L);M(Pe.$$.fragment,X),Yt=d(X),Qe=m(X,"P",{"data-svelte-h":!0}),f(Qe)!=="svelte-1ydaxfq"&&(Qe.innerHTML=_n),Xt=d(X),M(pe.$$.fragment,X),St=d(X),M(he.$$.fragment,X),X.forEach(n),Z.forEach(n),Mt=d(e),De=m(e,"P",{}),S(De).forEach(n),this.h()},h(){J(t,"name","hf:doc:metadata"),J(t,"content",In),bn(te.src,Ot="https://user-images.githubusercontent.com/11435359/146857310-f258c86c-fde6-48e8-9cee-badd2b21bd2c.png")||J(te,"src",Ot),J(te,"alt","drawing"),J(te,"width","600"),J(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,s){h(document.head,t),a(e,g,s),a(e,r,s),a(e,i,s),v(_,e,s),a(e,o,s),v(u,e,s),a(e,Q,s),a(e,F,s),a(e,D,s),a(e,k,s),a(e,O,s),a(e,p,s),a(e,et,s),a(e,fe,s),a(e,tt,s),a(e,ge,s),a(e,nt,s),a(e,te,s),a(e,ot,s),a(e,_e,s),a(e,st,s),a(e,Te,s),a(e,at,s),v(Me,e,s),a(e,rt,s),a(e,ve,s),a(e,it,s),a(e,ye,s),a(e,lt,s),a(e,be,s),a(e,dt,s),v(we,e,s),a(e,ct,s),a(e,U,s),v($e,U,null),h(U,yt),h(U,We),h(U,bt),h(U,He),h(U,wt),v(ne,U,null),a(e,mt,s),v(Ve,e,s),a(e,pt,s),a(e,R,s),v(Ee,R,null),h(R,$t),h(R,Ie),h(R,Vt),h(R,W),v(xe,W,null),h(W,Et),h(W,Le),h(W,xt),v(oe,W,null),h(W,Ft),v(se,W,null),a(e,ht,s),v(Fe,e,s),a(e,ut,s),a(e,A,s),v(ke,A,null),h(A,kt),h(A,qe),h(A,At),v(ae,A,null),h(A,jt),h(A,Re),h(A,Ct),h(A,H),v(Ae,H,null),h(H,Jt),h(H,Ne),h(H,Ut),v(re,H,null),h(H,zt),v(ie,H,null),a(e,ft,s),v(je,e,s),a(e,gt,s),a(e,j,s),v(Ce,j,null),h(j,Pt),h(j,Be),h(j,Zt),h(j,Ge),h(j,Wt),v(le,j,null),h(j,Ht),h(j,I),v(Je,I,null),h(I,It),h(I,Ye),h(I,Lt),v(de,I,null),h(I,qt),v(ce,I,null),a(e,_t,s),v(Ue,e,s),a(e,Tt,s),a(e,C,s),v(ze,C,null),h(C,Rt),h(C,Xe),h(C,Nt),h(C,Se),h(C,Bt),v(me,C,null),h(C,Gt),h(C,L),v(Pe,L,null),h(L,Yt),h(L,Qe),h(L,Xt),v(pe,L,null),h(L,St),v(he,L,null),a(e,Mt,s),a(e,De,s),vt=!0},p(e,[s]){const N={};s&2&&(N.$$scope={dirty:s,ctx:e}),ne.$set(N);const K={};s&2&&(K.$$scope={dirty:s,ctx:e}),oe.$set(K);const B={};s&2&&(B.$$scope={dirty:s,ctx:e}),se.$set(B);const z={};s&2&&(z.$$scope={dirty:s,ctx:e}),ae.$set(z);const G={};s&2&&(G.$$scope={dirty:s,ctx:e}),re.$set(G);const P={};s&2&&(P.$$scope={dirty:s,ctx:e}),ie.$set(P);const Y={};s&2&&(Y.$$scope={dirty:s,ctx:e}),le.$set(Y);const Z={};s&2&&(Z.$$scope={dirty:s,ctx:e}),de.$set(Z);const X={};s&2&&(X.$$scope={dirty:s,ctx:e}),ce.$set(X);const Tn={};s&2&&(Tn.$$scope={dirty:s,ctx:e}),me.$set(Tn);const Mn={};s&2&&(Mn.$$scope={dirty:s,ctx:e}),pe.$set(Mn);const vn={};s&2&&(vn.$$scope={dirty:s,ctx:e}),he.$set(vn)},i(e){vt||(y(_.$$.fragment,e),y(u.$$.fragment,e),y(Me.$$.fragment,e),y(we.$$.fragment,e),y($e.$$.fragment,e),y(ne.$$.fragment,e),y(Ve.$$.fragment,e),y(Ee.$$.fragment,e),y(xe.$$.fragment,e),y(oe.$$.fragment,e),y(se.$$.fragment,e),y(Fe.$$.fragment,e),y(ke.$$.fragment,e),y(ae.$$.fragment,e),y(Ae.$$.fragment,e),y(re.$$.fragment,e),y(ie.$$.fragment,e),y(je.$$.fragment,e),y(Ce.$$.fragment,e),y(le.$$.fragment,e),y(Je.$$.fragment,e),y(de.$$.fragment,e),y(ce.$$.fragment,e),y(Ue.$$.fragment,e),y(ze.$$.fragment,e),y(me.$$.fragment,e),y(Pe.$$.fragment,e),y(pe.$$.fragment,e),y(he.$$.fragment,e),vt=!0)},o(e){b(_.$$.fragment,e),b(u.$$.fragment,e),b(Me.$$.fragment,e),b(we.$$.fragment,e),b($e.$$.fragment,e),b(ne.$$.fragment,e),b(Ve.$$.fragment,e),b(Ee.$$.fragment,e),b(xe.$$.fragment,e),b(oe.$$.fragment,e),b(se.$$.fragment,e),b(Fe.$$.fragment,e),b(ke.$$.fragment,e),b(ae.$$.fragment,e),b(Ae.$$.fragment,e),b(re.$$.fragment,e),b(ie.$$.fragment,e),b(je.$$.fragment,e),b(Ce.$$.fragment,e),b(le.$$.fragment,e),b(Je.$$.fragment,e),b(de.$$.fragment,e),b(ce.$$.fragment,e),b(Ue.$$.fragment,e),b(ze.$$.fragment,e),b(me.$$.fragment,e),b(Pe.$$.fragment,e),b(pe.$$.fragment,e),b(he.$$.fragment,e),vt=!1},d(e){e&&(n(g),n(r),n(i),n(o),n(Q),n(F),n(D),n(k),n(O),n(p),n(et),n(fe),n(tt),n(ge),n(nt),n(te),n(ot),n(_e),n(st),n(Te),n(at),n(rt),n(ve),n(it),n(ye),n(lt),n(be),n(dt),n(ct),n(U),n(mt),n(pt),n(R),n(ht),n(ut),n(A),n(ft),n(gt),n(j),n(_t),n(Tt),n(C),n(Mt),n(De)),n(t),w(_,e),w(u,e),w(Me,e),w(we,e),w($e),w(ne),w(Ve,e),w(Ee),w(xe),w(oe),w(se),w(Fe,e),w(ke),w(ae),w(Ae),w(re),w(ie),w(je,e),w(Ce),w(le),w(Je),w(de),w(ce),w(Ue,e),w(ze),w(me),w(Pe),w(pe),w(he)}}}const In='{"title":"ViTMAE","local":"vitmae","sections":[{"title":"Overview","local":"overview","sections":[],"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 Ln($){return wn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sn extends $n{constructor(t){super(),Vn(this,t,Ln,Hn,yn,{})}}export{Sn as component};
