import{s as Zn,f as Wn,o as Hn,n as L}from"../chunks/scheduler.9bc65507.js";import{S as In,i as Nn,g as s,s as d,u as M,A as Ln,h as a,f as t,c,j as v,v as y,y as p,k as f,o as l,a as r,w,d as b,t as $,x as V}from"../chunks/index.78c82d43.js";import{T as tt}from"../chunks/Tip.87d55b76.js";import{D as K}from"../chunks/Docstring.4e7352e2.js";import{C as Ht}from"../chunks/CodeBlock.73e038be.js";import{I as Ve}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Wt}from"../chunks/ExampleCodeBlock.872b014d.js";function qn(x){let o,_="Example:",m,h,T;return h=new Ht({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(){o=s("p"),o.textContent=_,m=d(),M(h.$$.fragment)},l(n){o=a(n,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=_),m=c(n),y(h.$$.fragment,n)},m(n,g){r(n,o,g),r(n,m,g),w(h,n,g),T=!0},p:L,i(n){T||(b(h.$$.fragment,n),T=!0)},o(n){$(h.$$.fragment,n),T=!1},d(n){n&&(t(o),t(m)),V(h,n)}}}function Rn(x){let o,_=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=s("p"),o.innerHTML=_},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=_)},m(m,h){r(m,o,h)},p:L,d(m){m&&t(o)}}}function Bn(x){let o,_="Examples:",m,h,T;return h=new Ht({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(){o=s("p"),o.textContent=_,m=d(),M(h.$$.fragment)},l(n){o=a(n,"P",{"data-svelte-h":!0}),p(o)!=="svelte-kvfsh7"&&(o.textContent=_),m=c(n),y(h.$$.fragment,n)},m(n,g){r(n,o,g),r(n,m,g),w(h,n,g),T=!0},p:L,i(n){T||(b(h.$$.fragment,n),T=!0)},o(n){$(h.$$.fragment,n),T=!1},d(n){n&&(t(o),t(m)),V(h,n)}}}function Sn(x){let o,_=`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(){o=s("p"),o.innerHTML=_},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-7i3y9o"&&(o.innerHTML=_)},m(m,h){r(m,o,h)},p:L,d(m){m&&t(o)}}}function Gn(x){let o,_=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=s("p"),o.innerHTML=_},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=_)},m(m,h){r(m,o,h)},p:L,d(m){m&&t(o)}}}function Yn(x){let o,_="Examples:",m,h,T;return h=new Ht({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(){o=s("p"),o.textContent=_,m=d(),M(h.$$.fragment)},l(n){o=a(n,"P",{"data-svelte-h":!0}),p(o)!=="svelte-kvfsh7"&&(o.textContent=_),m=c(n),y(h.$$.fragment,n)},m(n,g){r(n,o,g),r(n,m,g),w(h,n,g),T=!0},p:L,i(n){T||(b(h.$$.fragment,n),T=!0)},o(n){$(h.$$.fragment,n),T=!1},d(n){n&&(t(o),t(m)),V(h,n)}}}function Xn(x){let o,_="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",m,h,T="<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,g,U=`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:`,z,A,ee=`<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>`,P,k,J=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){o=s("p"),o.innerHTML=_,m=d(),h=s("ul"),h.innerHTML=T,n=d(),g=s("p"),g.innerHTML=U,z=d(),A=s("ul"),A.innerHTML=ee,P=d(),k=s("p"),k.innerHTML=J},l(u){o=a(u,"P",{"data-svelte-h":!0}),p(o)!=="svelte-1ajbfxg"&&(o.innerHTML=_),m=c(u),h=a(u,"UL",{"data-svelte-h":!0}),p(h)!=="svelte-qm1t26"&&(h.innerHTML=T),n=c(u),g=a(u,"P",{"data-svelte-h":!0}),p(g)!=="svelte-1v9qsc5"&&(g.innerHTML=U),z=c(u),A=a(u,"UL",{"data-svelte-h":!0}),p(A)!=="svelte-99h8aq"&&(A.innerHTML=ee),P=c(u),k=a(u,"P",{"data-svelte-h":!0}),p(k)!=="svelte-1an3odd"&&(k.innerHTML=J)},m(u,E){r(u,o,E),r(u,m,E),r(u,h,E),r(u,n,E),r(u,g,E),r(u,z,E),r(u,A,E),r(u,P,E),r(u,k,E)},p:L,d(u){u&&(t(o),t(m),t(h),t(n),t(g),t(z),t(A),t(P),t(k))}}}function Qn(x){let o,_=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=s("p"),o.innerHTML=_},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=_)},m(m,h){r(m,o,h)},p:L,d(m){m&&t(o)}}}function Dn(x){let o,_="Examples:",m,h,T;return h=new Ht({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(){o=s("p"),o.textContent=_,m=d(),M(h.$$.fragment)},l(n){o=a(n,"P",{"data-svelte-h":!0}),p(o)!=="svelte-kvfsh7"&&(o.textContent=_),m=c(n),y(h.$$.fragment,n)},m(n,g){r(n,o,g),r(n,m,g),w(h,n,g),T=!0},p:L,i(n){T||(b(h.$$.fragment,n),T=!0)},o(n){$(h.$$.fragment,n),T=!1},d(n){n&&(t(o),t(m)),V(h,n)}}}function On(x){let o,_="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",m,h,T="<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,g,U=`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:`,z,A,ee=`<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>`,P,k,J=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){o=s("p"),o.innerHTML=_,m=d(),h=s("ul"),h.innerHTML=T,n=d(),g=s("p"),g.innerHTML=U,z=d(),A=s("ul"),A.innerHTML=ee,P=d(),k=s("p"),k.innerHTML=J},l(u){o=a(u,"P",{"data-svelte-h":!0}),p(o)!=="svelte-1ajbfxg"&&(o.innerHTML=_),m=c(u),h=a(u,"UL",{"data-svelte-h":!0}),p(h)!=="svelte-qm1t26"&&(h.innerHTML=T),n=c(u),g=a(u,"P",{"data-svelte-h":!0}),p(g)!=="svelte-1v9qsc5"&&(g.innerHTML=U),z=c(u),A=a(u,"UL",{"data-svelte-h":!0}),p(A)!=="svelte-99h8aq"&&(A.innerHTML=ee),P=c(u),k=a(u,"P",{"data-svelte-h":!0}),p(k)!=="svelte-1an3odd"&&(k.innerHTML=J)},m(u,E){r(u,o,E),r(u,m,E),r(u,h,E),r(u,n,E),r(u,g,E),r(u,z,E),r(u,A,E),r(u,P,E),r(u,k,E)},p:L,d(u){u&&(t(o),t(m),t(h),t(n),t(g),t(z),t(A),t(P),t(k))}}}function Kn(x){let o,_=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=s("p"),o.innerHTML=_},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=_)},m(m,h){r(m,o,h)},p:L,d(m){m&&t(o)}}}function es(x){let o,_="Examples:",m,h,T;return h=new Ht({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(){o=s("p"),o.textContent=_,m=d(),M(h.$$.fragment)},l(n){o=a(n,"P",{"data-svelte-h":!0}),p(o)!=="svelte-kvfsh7"&&(o.textContent=_),m=c(n),y(h.$$.fragment,n)},m(n,g){r(n,o,g),r(n,m,g),w(h,n,g),T=!0},p:L,i(n){T||(b(h.$$.fragment,n),T=!0)},o(n){$(h.$$.fragment,n),T=!1},d(n){n&&(t(o),t(m)),V(h,n)}}}function ts(x){let o,_,m,h,T,n,g,U,z,A,ee="ViTMAE",P,k,J,u,E,fo,ot,Do="Overview",It,Ee,Oo=`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.`,Nt,xe,Ko="The abstract from the paper is the following:",Lt,ke,en=`<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>`,qt,Ae,tn="Tips:",Rt,Fe,on=`<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/v4.34.0/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/v4.34.0/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</a>.</li> <li>One can use <a href="/docs/transformers/v4.34.0/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>`,Bt,te,nn,St,Ce,sn='MAE architecture. Taken from the <a href="https://arxiv.org/abs/2111.06377">original paper.</a>',Gt,je,an=`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>.`,Yt,G,oe,bt,Pe,go,nt,rn="Resources",Xt,Je,ln="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ViTMAE.",Qt,Ue,dn='<li><a href="/docs/transformers/v4.34.0/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/v4.34.0/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>',Dt,ze,cn="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.",Ot,Y,ne,$t,Ze,_o,st,mn="ViTMAEConfig",Kt,Z,We,To,at,hn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/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.`,vo,rt,pn=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/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/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Mo,se,eo,X,ae,Vt,He,yo,it,un="ViTMAEModel",to,q,Ie,wo,lt,fn=`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.`,bo,W,Ne,$o,dt,gn='The <a href="/docs/transformers/v4.34.0/en/model_doc/vit_mae#transformers.ViTMAEModel">ViTMAEModel</a> forward method, overrides the <code>__call__</code> special method.',Vo,re,Eo,ie,oo,Q,le,Et,Le,xo,ct,_n="ViTMAEForPreTraining",no,F,qe,ko,mt,Tn="The ViTMAE Model transformer with the decoder on top for self-supervised pre-training.",Ao,de,Fo,ht,vn=`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.`,Co,H,Re,jo,pt,Mn='The <a href="/docs/transformers/v4.34.0/en/model_doc/vit_mae#transformers.ViTMAEForPreTraining">ViTMAEForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',Po,ce,Jo,me,so,D,he,xt,Be,Uo,ut,yn="TFViTMAEModel",ao,C,Se,zo,ft,wn=`The bare ViTMAE Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/v4.34.0/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.)`,Zo,gt,bn=`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.`,Wo,pe,Ho,I,Ge,Io,_t,$n='The <a href="/docs/transformers/v4.34.0/en/model_doc/vit_mae#transformers.TFViTMAEModel">TFViTMAEModel</a> forward method, overrides the <code>__call__</code> special method.',No,ue,Lo,fe,ro,O,ge,kt,Ye,qo,Tt,Vn="TFViTMAEForPreTraining",io,j,Xe,Ro,vt,En=`The ViTMAE Model transformer with the decoder on top for self-supervised pre-training.
This model inherits from <a href="/docs/transformers/v4.34.0/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.)`,Bo,Mt,xn=`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.`,So,_e,Go,N,Qe,Yo,yt,kn='The <a href="/docs/transformers/v4.34.0/en/model_doc/vit_mae#transformers.TFViTMAEForPreTraining">TFViTMAEForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',Xo,Te,Qo,ve,lo,At,co;return U=new Ve({}),E=new Ve({}),Pe=new Ve({}),Ze=new Ve({}),We=new K({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 12) &#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/v4.34.0/src/transformers/models/vit_mae/configuration_vit_mae.py#L29"}}),se=new Wt({props:{anchor:"transformers.ViTMAEConfig.example",$$slots:{default:[qn]},$$scope:{ctx:x}}}),He=new Ve({}),Ie=new K({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/v4.34.0/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/v4.34.0/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/v4.34.0/src/transformers/models/vit_mae/modeling_vit_mae.py#L637"}}),Ne=new K({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/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTFeatureExtractor.__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/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/vit_mae/modeling_vit_mae.py#L661",returnDescription:`
<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/v4.34.0/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:`
<p><code>transformers.models.vit_mae.modeling_vit_mae.ViTMAEModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),re=new tt({props:{$$slots:{default:[Rn]},$$scope:{ctx:x}}}),ie=new Wt({props:{anchor:"transformers.ViTMAEModel.forward.example",$$slots:{default:[Bn]},$$scope:{ctx:x}}}),Le=new Ve({}),qe=new K({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/v4.34.0/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/v4.34.0/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/v4.34.0/src/transformers/models/vit_mae/modeling_vit_mae.py#L849"}}),de=new tt({props:{$$slots:{default:[Sn]},$$scope:{ctx:x}}}),Re=new K({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/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTFeatureExtractor.__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/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/vit_mae/modeling_vit_mae.py#L962",returnDescription:`
<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/v4.34.0/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:`
<p><code>transformers.models.vit_mae.modeling_vit_mae.ViTMAEForPreTrainingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ce=new tt({props:{$$slots:{default:[Gn]},$$scope:{ctx:x}}}),me=new Wt({props:{anchor:"transformers.ViTMAEForPreTraining.forward.example",$$slots:{default:[Yn]},$$scope:{ctx:x}}}),Be=new Ve({}),Se=new K({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/v4.34.0/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/v4.34.0/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/v4.34.0/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L778"}}),pe=new tt({props:{$$slots:{default:[Xn]},$$scope:{ctx:x}}}),Ge=new K({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/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTFeatureExtractor.__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/v4.34.0/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/v4.34.0/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L787",returnDescription:`
<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/v4.34.0/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:`
<p><code>transformers.models.vit_mae.modeling_tf_vit_mae.TFViTMAEModelOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),ue=new tt({props:{$$slots:{default:[Qn]},$$scope:{ctx:x}}}),fe=new Wt({props:{anchor:"transformers.TFViTMAEModel.call.example",$$slots:{default:[Dn]},$$scope:{ctx:x}}}),Ye=new Ve({}),Xe=new K({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/v4.34.0/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/v4.34.0/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/v4.34.0/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L939"}}),_e=new tt({props:{$$slots:{default:[On]},$$scope:{ctx:x}}}),Qe=new K({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/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTFeatureExtractor.__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/v4.34.0/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/v4.34.0/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L1063",returnDescription:`
<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/v4.34.0/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:`
<p><code>transformers.models.vit_mae.modeling_tf_vit_mae.TFViTMAEForPreTrainingOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Te=new tt({props:{$$slots:{default:[Kn]},$$scope:{ctx:x}}}),ve=new Wt({props:{anchor:"transformers.TFViTMAEForPreTraining.call.example",$$slots:{default:[es]},$$scope:{ctx:x}}}),{c(){o=s("meta"),_=d(),m=s("p"),h=d(),T=s("h1"),n=s("a"),g=s("span"),M(U.$$.fragment),z=d(),A=s("span"),A.textContent=ee,P=d(),k=s("h2"),J=s("a"),u=s("span"),M(E.$$.fragment),fo=d(),ot=s("span"),ot.textContent=Do,It=d(),Ee=s("p"),Ee.innerHTML=Oo,Nt=d(),xe=s("p"),xe.textContent=Ko,Lt=d(),ke=s("p"),ke.innerHTML=en,qt=d(),Ae=s("p"),Ae.textContent=tn,Rt=d(),Fe=s("ul"),Fe.innerHTML=on,Bt=d(),te=s("img"),St=d(),Ce=s("small"),Ce.innerHTML=sn,Gt=d(),je=s("p"),je.innerHTML=an,Yt=d(),G=s("h2"),oe=s("a"),bt=s("span"),M(Pe.$$.fragment),go=d(),nt=s("span"),nt.textContent=rn,Xt=d(),Je=s("p"),Je.textContent=ln,Qt=d(),Ue=s("ul"),Ue.innerHTML=dn,Dt=d(),ze=s("p"),ze.textContent=cn,Ot=d(),Y=s("h2"),ne=s("a"),$t=s("span"),M(Ze.$$.fragment),_o=d(),st=s("span"),st.textContent=mn,Kt=d(),Z=s("div"),M(We.$$.fragment),To=d(),at=s("p"),at.innerHTML=hn,vo=d(),rt=s("p"),rt.innerHTML=pn,Mo=d(),M(se.$$.fragment),eo=d(),X=s("h2"),ae=s("a"),Vt=s("span"),M(He.$$.fragment),yo=d(),it=s("span"),it.textContent=un,to=d(),q=s("div"),M(Ie.$$.fragment),wo=d(),lt=s("p"),lt.innerHTML=fn,bo=d(),W=s("div"),M(Ne.$$.fragment),$o=d(),dt=s("p"),dt.innerHTML=gn,Vo=d(),M(re.$$.fragment),Eo=d(),M(ie.$$.fragment),oo=d(),Q=s("h2"),le=s("a"),Et=s("span"),M(Le.$$.fragment),xo=d(),ct=s("span"),ct.textContent=_n,no=d(),F=s("div"),M(qe.$$.fragment),ko=d(),mt=s("p"),mt.textContent=Tn,Ao=d(),M(de.$$.fragment),Fo=d(),ht=s("p"),ht.innerHTML=vn,Co=d(),H=s("div"),M(Re.$$.fragment),jo=d(),pt=s("p"),pt.innerHTML=Mn,Po=d(),M(ce.$$.fragment),Jo=d(),M(me.$$.fragment),so=d(),D=s("h2"),he=s("a"),xt=s("span"),M(Be.$$.fragment),Uo=d(),ut=s("span"),ut.textContent=yn,ao=d(),C=s("div"),M(Se.$$.fragment),zo=d(),ft=s("p"),ft.innerHTML=wn,Zo=d(),gt=s("p"),gt.innerHTML=bn,Wo=d(),M(pe.$$.fragment),Ho=d(),I=s("div"),M(Ge.$$.fragment),Io=d(),_t=s("p"),_t.innerHTML=$n,No=d(),M(ue.$$.fragment),Lo=d(),M(fe.$$.fragment),ro=d(),O=s("h2"),ge=s("a"),kt=s("span"),M(Ye.$$.fragment),qo=d(),Tt=s("span"),Tt.textContent=Vn,io=d(),j=s("div"),M(Xe.$$.fragment),Ro=d(),vt=s("p"),vt.innerHTML=En,Bo=d(),Mt=s("p"),Mt.innerHTML=xn,So=d(),M(_e.$$.fragment),Go=d(),N=s("div"),M(Qe.$$.fragment),Yo=d(),yt=s("p"),yt.innerHTML=kn,Xo=d(),M(Te.$$.fragment),Qo=d(),M(ve.$$.fragment),lo=d(),At=s("p"),this.h()},l(e){const i=Ln("svelte-1phssyn",document.head);o=a(i,"META",{name:!0,content:!0}),i.forEach(t),_=c(e),m=a(e,"P",{}),v(m).forEach(t),h=c(e),T=a(e,"H1",{class:!0});var De=v(T);n=a(De,"A",{id:!0,class:!0,href:!0});var Ft=v(n);g=a(Ft,"SPAN",{});var Ct=v(g);y(U.$$.fragment,Ct),Ct.forEach(t),Ft.forEach(t),z=c(De),A=a(De,"SPAN",{"data-svelte-h":!0}),p(A)!=="svelte-19nd0m9"&&(A.textContent=ee),De.forEach(t),P=c(e),k=a(e,"H2",{class:!0});var Oe=v(k);J=a(Oe,"A",{id:!0,class:!0,href:!0});var jt=v(J);u=a(jt,"SPAN",{});var Pt=v(u);y(E.$$.fragment,Pt),Pt.forEach(t),jt.forEach(t),fo=c(Oe),ot=a(Oe,"SPAN",{"data-svelte-h":!0}),p(ot)!=="svelte-1jsw1pg"&&(ot.textContent=Do),Oe.forEach(t),It=c(e),Ee=a(e,"P",{"data-svelte-h":!0}),p(Ee)!=="svelte-5dx8db"&&(Ee.innerHTML=Oo),Nt=c(e),xe=a(e,"P",{"data-svelte-h":!0}),p(xe)!=="svelte-vfdo9a"&&(xe.textContent=Ko),Lt=c(e),ke=a(e,"P",{"data-svelte-h":!0}),p(ke)!=="svelte-11f68yf"&&(ke.innerHTML=en),qt=c(e),Ae=a(e,"P",{"data-svelte-h":!0}),p(Ae)!=="svelte-axv494"&&(Ae.textContent=tn),Rt=c(e),Fe=a(e,"UL",{"data-svelte-h":!0}),p(Fe)!=="svelte-1vgbp1"&&(Fe.innerHTML=on),Bt=c(e),te=a(e,"IMG",{src:!0,alt:!0,width:!0}),St=c(e),Ce=a(e,"SMALL",{"data-svelte-h":!0}),p(Ce)!=="svelte-rtuuvp"&&(Ce.innerHTML=sn),Gt=c(e),je=a(e,"P",{"data-svelte-h":!0}),p(je)!=="svelte-3rb8sy"&&(je.innerHTML=an),Yt=c(e),G=a(e,"H2",{class:!0});var Ke=v(G);oe=a(Ke,"A",{id:!0,class:!0,href:!0});var Jt=v(oe);bt=a(Jt,"SPAN",{});var Ut=v(bt);y(Pe.$$.fragment,Ut),Ut.forEach(t),Jt.forEach(t),go=c(Ke),nt=a(Ke,"SPAN",{"data-svelte-h":!0}),p(nt)!=="svelte-w4zzv6"&&(nt.textContent=rn),Ke.forEach(t),Xt=c(e),Je=a(e,"P",{"data-svelte-h":!0}),p(Je)!=="svelte-15wot93"&&(Je.textContent=ln),Qt=c(e),Ue=a(e,"UL",{"data-svelte-h":!0}),p(Ue)!=="svelte-ahglwb"&&(Ue.innerHTML=dn),Dt=c(e),ze=a(e,"P",{"data-svelte-h":!0}),p(ze)!=="svelte-1xesile"&&(ze.textContent=cn),Ot=c(e),Y=a(e,"H2",{class:!0});var et=v(Y);ne=a(et,"A",{id:!0,class:!0,href:!0});var zt=v(ne);$t=a(zt,"SPAN",{});var Zt=v($t);y(Ze.$$.fragment,Zt),Zt.forEach(t),zt.forEach(t),_o=c(et),st=a(et,"SPAN",{"data-svelte-h":!0}),p(st)!=="svelte-tru477"&&(st.textContent=mn),et.forEach(t),Kt=c(e),Z=a(e,"DIV",{class:!0});var Me=v(Z);y(We.$$.fragment,Me),To=c(Me),at=a(Me,"P",{"data-svelte-h":!0}),p(at)!=="svelte-1e9et1t"&&(at.innerHTML=hn),vo=c(Me),rt=a(Me,"P",{"data-svelte-h":!0}),p(rt)!=="svelte-10kqkkl"&&(rt.innerHTML=pn),Mo=c(Me),y(se.$$.fragment,Me),Me.forEach(t),eo=c(e),X=a(e,"H2",{class:!0});var mo=v(X);ae=a(mo,"A",{id:!0,class:!0,href:!0});var An=v(ae);Vt=a(An,"SPAN",{});var Fn=v(Vt);y(He.$$.fragment,Fn),Fn.forEach(t),An.forEach(t),yo=c(mo),it=a(mo,"SPAN",{"data-svelte-h":!0}),p(it)!=="svelte-1kwfs5e"&&(it.textContent=un),mo.forEach(t),to=c(e),q=a(e,"DIV",{class:!0});var wt=v(q);y(Ie.$$.fragment,wt),wo=c(wt),lt=a(wt,"P",{"data-svelte-h":!0}),p(lt)!=="svelte-okthft"&&(lt.innerHTML=fn),bo=c(wt),W=a(wt,"DIV",{class:!0});var ye=v(W);y(Ne.$$.fragment,ye),$o=c(ye),dt=a(ye,"P",{"data-svelte-h":!0}),p(dt)!=="svelte-1jlf0h6"&&(dt.innerHTML=gn),Vo=c(ye),y(re.$$.fragment,ye),Eo=c(ye),y(ie.$$.fragment,ye),ye.forEach(t),wt.forEach(t),oo=c(e),Q=a(e,"H2",{class:!0});var ho=v(Q);le=a(ho,"A",{id:!0,class:!0,href:!0});var Cn=v(le);Et=a(Cn,"SPAN",{});var jn=v(Et);y(Le.$$.fragment,jn),jn.forEach(t),Cn.forEach(t),xo=c(ho),ct=a(ho,"SPAN",{"data-svelte-h":!0}),p(ct)!=="svelte-phr4ov"&&(ct.textContent=_n),ho.forEach(t),no=c(e),F=a(e,"DIV",{class:!0});var R=v(F);y(qe.$$.fragment,R),ko=c(R),mt=a(R,"P",{"data-svelte-h":!0}),p(mt)!=="svelte-10cjq04"&&(mt.textContent=Tn),Ao=c(R),y(de.$$.fragment,R),Fo=c(R),ht=a(R,"P",{"data-svelte-h":!0}),p(ht)!=="svelte-1gjh92c"&&(ht.innerHTML=vn),Co=c(R),H=a(R,"DIV",{class:!0});var we=v(H);y(Re.$$.fragment,we),jo=c(we),pt=a(we,"P",{"data-svelte-h":!0}),p(pt)!=="svelte-1ccrcfm"&&(pt.innerHTML=Mn),Po=c(we),y(ce.$$.fragment,we),Jo=c(we),y(me.$$.fragment,we),we.forEach(t),R.forEach(t),so=c(e),D=a(e,"H2",{class:!0});var po=v(D);he=a(po,"A",{id:!0,class:!0,href:!0});var Pn=v(he);xt=a(Pn,"SPAN",{});var Jn=v(xt);y(Be.$$.fragment,Jn),Jn.forEach(t),Pn.forEach(t),Uo=c(po),ut=a(po,"SPAN",{"data-svelte-h":!0}),p(ut)!=="svelte-13rsc8k"&&(ut.textContent=yn),po.forEach(t),ao=c(e),C=a(e,"DIV",{class:!0});var B=v(C);y(Se.$$.fragment,B),zo=c(B),ft=a(B,"P",{"data-svelte-h":!0}),p(ft)!=="svelte-1hcz891"&&(ft.innerHTML=wn),Zo=c(B),gt=a(B,"P",{"data-svelte-h":!0}),p(gt)!=="svelte-1ivrf8m"&&(gt.innerHTML=bn),Wo=c(B),y(pe.$$.fragment,B),Ho=c(B),I=a(B,"DIV",{class:!0});var be=v(I);y(Ge.$$.fragment,be),Io=c(be),_t=a(be,"P",{"data-svelte-h":!0}),p(_t)!=="svelte-1uwv2bu"&&(_t.innerHTML=$n),No=c(be),y(ue.$$.fragment,be),Lo=c(be),y(fe.$$.fragment,be),be.forEach(t),B.forEach(t),ro=c(e),O=a(e,"H2",{class:!0});var uo=v(O);ge=a(uo,"A",{id:!0,class:!0,href:!0});var Un=v(ge);kt=a(Un,"SPAN",{});var zn=v(kt);y(Ye.$$.fragment,zn),zn.forEach(t),Un.forEach(t),qo=c(uo),Tt=a(uo,"SPAN",{"data-svelte-h":!0}),p(Tt)!=="svelte-p4ch5"&&(Tt.textContent=Vn),uo.forEach(t),io=c(e),j=a(e,"DIV",{class:!0});var S=v(j);y(Xe.$$.fragment,S),Ro=c(S),vt=a(S,"P",{"data-svelte-h":!0}),p(vt)!=="svelte-f37c1a"&&(vt.innerHTML=En),Bo=c(S),Mt=a(S,"P",{"data-svelte-h":!0}),p(Mt)!=="svelte-1ivrf8m"&&(Mt.innerHTML=xn),So=c(S),y(_e.$$.fragment,S),Go=c(S),N=a(S,"DIV",{class:!0});var $e=v(N);y(Qe.$$.fragment,$e),Yo=c($e),yt=a($e,"P",{"data-svelte-h":!0}),p(yt)!=="svelte-qygigq"&&(yt.innerHTML=kn),Xo=c($e),y(Te.$$.fragment,$e),Qo=c($e),y(ve.$$.fragment,$e),$e.forEach(t),S.forEach(t),lo=c(e),At=a(e,"P",{}),v(At).forEach(t),this.h()},h(){f(o,"name","hf:doc:metadata"),f(o,"content",JSON.stringify(os)),f(n,"id","vitmae"),f(n,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(n,"href","#vitmae"),f(T,"class","relative group"),f(J,"id","overview"),f(J,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(J,"href","#overview"),f(k,"class","relative group"),Wn(te.src,nn="https://user-images.githubusercontent.com/11435359/146857310-f258c86c-fde6-48e8-9cee-badd2b21bd2c.png")||f(te,"src",nn),f(te,"alt","drawing"),f(te,"width","600"),f(oe,"id","resources"),f(oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(oe,"href","#resources"),f(G,"class","relative group"),f(ne,"id","transformers.ViTMAEConfig"),f(ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ne,"href","#transformers.ViTMAEConfig"),f(Y,"class","relative group"),f(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ae,"id","transformers.ViTMAEModel"),f(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ae,"href","#transformers.ViTMAEModel"),f(X,"class","relative group"),f(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(le,"id","transformers.ViTMAEForPreTraining"),f(le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(le,"href","#transformers.ViTMAEForPreTraining"),f(Q,"class","relative group"),f(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(he,"id","transformers.TFViTMAEModel"),f(he,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(he,"href","#transformers.TFViTMAEModel"),f(D,"class","relative group"),f(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ge,"id","transformers.TFViTMAEForPreTraining"),f(ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ge,"href","#transformers.TFViTMAEForPreTraining"),f(O,"class","relative group"),f(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,i){l(document.head,o),r(e,_,i),r(e,m,i),r(e,h,i),r(e,T,i),l(T,n),l(n,g),w(U,g,null),l(T,z),l(T,A),r(e,P,i),r(e,k,i),l(k,J),l(J,u),w(E,u,null),l(k,fo),l(k,ot),r(e,It,i),r(e,Ee,i),r(e,Nt,i),r(e,xe,i),r(e,Lt,i),r(e,ke,i),r(e,qt,i),r(e,Ae,i),r(e,Rt,i),r(e,Fe,i),r(e,Bt,i),r(e,te,i),r(e,St,i),r(e,Ce,i),r(e,Gt,i),r(e,je,i),r(e,Yt,i),r(e,G,i),l(G,oe),l(oe,bt),w(Pe,bt,null),l(G,go),l(G,nt),r(e,Xt,i),r(e,Je,i),r(e,Qt,i),r(e,Ue,i),r(e,Dt,i),r(e,ze,i),r(e,Ot,i),r(e,Y,i),l(Y,ne),l(ne,$t),w(Ze,$t,null),l(Y,_o),l(Y,st),r(e,Kt,i),r(e,Z,i),w(We,Z,null),l(Z,To),l(Z,at),l(Z,vo),l(Z,rt),l(Z,Mo),w(se,Z,null),r(e,eo,i),r(e,X,i),l(X,ae),l(ae,Vt),w(He,Vt,null),l(X,yo),l(X,it),r(e,to,i),r(e,q,i),w(Ie,q,null),l(q,wo),l(q,lt),l(q,bo),l(q,W),w(Ne,W,null),l(W,$o),l(W,dt),l(W,Vo),w(re,W,null),l(W,Eo),w(ie,W,null),r(e,oo,i),r(e,Q,i),l(Q,le),l(le,Et),w(Le,Et,null),l(Q,xo),l(Q,ct),r(e,no,i),r(e,F,i),w(qe,F,null),l(F,ko),l(F,mt),l(F,Ao),w(de,F,null),l(F,Fo),l(F,ht),l(F,Co),l(F,H),w(Re,H,null),l(H,jo),l(H,pt),l(H,Po),w(ce,H,null),l(H,Jo),w(me,H,null),r(e,so,i),r(e,D,i),l(D,he),l(he,xt),w(Be,xt,null),l(D,Uo),l(D,ut),r(e,ao,i),r(e,C,i),w(Se,C,null),l(C,zo),l(C,ft),l(C,Zo),l(C,gt),l(C,Wo),w(pe,C,null),l(C,Ho),l(C,I),w(Ge,I,null),l(I,Io),l(I,_t),l(I,No),w(ue,I,null),l(I,Lo),w(fe,I,null),r(e,ro,i),r(e,O,i),l(O,ge),l(ge,kt),w(Ye,kt,null),l(O,qo),l(O,Tt),r(e,io,i),r(e,j,i),w(Xe,j,null),l(j,Ro),l(j,vt),l(j,Bo),l(j,Mt),l(j,So),w(_e,j,null),l(j,Go),l(j,N),w(Qe,N,null),l(N,Yo),l(N,yt),l(N,Xo),w(Te,N,null),l(N,Qo),w(ve,N,null),r(e,lo,i),r(e,At,i),co=!0},p(e,[i]){const De={};i&2&&(De.$$scope={dirty:i,ctx:e}),se.$set(De);const Ft={};i&2&&(Ft.$$scope={dirty:i,ctx:e}),re.$set(Ft);const Ct={};i&2&&(Ct.$$scope={dirty:i,ctx:e}),ie.$set(Ct);const Oe={};i&2&&(Oe.$$scope={dirty:i,ctx:e}),de.$set(Oe);const jt={};i&2&&(jt.$$scope={dirty:i,ctx:e}),ce.$set(jt);const Pt={};i&2&&(Pt.$$scope={dirty:i,ctx:e}),me.$set(Pt);const Ke={};i&2&&(Ke.$$scope={dirty:i,ctx:e}),pe.$set(Ke);const Jt={};i&2&&(Jt.$$scope={dirty:i,ctx:e}),ue.$set(Jt);const Ut={};i&2&&(Ut.$$scope={dirty:i,ctx:e}),fe.$set(Ut);const et={};i&2&&(et.$$scope={dirty:i,ctx:e}),_e.$set(et);const zt={};i&2&&(zt.$$scope={dirty:i,ctx:e}),Te.$set(zt);const Zt={};i&2&&(Zt.$$scope={dirty:i,ctx:e}),ve.$set(Zt)},i(e){co||(b(U.$$.fragment,e),b(E.$$.fragment,e),b(Pe.$$.fragment,e),b(Ze.$$.fragment,e),b(We.$$.fragment,e),b(se.$$.fragment,e),b(He.$$.fragment,e),b(Ie.$$.fragment,e),b(Ne.$$.fragment,e),b(re.$$.fragment,e),b(ie.$$.fragment,e),b(Le.$$.fragment,e),b(qe.$$.fragment,e),b(de.$$.fragment,e),b(Re.$$.fragment,e),b(ce.$$.fragment,e),b(me.$$.fragment,e),b(Be.$$.fragment,e),b(Se.$$.fragment,e),b(pe.$$.fragment,e),b(Ge.$$.fragment,e),b(ue.$$.fragment,e),b(fe.$$.fragment,e),b(Ye.$$.fragment,e),b(Xe.$$.fragment,e),b(_e.$$.fragment,e),b(Qe.$$.fragment,e),b(Te.$$.fragment,e),b(ve.$$.fragment,e),co=!0)},o(e){$(U.$$.fragment,e),$(E.$$.fragment,e),$(Pe.$$.fragment,e),$(Ze.$$.fragment,e),$(We.$$.fragment,e),$(se.$$.fragment,e),$(He.$$.fragment,e),$(Ie.$$.fragment,e),$(Ne.$$.fragment,e),$(re.$$.fragment,e),$(ie.$$.fragment,e),$(Le.$$.fragment,e),$(qe.$$.fragment,e),$(de.$$.fragment,e),$(Re.$$.fragment,e),$(ce.$$.fragment,e),$(me.$$.fragment,e),$(Be.$$.fragment,e),$(Se.$$.fragment,e),$(pe.$$.fragment,e),$(Ge.$$.fragment,e),$(ue.$$.fragment,e),$(fe.$$.fragment,e),$(Ye.$$.fragment,e),$(Xe.$$.fragment,e),$(_e.$$.fragment,e),$(Qe.$$.fragment,e),$(Te.$$.fragment,e),$(ve.$$.fragment,e),co=!1},d(e){e&&(t(_),t(m),t(h),t(T),t(P),t(k),t(It),t(Ee),t(Nt),t(xe),t(Lt),t(ke),t(qt),t(Ae),t(Rt),t(Fe),t(Bt),t(te),t(St),t(Ce),t(Gt),t(je),t(Yt),t(G),t(Xt),t(Je),t(Qt),t(Ue),t(Dt),t(ze),t(Ot),t(Y),t(Kt),t(Z),t(eo),t(X),t(to),t(q),t(oo),t(Q),t(no),t(F),t(so),t(D),t(ao),t(C),t(ro),t(O),t(io),t(j),t(lo),t(At)),t(o),V(U),V(E),V(Pe),V(Ze),V(We),V(se),V(He),V(Ie),V(Ne),V(re),V(ie),V(Le),V(qe),V(de),V(Re),V(ce),V(me),V(Be),V(Se),V(pe),V(Ge),V(ue),V(fe),V(Ye),V(Xe),V(_e),V(Qe),V(Te),V(ve)}}}const os={local:"vitmae",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.ViTMAEConfig",title:"ViTMAEConfig"},{local:"transformers.ViTMAEModel",title:"ViTMAEModel"},{local:"transformers.ViTMAEForPreTraining",title:"ViTMAEForPreTraining"},{local:"transformers.TFViTMAEModel",title:"TFViTMAEModel"},{local:"transformers.TFViTMAEForPreTraining",title:"TFViTMAEForPreTraining"}],title:"ViTMAE"};function ns(x){return Hn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ms extends In{constructor(o){super(),Nn(this,o,ns,ts,Zn,{})}}export{ms as component};
