import{s as ol,o as sl,n as F}from"../chunks/scheduler.9bc65507.js";import{S as al,i as nl,g as n,s as i,u,A as rl,h as r,f as t,c as d,j as g,v as _,y as f,k as h,o as s,a as m,w as T,d as b,t as v,x as y}from"../chunks/index.78c82d43.js";import{T as Q}from"../chunks/Tip.87d55b76.js";import{D as k}from"../chunks/Docstring.4e7352e2.js";import{C as he}from"../chunks/CodeBlock.73e038be.js";import{I as W}from"../chunks/IconCopyLink.bedaa44d.js";import{E as pe}from"../chunks/ExampleCodeBlock.872b014d.js";import{P as ll}from"../chunks/PipelineTag.75b0f707.js";function il(C){let o,M=`This is a recently introduced model so the API hasn’t been tested extensively. There may be some bugs or slight
breaking changes to fix it in the future. If you see something strange, file a <a href="https://github.com/huggingface/transformers/issues/new?assignees=&amp;labels=&amp;template=bug-report.md&amp;title" rel="nofollow">Github Issue</a>.`;return{c(){o=n("p"),o.innerHTML=M},l(c){o=r(c,"P",{"data-svelte-h":!0}),f(o)!=="svelte-j665pk"&&(o.innerHTML=M)},m(c,p){m(c,o,p)},p:F,d(c){c&&t(o)}}}function dl(C){let o,M="Example:",c,p,w;return p=new he({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERlaVRDb25maWclMkMlMjBEZWlUTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwRGVpVCUyMGRlaXQtYmFzZS1kaXN0aWxsZWQtcGF0Y2gxNi0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwRGVpVENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBkZWl0LWJhc2UtZGlzdGlsbGVkLXBhdGNoMTYtMjI0JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBEZWlUTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DeiTConfig, DeiTModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a DeiT deit-base-distilled-patch16-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = DeiTConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the deit-base-distilled-patch16-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DeiTModel(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=n("p"),o.textContent=M,c=i(),u(p.$$.fragment)},l(a){o=r(a,"P",{"data-svelte-h":!0}),f(o)!=="svelte-11lpom8"&&(o.textContent=M),c=d(a),_(p.$$.fragment,a)},m(a,$){m(a,o,$),m(a,c,$),T(p,a,$),w=!0},p:F,i(a){w||(b(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(t(o),t(c)),y(p,a)}}}function cl(C){let o,M=`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=n("p"),o.innerHTML=M},l(c){o=r(c,"P",{"data-svelte-h":!0}),f(o)!=="svelte-fincs2"&&(o.innerHTML=M)},m(c,p){m(c,o,p)},p:F,d(c){c&&t(o)}}}function ml(C){let o,M="Example:",c,p,w;return p=new he({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERlaVRNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZkZWl0LWJhc2UtZGlzdGlsbGVkLXBhdGNoMTYtMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwRGVpVE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmRlaXQtYmFzZS1kaXN0aWxsZWQtcGF0Y2gxNi0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DeiTModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DeiTModel.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">198</span>, <span class="hljs-number">768</span>]`,wrap:!1}}),{c(){o=n("p"),o.textContent=M,c=i(),u(p.$$.fragment)},l(a){o=r(a,"P",{"data-svelte-h":!0}),f(o)!=="svelte-11lpom8"&&(o.textContent=M),c=d(a),_(p.$$.fragment,a)},m(a,$){m(a,o,$),m(a,c,$),T(p,a,$),w=!0},p:F,i(a){w||(b(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(t(o),t(c)),y(p,a)}}}function pl(C){let o,M=`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=n("p"),o.innerHTML=M},l(c){o=r(c,"P",{"data-svelte-h":!0}),f(o)!=="svelte-7i3y9o"&&(o.innerHTML=M)},m(c,p){m(c,o,p)},p:F,d(c){c&&t(o)}}}function hl(C){let o,M=`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=n("p"),o.innerHTML=M},l(c){o=r(c,"P",{"data-svelte-h":!0}),f(o)!=="svelte-fincs2"&&(o.innerHTML=M)},m(c,p){m(c,o,p)},p:F,d(c){c&&t(o)}}}function fl(C){let o,M="Examples:",c,p,w;return p=new he({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERlaVRGb3JNYXNrZWRJbWFnZU1vZGVsaW5nJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGZGVpdC1iYXNlLWRpc3RpbGxlZC1wYXRjaDE2LTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMERlaVRGb3JNYXNrZWRJbWFnZU1vZGVsaW5nLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmRlaXQtYmFzZS1kaXN0aWxsZWQtcGF0Y2gxNi0yMjQlMjIpJTBBJTBBbnVtX3BhdGNoZXMlMjAlM0QlMjAobW9kZWwuY29uZmlnLmltYWdlX3NpemUlMjAlMkYlMkYlMjBtb2RlbC5jb25maWcucGF0Y2hfc2l6ZSklMjAqKiUyMDIlMEFwaXhlbF92YWx1ZXMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKS5waXhlbF92YWx1ZXMlMEElMjMlMjBjcmVhdGUlMjByYW5kb20lMjBib29sZWFuJTIwbWFzayUyMG9mJTIwc2hhcGUlMjAoYmF0Y2hfc2l6ZSUyQyUyMG51bV9wYXRjaGVzKSUwQWJvb2xfbWFza2VkX3BvcyUyMCUzRCUyMHRvcmNoLnJhbmRpbnQobG93JTNEMCUyQyUyMGhpZ2glM0QyJTJDJTIwc2l6ZSUzRCgxJTJDJTIwbnVtX3BhdGNoZXMpKS5ib29sKCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwocGl4ZWxfdmFsdWVzJTJDJTIwYm9vbF9tYXNrZWRfcG9zJTNEYm9vbF9tYXNrZWRfcG9zKSUwQWxvc3MlMkMlMjByZWNvbnN0cnVjdGVkX3BpeGVsX3ZhbHVlcyUyMCUzRCUyMG91dHB1dHMubG9zcyUyQyUyMG91dHB1dHMucmVjb25zdHJ1Y3Rpb24lMEFsaXN0KHJlY29uc3RydWN0ZWRfcGl4ZWxfdmFsdWVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DeiTForMaskedImageModeling
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

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

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DeiTForMaskedImageModeling.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>num_patches = (model.config.image_size // model.config.patch_size) ** <span class="hljs-number">2</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pixel_values = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).pixel_values
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># create random boolean mask of shape (batch_size, num_patches)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>bool_masked_pos = torch.randint(low=<span class="hljs-number">0</span>, high=<span class="hljs-number">2</span>, size=(<span class="hljs-number">1</span>, num_patches)).<span class="hljs-built_in">bool</span>()

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(pixel_values, bool_masked_pos=bool_masked_pos)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss, reconstructed_pixel_values = outputs.loss, outputs.reconstruction
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(reconstructed_pixel_values.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">3</span>, <span class="hljs-number">224</span>, <span class="hljs-number">224</span>]`,wrap:!1}}),{c(){o=n("p"),o.textContent=M,c=i(),u(p.$$.fragment)},l(a){o=r(a,"P",{"data-svelte-h":!0}),f(o)!=="svelte-kvfsh7"&&(o.textContent=M),c=d(a),_(p.$$.fragment,a)},m(a,$){m(a,o,$),m(a,c,$),T(p,a,$),w=!0},p:F,i(a){w||(b(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(t(o),t(c)),y(p,a)}}}function gl(C){let o,M=`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=n("p"),o.innerHTML=M},l(c){o=r(c,"P",{"data-svelte-h":!0}),f(o)!=="svelte-fincs2"&&(o.innerHTML=M)},m(c,p){m(c,o,p)},p:F,d(c){c&&t(o)}}}function ul(C){let o,M="Examples:",c,p,w;return p=new he({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERlaVRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQXRvcmNoLm1hbnVhbF9zZWVkKDMpJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQSUyMyUyMG5vdGUlM0ElMjB3ZSUyMGFyZSUyMGxvYWRpbmclMjBhJTIwRGVpVEZvckltYWdlQ2xhc3NpZmljYXRpb25XaXRoVGVhY2hlciUyMGZyb20lMjB0aGUlMjBodWIlMjBoZXJlJTJDJTBBJTIzJTIwc28lMjB0aGUlMjBoZWFkJTIwd2lsbCUyMGJlJTIwcmFuZG9tbHklMjBpbml0aWFsaXplZCUyQyUyMGhlbmNlJTIwdGhlJTIwcHJlZGljdGlvbnMlMjB3aWxsJTIwYmUlMjByYW5kb20lMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGZGVpdC1iYXNlLWRpc3RpbGxlZC1wYXRjaDE2LTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMERlaVRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmRlaXQtYmFzZS1kaXN0aWxsZWQtcGF0Y2gxNi0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2NsYXNzX2lkeCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpLml0ZW0oKSUwQXByaW50KCUyMlByZWRpY3RlZCUyMGNsYXNzJTNBJTIyJTJDJTIwbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2NsYXNzX2lkeCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DeiTForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># note: we are loading a DeiTForImageClassificationWithTeacher from the hub here,</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># so the head will be randomly initialized, hence the predictions will be random</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DeiTForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&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>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_idx = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Predicted class:&quot;</span>, model.config.id2label[predicted_class_idx])
Predicted <span class="hljs-keyword">class</span>: magpie`,wrap:!1}}),{c(){o=n("p"),o.textContent=M,c=i(),u(p.$$.fragment)},l(a){o=r(a,"P",{"data-svelte-h":!0}),f(o)!=="svelte-kvfsh7"&&(o.textContent=M),c=d(a),_(p.$$.fragment,a)},m(a,$){m(a,o,$),m(a,c,$),T(p,a,$),w=!0},p:F,i(a){w||(b(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(t(o),t(c)),y(p,a)}}}function _l(C){let o,M=`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=n("p"),o.innerHTML=M},l(c){o=r(c,"P",{"data-svelte-h":!0}),f(o)!=="svelte-fincs2"&&(o.innerHTML=M)},m(c,p){m(c,o,p)},p:F,d(c){c&&t(o)}}}function Tl(C){let o,M="Example:",c,p,w;return p=new he({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERlaVRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uV2l0aFRlYWNoZXIlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGZGVpdC1iYXNlLWRpc3RpbGxlZC1wYXRjaDE2LTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMERlaVRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uV2l0aFRlYWNoZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGZGVpdC1iYXNlLWRpc3RpbGxlZC1wYXRjaDE2LTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpLml0ZW0oKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DeiTForImageClassificationWithTeacher
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DeiTForImageClassificationWithTeacher.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`,wrap:!1}}),{c(){o=n("p"),o.textContent=M,c=i(),u(p.$$.fragment)},l(a){o=r(a,"P",{"data-svelte-h":!0}),f(o)!=="svelte-11lpom8"&&(o.textContent=M),c=d(a),_(p.$$.fragment,a)},m(a,$){m(a,o,$),m(a,c,$),T(p,a,$),w=!0},p:F,i(a){w||(b(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(t(o),t(c)),y(p,a)}}}function bl(C){let o,M=`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=n("p"),o.innerHTML=M},l(c){o=r(c,"P",{"data-svelte-h":!0}),f(o)!=="svelte-fincs2"&&(o.innerHTML=M)},m(c,p){m(c,o,p)},p:F,d(c){c&&t(o)}}}function vl(C){let o,M="Example:",c,p,w;return p=new he({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGRGVpVE1vZGVsJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZkZWl0LWJhc2UtZGlzdGlsbGVkLXBhdGNoMTYtMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZEZWlUTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGZGVpdC1iYXNlLWRpc3RpbGxlZC1wYXRjaDE2LTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBbGlzdChsYXN0X2hpZGRlbl9zdGF0ZXMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFDeiTModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDeiTModel.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">198</span>, <span class="hljs-number">768</span>]`,wrap:!1}}),{c(){o=n("p"),o.textContent=M,c=i(),u(p.$$.fragment)},l(a){o=r(a,"P",{"data-svelte-h":!0}),f(o)!=="svelte-11lpom8"&&(o.textContent=M),c=d(a),_(p.$$.fragment,a)},m(a,$){m(a,o,$),m(a,c,$),T(p,a,$),w=!0},p:F,i(a){w||(b(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(t(o),t(c)),y(p,a)}}}function yl(C){let o,M=`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=n("p"),o.innerHTML=M},l(c){o=r(c,"P",{"data-svelte-h":!0}),f(o)!=="svelte-fincs2"&&(o.innerHTML=M)},m(c,p){m(c,o,p)},p:F,d(c){c&&t(o)}}}function Ml(C){let o,M="Examples:",c,p,w;return p=new he({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGRGVpVEZvck1hc2tlZEltYWdlTW9kZWxpbmclMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZkZWl0LWJhc2UtZGlzdGlsbGVkLXBhdGNoMTYtMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZEZWlURm9yTWFza2VkSW1hZ2VNb2RlbGluZy5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZkZWl0LWJhc2UtZGlzdGlsbGVkLXBhdGNoMTYtMjI0JTIyKSUwQSUwQW51bV9wYXRjaGVzJTIwJTNEJTIwKG1vZGVsLmNvbmZpZy5pbWFnZV9zaXplJTIwJTJGJTJGJTIwbW9kZWwuY29uZmlnLnBhdGNoX3NpemUpJTIwKiolMjAyJTBBcGl4ZWxfdmFsdWVzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMikucGl4ZWxfdmFsdWVzJTBBJTIzJTIwY3JlYXRlJTIwcmFuZG9tJTIwYm9vbGVhbiUyMG1hc2slMjBvZiUyMHNoYXBlJTIwKGJhdGNoX3NpemUlMkMlMjBudW1fcGF0Y2hlcyklMEFib29sX21hc2tlZF9wb3MlMjAlM0QlMjB0Zi5jYXN0KHRmLnJhbmRvbS51bmlmb3JtKCgxJTJDJTIwbnVtX3BhdGNoZXMpJTJDJTIwbWludmFsJTNEMCUyQyUyMG1heHZhbCUzRDIlMkMlMjBkdHlwZSUzRHRmLmludDMyKSUyQyUyMHRmLmJvb2wpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKHBpeGVsX3ZhbHVlcyUyQyUyMGJvb2xfbWFza2VkX3BvcyUzRGJvb2xfbWFza2VkX3BvcyklMEFsb3NzJTJDJTIwcmVjb25zdHJ1Y3RlZF9waXhlbF92YWx1ZXMlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMkMlMjBvdXRwdXRzLnJlY29uc3RydWN0aW9uJTBBbGlzdChyZWNvbnN0cnVjdGVkX3BpeGVsX3ZhbHVlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFDeiTForMaskedImageModeling
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<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/deit-base-distilled-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDeiTForMaskedImageModeling.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>num_patches = (model.config.image_size // model.config.patch_size) ** <span class="hljs-number">2</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pixel_values = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>).pixel_values
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># create random boolean mask of shape (batch_size, num_patches)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>bool_masked_pos = tf.cast(tf.random.uniform((<span class="hljs-number">1</span>, num_patches), minval=<span class="hljs-number">0</span>, maxval=<span class="hljs-number">2</span>, dtype=tf.int32), tf.<span class="hljs-built_in">bool</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(pixel_values, bool_masked_pos=bool_masked_pos)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss, reconstructed_pixel_values = outputs.loss, outputs.reconstruction
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(reconstructed_pixel_values.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">3</span>, <span class="hljs-number">224</span>, <span class="hljs-number">224</span>]`,wrap:!1}}),{c(){o=n("p"),o.textContent=M,c=i(),u(p.$$.fragment)},l(a){o=r(a,"P",{"data-svelte-h":!0}),f(o)!=="svelte-kvfsh7"&&(o.textContent=M),c=d(a),_(p.$$.fragment,a)},m(a,$){m(a,o,$),m(a,c,$),T(p,a,$),w=!0},p:F,i(a){w||(b(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(t(o),t(c)),y(p,a)}}}function wl(C){let o,M=`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=n("p"),o.innerHTML=M},l(c){o=r(c,"P",{"data-svelte-h":!0}),f(o)!=="svelte-fincs2"&&(o.innerHTML=M)},m(c,p){m(c,o,p)},p:F,d(c){c&&t(o)}}}function $l(C){let o,M="Examples:",c,p,w;return p=new he({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGRGVpVEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdGYua2VyYXMudXRpbHMuc2V0X3JhbmRvbV9zZWVkKDMpJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQSUyMyUyMG5vdGUlM0ElMjB3ZSUyMGFyZSUyMGxvYWRpbmclMjBhJTIwVEZEZWlURm9ySW1hZ2VDbGFzc2lmaWNhdGlvbldpdGhUZWFjaGVyJTIwZnJvbSUyMHRoZSUyMGh1YiUyMGhlcmUlMkMlMEElMjMlMjBzbyUyMHRoZSUyMGhlYWQlMjB3aWxsJTIwYmUlMjByYW5kb21seSUyMGluaXRpYWxpemVkJTJDJTIwaGVuY2UlMjB0aGUlMjBwcmVkaWN0aW9ucyUyMHdpbGwlMjBiZSUyMHJhbmRvbSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZkZWl0LWJhc2UtZGlzdGlsbGVkLXBhdGNoMTYtMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZEZWlURm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZkZWl0LWJhc2UtZGlzdGlsbGVkLXBhdGNoMTYtMjI0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9jbGFzc19pZHglMjAlM0QlMjB0Zi5tYXRoLmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCUwQXByaW50KCUyMlByZWRpY3RlZCUyMGNsYXNzJTNBJTIyJTJDJTIwbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCaW50KHByZWRpY3RlZF9jbGFzc19pZHgpJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFDeiTForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<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>tf.keras.utils.set_random_seed(<span class="hljs-number">3</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># note: we are loading a TFDeiTForImageClassificationWithTeacher from the hub here,</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># so the head will be randomly initialized, hence the predictions will be random</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDeiTForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&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>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_idx = tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Predicted class:&quot;</span>, model.config.id2label[<span class="hljs-built_in">int</span>(predicted_class_idx)])
Predicted <span class="hljs-keyword">class</span>: little blue heron, Egretta caerulea`,wrap:!1}}),{c(){o=n("p"),o.textContent=M,c=i(),u(p.$$.fragment)},l(a){o=r(a,"P",{"data-svelte-h":!0}),f(o)!=="svelte-kvfsh7"&&(o.textContent=M),c=d(a),_(p.$$.fragment,a)},m(a,$){m(a,o,$),m(a,c,$),T(p,a,$),w=!0},p:F,i(a){w||(b(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(t(o),t(c)),y(p,a)}}}function Cl(C){let o,M=`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=n("p"),o.innerHTML=M},l(c){o=r(c,"P",{"data-svelte-h":!0}),f(o)!=="svelte-fincs2"&&(o.innerHTML=M)},m(c,p){m(c,o,p)},p:F,d(c){c&&t(o)}}}function kl(C){let o,M="Example:",c,p,w;return p=new he({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGRGVpVEZvckltYWdlQ2xhc3NpZmljYXRpb25XaXRoVGVhY2hlciUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZkZWl0LWJhc2UtZGlzdGlsbGVkLXBhdGNoMTYtMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZEZWlURm9ySW1hZ2VDbGFzc2lmaWNhdGlvbldpdGhUZWFjaGVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmRlaXQtYmFzZS1kaXN0aWxsZWQtcGF0Y2gxNi0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFDeiTForImageClassificationWithTeacher
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFDeiTForImageClassificationWithTeacher.from_pretrained(<span class="hljs-string">&quot;facebook/deit-base-distilled-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`,wrap:!1}}),{c(){o=n("p"),o.textContent=M,c=i(),u(p.$$.fragment)},l(a){o=r(a,"P",{"data-svelte-h":!0}),f(o)!=="svelte-11lpom8"&&(o.textContent=M),c=d(a),_(p.$$.fragment,a)},m(a,$){m(a,o,$),m(a,c,$),T(p,a,$),w=!0},p:F,i(a){w||(b(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(t(o),t(c)),y(p,a)}}}function Fl(C){let o,M,c,p,w,a,$,at,Ta,no,zn="DeiT",$s,fe,Cs,O,ge,es,nt,ba,ro,Gn="Overview",ks,rt,Rn=`The DeiT model was proposed in <a href="https://arxiv.org/abs/2012.12877" rel="nofollow">Training data-efficient image transformers &amp; distillation through attention</a> by Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre
Sablayrolles, Hervé Jégou. The <a href="vit">Vision Transformer (ViT)</a> introduced in <a href="https://arxiv.org/abs/2010.11929" rel="nofollow">Dosovitskiy et al., 2020</a> has shown that one can match or even outperform existing convolutional neural
networks using a Transformer encoder (BERT-like). However, the ViT models introduced in that paper required training on
expensive infrastructure for multiple weeks, using external data. DeiT (data-efficient image transformers) are more
efficiently trained transformers for image classification, requiring far less data and far less computing resources
compared to the original ViT models.`,Fs,lt,Bn="The abstract from the paper is the following:",Is,it,Vn=`<em>Recently, neural networks purely based on attention were shown to address image understanding tasks such as image
classification. However, these visual transformers are pre-trained with hundreds of millions of images using an
expensive infrastructure, thereby limiting their adoption. In this work, we produce a competitive convolution-free
transformer by training on Imagenet only. We train them on a single computer in less than 3 days. Our reference vision
transformer (86M parameters) achieves top-1 accuracy of 83.1% (single-crop evaluation) on ImageNet with no external
data. More importantly, we introduce a teacher-student strategy specific to transformers. It relies on a distillation
token ensuring that the student learns from the teacher through attention. We show the interest of this token-based
distillation, especially when using a convnet as a teacher. This leads us to report results competitive with convnets
for both Imagenet (where we obtain up to 85.2% accuracy) and when transferring to other tasks. We share our code and
models.</em>`,js,dt,En="Tips:",xs,ct,Xn=`<li>Compared to ViT, DeiT models use a so-called distillation token to effectively learn from a teacher (which, in the
DeiT paper, is a ResNet like-model). The distillation token is learned through backpropagation, by interacting with
the class ([CLS]) and patch tokens through the self-attention layers.</li> <li>There are 2 ways to fine-tune distilled models, either (1) in a classic way, by only placing a prediction head on top
of the final hidden state of the class token and not using the distillation signal, or (2) by placing both a
prediction head on top of the class token and on top of the distillation token. In that case, the [CLS] prediction
head is trained using regular cross-entropy between the prediction of the head and the ground-truth label, while the
distillation prediction head is trained using hard distillation (cross-entropy between the prediction of the
distillation head and the label predicted by the teacher). At inference time, one takes the average prediction
between both heads as final prediction. (2) is also called “fine-tuning with distillation”, because one relies on a
teacher that has already been fine-tuned on the downstream dataset. In terms of models, (1) corresponds to
<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTForImageClassification">DeiTForImageClassification</a> and (2) corresponds to
<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTForImageClassificationWithTeacher">DeiTForImageClassificationWithTeacher</a>.</li> <li>Note that the authors also did try soft distillation for (2) (in which case the distillation prediction head is
trained using KL divergence to match the softmax output of the teacher), but hard distillation gave the best results.</li> <li>All released checkpoints were pre-trained and fine-tuned on ImageNet-1k only. No external data was used. This is in
contrast with the original ViT model, which used external data like the JFT-300M dataset/Imagenet-21k for
pre-training.</li> <li>The authors of DeiT also released more efficiently trained ViT models, which you can directly plug into
<a href="/docs/transformers/v4.34.0/en/model_doc/vit#transformers.ViTModel">ViTModel</a> or <a href="/docs/transformers/v4.34.0/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</a>. Techniques like data
augmentation, optimization, and regularization were used in order to simulate training on a much larger dataset
(while only using ImageNet-1k for pre-training). There are 4 variants available (in 3 different sizes):
<em>facebook/deit-tiny-patch16-224</em>, <em>facebook/deit-small-patch16-224</em>, <em>facebook/deit-base-patch16-224</em> and
<em>facebook/deit-base-patch16-384</em>. Note that one should use <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTImageProcessor">DeiTImageProcessor</a> in order to
prepare images for the model.</li>`,Ws,mt,Pn='This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>. The TensorFlow version of this model was added by <a href="https://huggingface.co/amyeroberts" rel="nofollow">amyeroberts</a>.',Js,K,ue,ts,pt,va,lo,Yn="Resources",Ds,ht,Ln="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DeiT.",Zs,ft,Us,gt,Sn='<li><a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTForImageClassification">DeiTForImageClassification</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification" rel="nofollow">example script</a> and <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb" rel="nofollow">notebook</a>.</li> <li>See also: <a href="../tasks/image_classification">Image classification task guide</a></li>',Ns,ut,Hn="Besides that:",zs,_t,qn='<li><a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTForMaskedImageModeling">DeiTForMaskedImageModeling</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-pretraining" rel="nofollow">example script</a>.</li>',Gs,Tt,An="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.",Rs,ee,_e,os,bt,ya,io,Qn="DeiTConfig",Bs,J,vt,Ma,co,On=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTModel">DeiTModel</a>. It is used to instantiate an DeiT
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 DeiT
<a href="https://huggingface.co/facebook/deit-base-distilled-patch16-224" rel="nofollow">facebook/deit-base-distilled-patch16-224</a>
architecture.`,wa,mo,Kn=`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.`,$a,Te,Vs,te,be,ss,yt,Ca,po,er="DeiTFeatureExtractor",Es,oe,Mt,ka,ve,wt,Fa,ho,tr="Preprocess an image or a batch of images.",Xs,se,ye,as,$t,Ia,fo,or="DeiTImageProcessor",Ps,Y,Ct,ja,go,sr="Constructs a DeiT image processor.",xa,Me,kt,Wa,uo,ar="Preprocess an image or batch of images.",Ys,ae,we,ns,Ft,Ja,_o,nr="DeiTModel",Ls,L,It,Da,To,rr=`The bare DeiT 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.`,Za,U,jt,Ua,bo,lr='The <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTModel">DeiTModel</a> forward method, overrides the <code>__call__</code> special method.',Na,$e,za,Ce,Ss,ne,ke,rs,xt,Ga,vo,ir="DeiTForMaskedImageModeling",Hs,x,Wt,Ra,yo,dr='DeiT Model with a decoder on top for masked image modeling, as proposed in <a href="https://arxiv.org/abs/2111.09886" rel="nofollow">SimMIM</a>.',Ba,Fe,Va,Mo,cr=`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.`,Ea,N,Jt,Xa,wo,mr='The <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTForMaskedImageModeling">DeiTForMaskedImageModeling</a> forward method, overrides the <code>__call__</code> special method.',Pa,Ie,Ya,je,qs,re,xe,ls,Dt,La,$o,pr="DeiTForImageClassification",As,D,Zt,Sa,Co,hr=`DeiT Model transformer with an image classification head on top (a linear layer on top of the final hidden state of
the [CLS] token) e.g. for ImageNet.`,Ha,ko,fr=`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.`,qa,z,Ut,Aa,Fo,gr='The <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTForImageClassification">DeiTForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Qa,We,Oa,Je,Qs,le,De,is,Nt,Ka,Io,ur="DeiTForImageClassificationWithTeacher",Os,I,zt,en,jo,_r=`DeiT Model transformer with image classification heads on top (a linear layer on top of the final hidden state of
the [CLS] token and a linear layer on top of the final hidden state of the distillation token) e.g. for ImageNet.`,tn,xo,Tr=".. warning::",on,Wo,br=`This model supports inference-only. Fine-tuning with distillation (i.e. with a teacher) is not yet
supported.`,sn,Jo,vr=`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.`,an,G,Gt,nn,Do,yr='The <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTForImageClassificationWithTeacher">DeiTForImageClassificationWithTeacher</a> forward method, overrides the <code>__call__</code> special method.',rn,Ze,ln,Ue,Ks,ie,Ne,ds,Rt,dn,Zo,Mr="TFDeiTModel",ea,S,Bt,cn,Uo,wr=`The bare DeiT Model transformer outputting raw hidden-states without any specific head on top.
This model is a TensorFlow
<a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer" rel="nofollow">tf.keras.layers.Layer</a>. Use it as a regular
TensorFlow Module and refer to the TensorFlow documentation for all matter related to general usage and behavior.`,mn,R,Vt,pn,No,$r='The <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.TFDeiTModel">TFDeiTModel</a> forward method, overrides the <code>__call__</code> special method.',hn,ze,fn,Ge,ta,de,Re,cs,Et,gn,zo,Cr="TFDeiTForMaskedImageModeling",oa,H,Xt,un,Go,kr=`DeiT Model with a decoder on top for masked image modeling, as proposed in <a href="https://arxiv.org/abs/2111.09886" rel="nofollow">SimMIM</a>.
This model is a TensorFlow
<a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer" rel="nofollow">tf.keras.layers.Layer</a>. Use it as a regular
TensorFlow Module and refer to the TensorFlow documentation for all matter related to general usage and behavior.`,_n,B,Pt,Tn,Ro,Fr='The <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.TFDeiTForMaskedImageModeling">TFDeiTForMaskedImageModeling</a> forward method, overrides the <code>__call__</code> special method.',bn,Be,vn,Ve,sa,ce,Ee,ms,Yt,yn,Bo,Ir="TFDeiTForImageClassification",aa,Z,Lt,Mn,Vo,jr=`DeiT Model transformer with an image classification head on top (a linear layer on top of the final hidden state of
the [CLS] token) e.g. for ImageNet.`,wn,Eo,xr=`This model is a TensorFlow
<a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer" rel="nofollow">tf.keras.layers.Layer</a>. Use it as a regular
TensorFlow Module and refer to the TensorFlow documentation for all matter related to general usage and behavior.`,$n,V,St,Cn,Xo,Wr='The <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.TFDeiTForImageClassification">TFDeiTForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',kn,Xe,Fn,Pe,na,me,Ye,ps,Ht,In,Po,Jr="TFDeiTForImageClassificationWithTeacher",ra,j,qt,jn,Yo,Dr=`DeiT Model transformer with image classification heads on top (a linear layer on top of the final hidden state of
the [CLS] token and a linear layer on top of the final hidden state of the distillation token) e.g. for ImageNet.`,xn,Lo,Zr=".. warning::",Wn,So,Ur=`This model supports inference-only. Fine-tuning with distillation (i.e. with a teacher) is not yet
supported.`,Jn,Ho,Nr=`This model is a TensorFlow
<a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer" rel="nofollow">tf.keras.layers.Layer</a>. Use it as a regular
TensorFlow Module and refer to the TensorFlow documentation for all matter related to general usage and behavior.`,Dn,E,At,Zn,qo,zr='The <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.TFDeiTForImageClassificationWithTeacher">TFDeiTForImageClassificationWithTeacher</a> forward method, overrides the <code>__call__</code> special method.',Un,Le,Nn,Se,la,hs,ia;return at=new W({}),fe=new Q({props:{$$slots:{default:[il]},$$scope:{ctx:C}}}),nt=new W({}),pt=new W({}),ft=new ll({props:{pipeline:"image-classification"}}),bt=new W({}),vt=new k({props:{name:"class transformers.DeiTConfig",anchor:"transformers.DeiTConfig",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:"encoder_stride",val:" = 16"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DeiTConfig.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.DeiTConfig.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.DeiTConfig.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.DeiTConfig.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.DeiTConfig.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.DeiTConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.DeiTConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.DeiTConfig.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.DeiTConfig.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.DeiTConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>224</code>) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.DeiTConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>16</code>) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.DeiTConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>3</code>) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.DeiTConfig.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.DeiTConfig.encoder_stride",description:`<strong>encoder_stride</strong> (<code>int</code>, <code>optional</code>, defaults to 16) &#x2014;
Factor to increase the spatial resolution by in the decoder head for masked image modeling.`,name:"encoder_stride"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deit/configuration_deit.py#L37"}}),Te=new pe({props:{anchor:"transformers.DeiTConfig.example",$$slots:{default:[dl]},$$scope:{ctx:C}}}),yt=new W({}),Mt=new k({props:{name:"class transformers.DeiTFeatureExtractor",anchor:"transformers.DeiTFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deit/feature_extraction_deit.py#L26"}}),wt=new k({props:{name:"__call__",anchor:"transformers.DeiTFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/image_processing_utils.py#L544"}}),$t=new W({}),Ct=new k({props:{name:"class transformers.DeiTImageProcessor",anchor:"transformers.DeiTImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = 3"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_rescale",val:": bool = True"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DeiTImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by
<code>do_resize</code> in <code>preprocess</code>.`,name:"do_resize"},{anchor:"transformers.DeiTImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;height&quot; -- 256, &quot;width&quot;: 256}</code>):
Size of the image after <code>resize</code>. Can be overridden by <code>size</code> in <code>preprocess</code>.`,name:"size"},{anchor:"transformers.DeiTImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code> filter, <em>optional</em>, defaults to <code>PILImageResampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by <code>resample</code> in <code>preprocess</code>.`,name:"resample"},{anchor:"transformers.DeiTImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to center crop the image. If the input size is smaller than <code>crop_size</code> along any edge, the image
is padded with 0&#x2019;s and then center cropped. Can be overridden by <code>do_center_crop</code> in <code>preprocess</code>.`,name:"do_center_crop"},{anchor:"transformers.DeiTImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Desired output size when applying center-cropping. Can be overridden by <code>crop_size</code> in <code>preprocess</code>.`,name:"crop_size"},{anchor:"transformers.DeiTImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.DeiTImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter in the
<code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.DeiTImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.DeiTImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.DeiTImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deit/image_processing_deit.py#L45"}}),kt=new k({props:{name:"preprocess",anchor:"transformers.DeiTImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:" = None"},{name:"do_center_crop",val:": bool = None"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DeiTImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.DeiTImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.DeiTImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after <code>resize</code>.`,name:"size"},{anchor:"transformers.DeiTImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
PILImageResampling filter to use if resizing the image Only has an effect if <code>do_resize</code> is set to
<code>True</code>.`,name:"resample"},{anchor:"transformers.DeiTImageProcessor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.DeiTImageProcessor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the image after center crop. If one edge the image is smaller than <code>crop_size</code>, it will be
padded with zeros and then cropped`,name:"crop_size"},{anchor:"transformers.DeiTImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.DeiTImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.DeiTImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.DeiTImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean.`,name:"image_mean"},{anchor:"transformers.DeiTImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation.`,name:"image_std"},{anchor:"transformers.DeiTImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li><code>None</code>: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.DeiTImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
</ul>`,name:"data_format"},{anchor:"transformers.DeiTImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deit/image_processing_deit.py#L161"}}),Ft=new W({}),It=new k({props:{name:"class transformers.DeiTModel",anchor:"transformers.DeiTModel",parameters:[{name:"config",val:": DeiTConfig"},{name:"add_pooling_layer",val:": bool = True"},{name:"use_mask_token",val:": bool = False"}],parametersDescription:[{anchor:"transformers.DeiTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTConfig">DeiTConfig</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/deit/modeling_deit.py#L461"}}),jt=new k({props:{name:"forward",anchor:"transformers.DeiTModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"bool_masked_pos",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = 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.DeiTModel.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__">DeiTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.DeiTModel.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.DeiTModel.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.DeiTModel.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.DeiTModel.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"},{anchor:"transformers.DeiTModel.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, num_patches)</code>, <em>optional</em>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0).`,name:"bool_masked_pos"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deit/modeling_deit.py#L486",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTConfig"
>DeiTConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$e=new Q({props:{$$slots:{default:[cl]},$$scope:{ctx:C}}}),Ce=new pe({props:{anchor:"transformers.DeiTModel.forward.example",$$slots:{default:[ml]},$$scope:{ctx:C}}}),xt=new W({}),Wt=new k({props:{name:"class transformers.DeiTForMaskedImageModeling",anchor:"transformers.DeiTForMaskedImageModeling",parameters:[{name:"config",val:": DeiTConfig"}],parametersDescription:[{anchor:"transformers.DeiTForMaskedImageModeling.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTConfig">DeiTConfig</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/deit/modeling_deit.py#L581"}}),Fe=new Q({props:{$$slots:{default:[pl]},$$scope:{ctx:C}}}),Jt=new k({props:{name:"forward",anchor:"transformers.DeiTForMaskedImageModeling.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"bool_masked_pos",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = 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.DeiTForMaskedImageModeling.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__">DeiTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.DeiTForMaskedImageModeling.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.DeiTForMaskedImageModeling.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.DeiTForMaskedImageModeling.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.DeiTForMaskedImageModeling.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"},{anchor:"transformers.DeiTForMaskedImageModeling.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, num_patches)</code>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0).`,name:"bool_masked_pos"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deit/modeling_deit.py#L599",returnDescription:`
<p>A <code>transformers.modeling_outputs.MaskedImageModelingOutput</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/deit#transformers.DeiTConfig"
>DeiTConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>bool_masked_pos</code> is provided) — Reconstruction loss.</li>
<li><strong>reconstruction</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) — Reconstructed / completed images.</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</li>
<li><strong>when</strong> <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states
(also called feature maps) of the model at the output of each stage.</li>
<li><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when</li>
<li><strong><code>config.output_attentions=True</code>):</strong>
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, 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.modeling_outputs.MaskedImageModelingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ie=new Q({props:{$$slots:{default:[hl]},$$scope:{ctx:C}}}),je=new pe({props:{anchor:"transformers.DeiTForMaskedImageModeling.forward.example",$$slots:{default:[fl]},$$scope:{ctx:C}}}),Dt=new W({}),Zt=new k({props:{name:"class transformers.DeiTForImageClassification",anchor:"transformers.DeiTForImageClassification",parameters:[{name:"config",val:": DeiTConfig"}],parametersDescription:[{anchor:"transformers.DeiTForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTConfig">DeiTConfig</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/deit/modeling_deit.py#L693"}}),Ut=new k({props:{name:"forward",anchor:"transformers.DeiTForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.DeiTForImageClassification.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__">DeiTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.DeiTForImageClassification.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.DeiTForImageClassification.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.DeiTForImageClassification.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.DeiTForImageClassification.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"},{anchor:"transformers.DeiTForImageClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deit/modeling_deit.py#L706",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTConfig"
>DeiTConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states
(also called feature maps) of the model at the output of each stage.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),We=new Q({props:{$$slots:{default:[gl]},$$scope:{ctx:C}}}),Je=new pe({props:{anchor:"transformers.DeiTForImageClassification.forward.example",$$slots:{default:[ul]},$$scope:{ctx:C}}}),Nt=new W({}),zt=new k({props:{name:"class transformers.DeiTForImageClassificationWithTeacher",anchor:"transformers.DeiTForImageClassificationWithTeacher",parameters:[{name:"config",val:": DeiTConfig"}],parametersDescription:[{anchor:"transformers.DeiTForImageClassificationWithTeacher.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTConfig">DeiTConfig</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/deit/modeling_deit.py#L843"}}),Gt=new k({props:{name:"forward",anchor:"transformers.DeiTForImageClassificationWithTeacher.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = 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.DeiTForImageClassificationWithTeacher.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__">DeiTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.DeiTForImageClassificationWithTeacher.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.DeiTForImageClassificationWithTeacher.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.DeiTForImageClassificationWithTeacher.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.DeiTForImageClassificationWithTeacher.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/deit/modeling_deit.py#L861",returnDescription:`
<p>A <code>transformers.models.deit.modeling_deit.DeiTForImageClassificationWithTeacherOutput</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/deit#transformers.DeiTConfig"
>DeiTConfig</a>) and inputs.</p>
<ul>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Prediction scores as the average of the cls_logits and distillation logits.</li>
<li><strong>cls_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Prediction scores of the classification head (i.e. the linear layer on top of the final hidden state of the
class token).</li>
<li><strong>distillation_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Prediction scores of the distillation head (i.e. the linear layer on top of the final hidden state of the
distillation token).</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.deit.modeling_deit.DeiTForImageClassificationWithTeacherOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ze=new Q({props:{$$slots:{default:[_l]},$$scope:{ctx:C}}}),Ue=new pe({props:{anchor:"transformers.DeiTForImageClassificationWithTeacher.forward.example",$$slots:{default:[Tl]},$$scope:{ctx:C}}}),Rt=new W({}),Bt=new k({props:{name:"class transformers.TFDeiTModel",anchor:"transformers.TFDeiTModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDeiTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTConfig">DeiTConfig</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/deit/modeling_tf_deit.py#L610"}}),Vt=new k({props:{name:"call",anchor:"transformers.TFDeiTModel.call",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"bool_masked_pos",val:": tf.Tensor | None = None"},{name:"head_mask",val:": 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.TFDeiTModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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__">DeiTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFDeiTModel.call.head_mask",description:`<strong>head_mask</strong> (<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.TFDeiTModel.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.`,name:"output_attentions"},{anchor:"transformers.TFDeiTModel.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.`,name:"output_hidden_states"},{anchor:"transformers.TFDeiTModel.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.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deit/modeling_tf_deit.py#L620",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> 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/deit#transformers.DeiTConfig"
>DeiTConfig</a>) and inputs.</p>
<ul>
<li>
<p><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.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you’re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><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>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><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>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ze=new Q({props:{$$slots:{default:[bl]},$$scope:{ctx:C}}}),Ge=new pe({props:{anchor:"transformers.TFDeiTModel.call.example",$$slots:{default:[vl]},$$scope:{ctx:C}}}),Et=new W({}),Xt=new k({props:{name:"class transformers.TFDeiTForMaskedImageModeling",anchor:"transformers.TFDeiTForMaskedImageModeling",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDeiTForMaskedImageModeling.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTConfig">DeiTConfig</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/deit/modeling_tf_deit.py#L718"}}),Pt=new k({props:{name:"call",anchor:"transformers.TFDeiTForMaskedImageModeling.call",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"bool_masked_pos",val:": tf.Tensor | None = None"},{name:"head_mask",val:": 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.TFDeiTForMaskedImageModeling.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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__">DeiTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFDeiTForMaskedImageModeling.call.head_mask",description:`<strong>head_mask</strong> (<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.TFDeiTForMaskedImageModeling.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.`,name:"output_attentions"},{anchor:"transformers.TFDeiTForMaskedImageModeling.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.`,name:"output_hidden_states"},{anchor:"transformers.TFDeiTForMaskedImageModeling.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.`,name:"return_dict"},{anchor:"transformers.TFDeiTForMaskedImageModeling.call.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>tf.Tensor</code> of type bool and shape <code>(batch_size, num_patches)</code>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0).`,name:"bool_masked_pos"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deit/modeling_tf_deit.py#L725",returnDescription:`
<p>A <code>transformers.modeling_tf_outputs.TFMaskedImageModelingOutput</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/deit#transformers.DeiTConfig"
>DeiTConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>bool_masked_pos</code> is provided) — Reconstruction loss.</li>
<li><strong>reconstruction</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) — Reconstructed / completed images.</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</li>
<li><strong><code>config.output_hidden_states=True</code>):</strong>
Tuple of <code>tf.Tensor</code> (one for the output of the embeddings, if the model has an embedding layer, + one for
the output of each stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states (also called
feature maps) of the model at the output of each stage.</li>
<li><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when</li>
<li><strong><code>config.output_attentions=True</code>):</strong>
Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, 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.modeling_tf_outputs.TFMaskedImageModelingOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Be=new Q({props:{$$slots:{default:[yl]},$$scope:{ctx:C}}}),Ve=new pe({props:{anchor:"transformers.TFDeiTForMaskedImageModeling.call.example",$$slots:{default:[Ml]},$$scope:{ctx:C}}}),Yt=new W({}),Lt=new k({props:{name:"class transformers.TFDeiTForImageClassification",anchor:"transformers.TFDeiTForImageClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDeiTForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTConfig">DeiTConfig</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/deit/modeling_tf_deit.py#L833"}}),St=new k({props:{name:"call",anchor:"transformers.TFDeiTForImageClassification.call",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"head_mask",val:": tf.Tensor | None = None"},{name:"labels",val:": 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.TFDeiTForImageClassification.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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__">DeiTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFDeiTForImageClassification.call.head_mask",description:`<strong>head_mask</strong> (<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.TFDeiTForImageClassification.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.`,name:"output_attentions"},{anchor:"transformers.TFDeiTForImageClassification.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.`,name:"output_hidden_states"},{anchor:"transformers.TFDeiTForImageClassification.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.`,name:"return_dict"},{anchor:"transformers.TFDeiTForImageClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deit/modeling_tf_deit.py#L847",returnDescription:`
<p>A <code>transformers.modeling_tf_outputs.TFImageClassifierOutput</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/deit#transformers.DeiTConfig"
>DeiTConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(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, if the model has an embedding layer, + one for
the output of each stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states (also called
feature maps) of the model at the output of each stage.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(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, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.modeling_tf_outputs.TFImageClassifierOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Xe=new Q({props:{$$slots:{default:[wl]},$$scope:{ctx:C}}}),Pe=new pe({props:{anchor:"transformers.TFDeiTForImageClassification.call.example",$$slots:{default:[$l]},$$scope:{ctx:C}}}),Ht=new W({}),qt=new k({props:{name:"class transformers.TFDeiTForImageClassificationWithTeacher",anchor:"transformers.TFDeiTForImageClassificationWithTeacher",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFDeiTForImageClassificationWithTeacher.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTConfig">DeiTConfig</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/deit/modeling_tf_deit.py#L935"}}),At=new k({props:{name:"call",anchor:"transformers.TFDeiTForImageClassificationWithTeacher.call",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"head_mask",val:": 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.TFDeiTForImageClassificationWithTeacher.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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__">DeiTImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFDeiTForImageClassificationWithTeacher.call.head_mask",description:`<strong>head_mask</strong> (<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.TFDeiTForImageClassificationWithTeacher.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.`,name:"output_attentions"},{anchor:"transformers.TFDeiTForImageClassificationWithTeacher.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.`,name:"output_hidden_states"},{anchor:"transformers.TFDeiTForImageClassificationWithTeacher.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.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/deit/modeling_tf_deit.py#L954",returnDescription:`
<p>A <code>transformers.models.deit.modeling_tf_deit.TFDeiTForImageClassificationWithTeacherOutput</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/deit#transformers.DeiTConfig"
>DeiTConfig</a>) and inputs.</p>
<ul>
<li><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Prediction scores as the average of the cls_logits and distillation logits.</li>
<li><strong>cls_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Prediction scores of the classification head (i.e. the linear layer on top of the final hidden state of the
class token).</li>
<li><strong>distillation_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) — Prediction scores of the distillation head (i.e. the linear layer on top of the final hidden state of the
distillation token).</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.deit.modeling_tf_deit.TFDeiTForImageClassificationWithTeacherOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Le=new Q({props:{$$slots:{default:[Cl]},$$scope:{ctx:C}}}),Se=new pe({props:{anchor:"transformers.TFDeiTForImageClassificationWithTeacher.call.example",$$slots:{default:[kl]},$$scope:{ctx:C}}}),{c(){o=n("meta"),M=i(),c=n("p"),p=i(),w=n("h1"),a=n("a"),$=n("span"),u(at.$$.fragment),Ta=i(),no=n("span"),no.textContent=zn,$s=i(),u(fe.$$.fragment),Cs=i(),O=n("h2"),ge=n("a"),es=n("span"),u(nt.$$.fragment),ba=i(),ro=n("span"),ro.textContent=Gn,ks=i(),rt=n("p"),rt.innerHTML=Rn,Fs=i(),lt=n("p"),lt.textContent=Bn,Is=i(),it=n("p"),it.innerHTML=Vn,js=i(),dt=n("p"),dt.textContent=En,xs=i(),ct=n("ul"),ct.innerHTML=Xn,Ws=i(),mt=n("p"),mt.innerHTML=Pn,Js=i(),K=n("h2"),ue=n("a"),ts=n("span"),u(pt.$$.fragment),va=i(),lo=n("span"),lo.textContent=Yn,Ds=i(),ht=n("p"),ht.textContent=Ln,Zs=i(),u(ft.$$.fragment),Us=i(),gt=n("ul"),gt.innerHTML=Sn,Ns=i(),ut=n("p"),ut.textContent=Hn,zs=i(),_t=n("ul"),_t.innerHTML=qn,Gs=i(),Tt=n("p"),Tt.textContent=An,Rs=i(),ee=n("h2"),_e=n("a"),os=n("span"),u(bt.$$.fragment),ya=i(),io=n("span"),io.textContent=Qn,Bs=i(),J=n("div"),u(vt.$$.fragment),Ma=i(),co=n("p"),co.innerHTML=On,wa=i(),mo=n("p"),mo.innerHTML=Kn,$a=i(),u(Te.$$.fragment),Vs=i(),te=n("h2"),be=n("a"),ss=n("span"),u(yt.$$.fragment),Ca=i(),po=n("span"),po.textContent=er,Es=i(),oe=n("div"),u(Mt.$$.fragment),ka=i(),ve=n("div"),u(wt.$$.fragment),Fa=i(),ho=n("p"),ho.textContent=tr,Xs=i(),se=n("h2"),ye=n("a"),as=n("span"),u($t.$$.fragment),Ia=i(),fo=n("span"),fo.textContent=or,Ps=i(),Y=n("div"),u(Ct.$$.fragment),ja=i(),go=n("p"),go.textContent=sr,xa=i(),Me=n("div"),u(kt.$$.fragment),Wa=i(),uo=n("p"),uo.textContent=ar,Ys=i(),ae=n("h2"),we=n("a"),ns=n("span"),u(Ft.$$.fragment),Ja=i(),_o=n("span"),_o.textContent=nr,Ls=i(),L=n("div"),u(It.$$.fragment),Da=i(),To=n("p"),To.innerHTML=rr,Za=i(),U=n("div"),u(jt.$$.fragment),Ua=i(),bo=n("p"),bo.innerHTML=lr,Na=i(),u($e.$$.fragment),za=i(),u(Ce.$$.fragment),Ss=i(),ne=n("h2"),ke=n("a"),rs=n("span"),u(xt.$$.fragment),Ga=i(),vo=n("span"),vo.textContent=ir,Hs=i(),x=n("div"),u(Wt.$$.fragment),Ra=i(),yo=n("p"),yo.innerHTML=dr,Ba=i(),u(Fe.$$.fragment),Va=i(),Mo=n("p"),Mo.innerHTML=cr,Ea=i(),N=n("div"),u(Jt.$$.fragment),Xa=i(),wo=n("p"),wo.innerHTML=mr,Pa=i(),u(Ie.$$.fragment),Ya=i(),u(je.$$.fragment),qs=i(),re=n("h2"),xe=n("a"),ls=n("span"),u(Dt.$$.fragment),La=i(),$o=n("span"),$o.textContent=pr,As=i(),D=n("div"),u(Zt.$$.fragment),Sa=i(),Co=n("p"),Co.textContent=hr,Ha=i(),ko=n("p"),ko.innerHTML=fr,qa=i(),z=n("div"),u(Ut.$$.fragment),Aa=i(),Fo=n("p"),Fo.innerHTML=gr,Qa=i(),u(We.$$.fragment),Oa=i(),u(Je.$$.fragment),Qs=i(),le=n("h2"),De=n("a"),is=n("span"),u(Nt.$$.fragment),Ka=i(),Io=n("span"),Io.textContent=ur,Os=i(),I=n("div"),u(zt.$$.fragment),en=i(),jo=n("p"),jo.textContent=_r,tn=i(),xo=n("p"),xo.textContent=Tr,on=i(),Wo=n("p"),Wo.textContent=br,sn=i(),Jo=n("p"),Jo.innerHTML=vr,an=i(),G=n("div"),u(Gt.$$.fragment),nn=i(),Do=n("p"),Do.innerHTML=yr,rn=i(),u(Ze.$$.fragment),ln=i(),u(Ue.$$.fragment),Ks=i(),ie=n("h2"),Ne=n("a"),ds=n("span"),u(Rt.$$.fragment),dn=i(),Zo=n("span"),Zo.textContent=Mr,ea=i(),S=n("div"),u(Bt.$$.fragment),cn=i(),Uo=n("p"),Uo.innerHTML=wr,mn=i(),R=n("div"),u(Vt.$$.fragment),pn=i(),No=n("p"),No.innerHTML=$r,hn=i(),u(ze.$$.fragment),fn=i(),u(Ge.$$.fragment),ta=i(),de=n("h2"),Re=n("a"),cs=n("span"),u(Et.$$.fragment),gn=i(),zo=n("span"),zo.textContent=Cr,oa=i(),H=n("div"),u(Xt.$$.fragment),un=i(),Go=n("p"),Go.innerHTML=kr,_n=i(),B=n("div"),u(Pt.$$.fragment),Tn=i(),Ro=n("p"),Ro.innerHTML=Fr,bn=i(),u(Be.$$.fragment),vn=i(),u(Ve.$$.fragment),sa=i(),ce=n("h2"),Ee=n("a"),ms=n("span"),u(Yt.$$.fragment),yn=i(),Bo=n("span"),Bo.textContent=Ir,aa=i(),Z=n("div"),u(Lt.$$.fragment),Mn=i(),Vo=n("p"),Vo.textContent=jr,wn=i(),Eo=n("p"),Eo.innerHTML=xr,$n=i(),V=n("div"),u(St.$$.fragment),Cn=i(),Xo=n("p"),Xo.innerHTML=Wr,kn=i(),u(Xe.$$.fragment),Fn=i(),u(Pe.$$.fragment),na=i(),me=n("h2"),Ye=n("a"),ps=n("span"),u(Ht.$$.fragment),In=i(),Po=n("span"),Po.textContent=Jr,ra=i(),j=n("div"),u(qt.$$.fragment),jn=i(),Yo=n("p"),Yo.textContent=Dr,xn=i(),Lo=n("p"),Lo.textContent=Zr,Wn=i(),So=n("p"),So.textContent=Ur,Jn=i(),Ho=n("p"),Ho.innerHTML=Nr,Dn=i(),E=n("div"),u(At.$$.fragment),Zn=i(),qo=n("p"),qo.innerHTML=zr,Un=i(),u(Le.$$.fragment),Nn=i(),u(Se.$$.fragment),la=i(),hs=n("p"),this.h()},l(e){const l=rl("svelte-1phssyn",document.head);o=r(l,"META",{name:!0,content:!0}),l.forEach(t),M=d(e),c=r(e,"P",{}),g(c).forEach(t),p=d(e),w=r(e,"H1",{class:!0});var Qt=g(w);a=r(Qt,"A",{id:!0,class:!0,href:!0});var fs=g(a);$=r(fs,"SPAN",{});var gs=g($);_(at.$$.fragment,gs),gs.forEach(t),fs.forEach(t),Ta=d(Qt),no=r(Qt,"SPAN",{"data-svelte-h":!0}),f(no)!=="svelte-1k8q987"&&(no.textContent=zn),Qt.forEach(t),$s=d(e),_(fe.$$.fragment,e),Cs=d(e),O=r(e,"H2",{class:!0});var Ot=g(O);ge=r(Ot,"A",{id:!0,class:!0,href:!0});var us=g(ge);es=r(us,"SPAN",{});var _s=g(es);_(nt.$$.fragment,_s),_s.forEach(t),us.forEach(t),ba=d(Ot),ro=r(Ot,"SPAN",{"data-svelte-h":!0}),f(ro)!=="svelte-1jsw1pg"&&(ro.textContent=Gn),Ot.forEach(t),ks=d(e),rt=r(e,"P",{"data-svelte-h":!0}),f(rt)!=="svelte-1igs2l2"&&(rt.innerHTML=Rn),Fs=d(e),lt=r(e,"P",{"data-svelte-h":!0}),f(lt)!=="svelte-vfdo9a"&&(lt.textContent=Bn),Is=d(e),it=r(e,"P",{"data-svelte-h":!0}),f(it)!=="svelte-13f6p0y"&&(it.innerHTML=Vn),js=d(e),dt=r(e,"P",{"data-svelte-h":!0}),f(dt)!=="svelte-axv494"&&(dt.textContent=En),xs=d(e),ct=r(e,"UL",{"data-svelte-h":!0}),f(ct)!=="svelte-1ys4k2w"&&(ct.innerHTML=Xn),Ws=d(e),mt=r(e,"P",{"data-svelte-h":!0}),f(mt)!=="svelte-176e55m"&&(mt.innerHTML=Pn),Js=d(e),K=r(e,"H2",{class:!0});var Kt=g(K);ue=r(Kt,"A",{id:!0,class:!0,href:!0});var Ts=g(ue);ts=r(Ts,"SPAN",{});var bs=g(ts);_(pt.$$.fragment,bs),bs.forEach(t),Ts.forEach(t),va=d(Kt),lo=r(Kt,"SPAN",{"data-svelte-h":!0}),f(lo)!=="svelte-w4zzv6"&&(lo.textContent=Yn),Kt.forEach(t),Ds=d(e),ht=r(e,"P",{"data-svelte-h":!0}),f(ht)!=="svelte-1l32li1"&&(ht.textContent=Ln),Zs=d(e),_(ft.$$.fragment,e),Us=d(e),gt=r(e,"UL",{"data-svelte-h":!0}),f(gt)!=="svelte-stp1zj"&&(gt.innerHTML=Sn),Ns=d(e),ut=r(e,"P",{"data-svelte-h":!0}),f(ut)!=="svelte-1k821ua"&&(ut.textContent=Hn),zs=d(e),_t=r(e,"UL",{"data-svelte-h":!0}),f(_t)!=="svelte-2zyki9"&&(_t.innerHTML=qn),Gs=d(e),Tt=r(e,"P",{"data-svelte-h":!0}),f(Tt)!=="svelte-1xesile"&&(Tt.textContent=An),Rs=d(e),ee=r(e,"H2",{class:!0});var eo=g(ee);_e=r(eo,"A",{id:!0,class:!0,href:!0});var vs=g(_e);os=r(vs,"SPAN",{});var ys=g(os);_(bt.$$.fragment,ys),ys.forEach(t),vs.forEach(t),ya=d(eo),io=r(eo,"SPAN",{"data-svelte-h":!0}),f(io)!=="svelte-p9aopp"&&(io.textContent=Qn),eo.forEach(t),Bs=d(e),J=r(e,"DIV",{class:!0});var q=g(J);_(vt.$$.fragment,q),Ma=d(q),co=r(q,"P",{"data-svelte-h":!0}),f(co)!=="svelte-bfnw63"&&(co.innerHTML=On),wa=d(q),mo=r(q,"P",{"data-svelte-h":!0}),f(mo)!=="svelte-10kqkkl"&&(mo.innerHTML=Kn),$a=d(q),_(Te.$$.fragment,q),q.forEach(t),Vs=d(e),te=r(e,"H2",{class:!0});var to=g(te);be=r(to,"A",{id:!0,class:!0,href:!0});var Ms=g(be);ss=r(Ms,"SPAN",{});var ws=g(ss);_(yt.$$.fragment,ws),ws.forEach(t),Ms.forEach(t),Ca=d(to),po=r(to,"SPAN",{"data-svelte-h":!0}),f(po)!=="svelte-qtzhc1"&&(po.textContent=er),to.forEach(t),Es=d(e),oe=r(e,"DIV",{class:!0});var oo=g(oe);_(Mt.$$.fragment,oo),ka=d(oo),ve=r(oo,"DIV",{class:!0});var so=g(ve);_(wt.$$.fragment,so),Fa=d(so),ho=r(so,"P",{"data-svelte-h":!0}),f(ho)!=="svelte-khengj"&&(ho.textContent=tr),so.forEach(t),oo.forEach(t),Xs=d(e),se=r(e,"H2",{class:!0});var ao=g(se);ye=r(ao,"A",{id:!0,class:!0,href:!0});var Gr=g(ye);as=r(Gr,"SPAN",{});var Rr=g(as);_($t.$$.fragment,Rr),Rr.forEach(t),Gr.forEach(t),Ia=d(ao),fo=r(ao,"SPAN",{"data-svelte-h":!0}),f(fo)!=="svelte-11ojxsy"&&(fo.textContent=or),ao.forEach(t),Ps=d(e),Y=r(e,"DIV",{class:!0});var Ao=g(Y);_(Ct.$$.fragment,Ao),ja=d(Ao),go=r(Ao,"P",{"data-svelte-h":!0}),f(go)!=="svelte-19jpkyi"&&(go.textContent=sr),xa=d(Ao),Me=r(Ao,"DIV",{class:!0});var da=g(Me);_(kt.$$.fragment,da),Wa=d(da),uo=r(da,"P",{"data-svelte-h":!0}),f(uo)!=="svelte-1x3yxsa"&&(uo.textContent=ar),da.forEach(t),Ao.forEach(t),Ys=d(e),ae=r(e,"H2",{class:!0});var ca=g(ae);we=r(ca,"A",{id:!0,class:!0,href:!0});var Br=g(we);ns=r(Br,"SPAN",{});var Vr=g(ns);_(Ft.$$.fragment,Vr),Vr.forEach(t),Br.forEach(t),Ja=d(ca),_o=r(ca,"SPAN",{"data-svelte-h":!0}),f(_o)!=="svelte-1b3oekg"&&(_o.textContent=nr),ca.forEach(t),Ls=d(e),L=r(e,"DIV",{class:!0});var Qo=g(L);_(It.$$.fragment,Qo),Da=d(Qo),To=r(Qo,"P",{"data-svelte-h":!0}),f(To)!=="svelte-1g5epvj"&&(To.innerHTML=rr),Za=d(Qo),U=r(Qo,"DIV",{class:!0});var He=g(U);_(jt.$$.fragment,He),Ua=d(He),bo=r(He,"P",{"data-svelte-h":!0}),f(bo)!=="svelte-j1abkb"&&(bo.innerHTML=lr),Na=d(He),_($e.$$.fragment,He),za=d(He),_(Ce.$$.fragment,He),He.forEach(t),Qo.forEach(t),Ss=d(e),ne=r(e,"H2",{class:!0});var ma=g(ne);ke=r(ma,"A",{id:!0,class:!0,href:!0});var Er=g(ke);rs=r(Er,"SPAN",{});var Xr=g(rs);_(xt.$$.fragment,Xr),Xr.forEach(t),Er.forEach(t),Ga=d(ma),vo=r(ma,"SPAN",{"data-svelte-h":!0}),f(vo)!=="svelte-6h5l63"&&(vo.textContent=ir),ma.forEach(t),Hs=d(e),x=r(e,"DIV",{class:!0});var A=g(x);_(Wt.$$.fragment,A),Ra=d(A),yo=r(A,"P",{"data-svelte-h":!0}),f(yo)!=="svelte-1lv61v1"&&(yo.innerHTML=dr),Ba=d(A),_(Fe.$$.fragment,A),Va=d(A),Mo=r(A,"P",{"data-svelte-h":!0}),f(Mo)!=="svelte-1gjh92c"&&(Mo.innerHTML=cr),Ea=d(A),N=r(A,"DIV",{class:!0});var qe=g(N);_(Jt.$$.fragment,qe),Xa=d(qe),wo=r(qe,"P",{"data-svelte-h":!0}),f(wo)!=="svelte-14a15kn"&&(wo.innerHTML=mr),Pa=d(qe),_(Ie.$$.fragment,qe),Ya=d(qe),_(je.$$.fragment,qe),qe.forEach(t),A.forEach(t),qs=d(e),re=r(e,"H2",{class:!0});var pa=g(re);xe=r(pa,"A",{id:!0,class:!0,href:!0});var Pr=g(xe);ls=r(Pr,"SPAN",{});var Yr=g(ls);_(Dt.$$.fragment,Yr),Yr.forEach(t),Pr.forEach(t),La=d(pa),$o=r(pa,"SPAN",{"data-svelte-h":!0}),f($o)!=="svelte-1tmif6f"&&($o.textContent=pr),pa.forEach(t),As=d(e),D=r(e,"DIV",{class:!0});var Ae=g(D);_(Zt.$$.fragment,Ae),Sa=d(Ae),Co=r(Ae,"P",{"data-svelte-h":!0}),f(Co)!=="svelte-1azp76l"&&(Co.textContent=hr),Ha=d(Ae),ko=r(Ae,"P",{"data-svelte-h":!0}),f(ko)!=="svelte-1gjh92c"&&(ko.innerHTML=fr),qa=d(Ae),z=r(Ae,"DIV",{class:!0});var Qe=g(z);_(Ut.$$.fragment,Qe),Aa=d(Qe),Fo=r(Qe,"P",{"data-svelte-h":!0}),f(Fo)!=="svelte-1qy9l5b"&&(Fo.innerHTML=gr),Qa=d(Qe),_(We.$$.fragment,Qe),Oa=d(Qe),_(Je.$$.fragment,Qe),Qe.forEach(t),Ae.forEach(t),Qs=d(e),le=r(e,"H2",{class:!0});var ha=g(le);De=r(ha,"A",{id:!0,class:!0,href:!0});var Lr=g(De);is=r(Lr,"SPAN",{});var Sr=g(is);_(Nt.$$.fragment,Sr),Sr.forEach(t),Lr.forEach(t),Ka=d(ha),Io=r(ha,"SPAN",{"data-svelte-h":!0}),f(Io)!=="svelte-snlew7"&&(Io.textContent=ur),ha.forEach(t),Os=d(e),I=r(e,"DIV",{class:!0});var X=g(I);_(zt.$$.fragment,X),en=d(X),jo=r(X,"P",{"data-svelte-h":!0}),f(jo)!=="svelte-17o4rh5"&&(jo.textContent=_r),tn=d(X),xo=r(X,"P",{"data-svelte-h":!0}),f(xo)!=="svelte-zri3pk"&&(xo.textContent=Tr),on=d(X),Wo=r(X,"P",{"data-svelte-h":!0}),f(Wo)!=="svelte-1gp6z48"&&(Wo.textContent=br),sn=d(X),Jo=r(X,"P",{"data-svelte-h":!0}),f(Jo)!=="svelte-1gjh92c"&&(Jo.innerHTML=vr),an=d(X),G=r(X,"DIV",{class:!0});var Oe=g(G);_(Gt.$$.fragment,Oe),nn=d(Oe),Do=r(Oe,"P",{"data-svelte-h":!0}),f(Do)!=="svelte-g08xrr"&&(Do.innerHTML=yr),rn=d(Oe),_(Ze.$$.fragment,Oe),ln=d(Oe),_(Ue.$$.fragment,Oe),Oe.forEach(t),X.forEach(t),Ks=d(e),ie=r(e,"H2",{class:!0});var fa=g(ie);Ne=r(fa,"A",{id:!0,class:!0,href:!0});var Hr=g(Ne);ds=r(Hr,"SPAN",{});var qr=g(ds);_(Rt.$$.fragment,qr),qr.forEach(t),Hr.forEach(t),dn=d(fa),Zo=r(fa,"SPAN",{"data-svelte-h":!0}),f(Zo)!=="svelte-amg75y"&&(Zo.textContent=Mr),fa.forEach(t),ea=d(e),S=r(e,"DIV",{class:!0});var Oo=g(S);_(Bt.$$.fragment,Oo),cn=d(Oo),Uo=r(Oo,"P",{"data-svelte-h":!0}),f(Uo)!=="svelte-1gvd2x3"&&(Uo.innerHTML=wr),mn=d(Oo),R=r(Oo,"DIV",{class:!0});var Ke=g(R);_(Vt.$$.fragment,Ke),pn=d(Ke),No=r(Ke,"P",{"data-svelte-h":!0}),f(No)!=="svelte-1iax617"&&(No.innerHTML=$r),hn=d(Ke),_(ze.$$.fragment,Ke),fn=d(Ke),_(Ge.$$.fragment,Ke),Ke.forEach(t),Oo.forEach(t),ta=d(e),de=r(e,"H2",{class:!0});var ga=g(de);Re=r(ga,"A",{id:!0,class:!0,href:!0});var Ar=g(Re);cs=r(Ar,"SPAN",{});var Qr=g(cs);_(Et.$$.fragment,Qr),Qr.forEach(t),Ar.forEach(t),gn=d(ga),zo=r(ga,"SPAN",{"data-svelte-h":!0}),f(zo)!=="svelte-16kxeet"&&(zo.textContent=Cr),ga.forEach(t),oa=d(e),H=r(e,"DIV",{class:!0});var Ko=g(H);_(Xt.$$.fragment,Ko),un=d(Ko),Go=r(Ko,"P",{"data-svelte-h":!0}),f(Go)!=="svelte-1y4me3j"&&(Go.innerHTML=kr),_n=d(Ko),B=r(Ko,"DIV",{class:!0});var et=g(B);_(Pt.$$.fragment,et),Tn=d(et),Ro=r(et,"P",{"data-svelte-h":!0}),f(Ro)!=="svelte-a9t7xz"&&(Ro.innerHTML=Fr),bn=d(et),_(Be.$$.fragment,et),vn=d(et),_(Ve.$$.fragment,et),et.forEach(t),Ko.forEach(t),sa=d(e),ce=r(e,"H2",{class:!0});var ua=g(ce);Ee=r(ua,"A",{id:!0,class:!0,href:!0});var Or=g(Ee);ms=r(Or,"SPAN",{});var Kr=g(ms);_(Yt.$$.fragment,Kr),Kr.forEach(t),Or.forEach(t),yn=d(ua),Bo=r(ua,"SPAN",{"data-svelte-h":!0}),f(Bo)!=="svelte-htash"&&(Bo.textContent=Ir),ua.forEach(t),aa=d(e),Z=r(e,"DIV",{class:!0});var tt=g(Z);_(Lt.$$.fragment,tt),Mn=d(tt),Vo=r(tt,"P",{"data-svelte-h":!0}),f(Vo)!=="svelte-1azp76l"&&(Vo.textContent=jr),wn=d(tt),Eo=r(tt,"P",{"data-svelte-h":!0}),f(Eo)!=="svelte-1y4qz5o"&&(Eo.innerHTML=xr),$n=d(tt),V=r(tt,"DIV",{class:!0});var ot=g(V);_(St.$$.fragment,ot),Cn=d(ot),Xo=r(ot,"P",{"data-svelte-h":!0}),f(Xo)!=="svelte-4ad2gv"&&(Xo.innerHTML=Wr),kn=d(ot),_(Xe.$$.fragment,ot),Fn=d(ot),_(Pe.$$.fragment,ot),ot.forEach(t),tt.forEach(t),na=d(e),me=r(e,"H2",{class:!0});var _a=g(me);Ye=r(_a,"A",{id:!0,class:!0,href:!0});var el=g(Ye);ps=r(el,"SPAN",{});var tl=g(ps);_(Ht.$$.fragment,tl),tl.forEach(t),el.forEach(t),In=d(_a),Po=r(_a,"SPAN",{"data-svelte-h":!0}),f(Po)!=="svelte-1rcgdw1"&&(Po.textContent=Jr),_a.forEach(t),ra=d(e),j=r(e,"DIV",{class:!0});var P=g(j);_(qt.$$.fragment,P),jn=d(P),Yo=r(P,"P",{"data-svelte-h":!0}),f(Yo)!=="svelte-17o4rh5"&&(Yo.textContent=Dr),xn=d(P),Lo=r(P,"P",{"data-svelte-h":!0}),f(Lo)!=="svelte-zri3pk"&&(Lo.textContent=Zr),Wn=d(P),So=r(P,"P",{"data-svelte-h":!0}),f(So)!=="svelte-1gp6z48"&&(So.textContent=Ur),Jn=d(P),Ho=r(P,"P",{"data-svelte-h":!0}),f(Ho)!=="svelte-1y4qz5o"&&(Ho.innerHTML=Nr),Dn=d(P),E=r(P,"DIV",{class:!0});var st=g(E);_(At.$$.fragment,st),Zn=d(st),qo=r(st,"P",{"data-svelte-h":!0}),f(qo)!=="svelte-s9mvcv"&&(qo.innerHTML=zr),Un=d(st),_(Le.$$.fragment,st),Nn=d(st),_(Se.$$.fragment,st),st.forEach(t),P.forEach(t),la=d(e),hs=r(e,"P",{}),g(hs).forEach(t),this.h()},h(){h(o,"name","hf:doc:metadata"),h(o,"content",JSON.stringify(Il)),h(a,"id","deit"),h(a,"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"),h(a,"href","#deit"),h(w,"class","relative group"),h(ge,"id","overview"),h(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"),h(ge,"href","#overview"),h(O,"class","relative group"),h(ue,"id","resources"),h(ue,"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"),h(ue,"href","#resources"),h(K,"class","relative group"),h(_e,"id","transformers.DeiTConfig"),h(_e,"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"),h(_e,"href","#transformers.DeiTConfig"),h(ee,"class","relative group"),h(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(be,"id","transformers.DeiTFeatureExtractor"),h(be,"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"),h(be,"href","#transformers.DeiTFeatureExtractor"),h(te,"class","relative group"),h(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ye,"id","transformers.DeiTImageProcessor"),h(ye,"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"),h(ye,"href","#transformers.DeiTImageProcessor"),h(se,"class","relative group"),h(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(we,"id","transformers.DeiTModel"),h(we,"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"),h(we,"href","#transformers.DeiTModel"),h(ae,"class","relative group"),h(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ke,"id","transformers.DeiTForMaskedImageModeling"),h(ke,"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"),h(ke,"href","#transformers.DeiTForMaskedImageModeling"),h(ne,"class","relative group"),h(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(xe,"id","transformers.DeiTForImageClassification"),h(xe,"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"),h(xe,"href","#transformers.DeiTForImageClassification"),h(re,"class","relative group"),h(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(De,"id","transformers.DeiTForImageClassificationWithTeacher"),h(De,"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"),h(De,"href","#transformers.DeiTForImageClassificationWithTeacher"),h(le,"class","relative group"),h(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ne,"id","transformers.TFDeiTModel"),h(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"),h(Ne,"href","#transformers.TFDeiTModel"),h(ie,"class","relative group"),h(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Re,"id","transformers.TFDeiTForMaskedImageModeling"),h(Re,"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"),h(Re,"href","#transformers.TFDeiTForMaskedImageModeling"),h(de,"class","relative group"),h(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ee,"id","transformers.TFDeiTForImageClassification"),h(Ee,"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"),h(Ee,"href","#transformers.TFDeiTForImageClassification"),h(ce,"class","relative group"),h(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ye,"id","transformers.TFDeiTForImageClassificationWithTeacher"),h(Ye,"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"),h(Ye,"href","#transformers.TFDeiTForImageClassificationWithTeacher"),h(me,"class","relative group"),h(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(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,l){s(document.head,o),m(e,M,l),m(e,c,l),m(e,p,l),m(e,w,l),s(w,a),s(a,$),T(at,$,null),s(w,Ta),s(w,no),m(e,$s,l),T(fe,e,l),m(e,Cs,l),m(e,O,l),s(O,ge),s(ge,es),T(nt,es,null),s(O,ba),s(O,ro),m(e,ks,l),m(e,rt,l),m(e,Fs,l),m(e,lt,l),m(e,Is,l),m(e,it,l),m(e,js,l),m(e,dt,l),m(e,xs,l),m(e,ct,l),m(e,Ws,l),m(e,mt,l),m(e,Js,l),m(e,K,l),s(K,ue),s(ue,ts),T(pt,ts,null),s(K,va),s(K,lo),m(e,Ds,l),m(e,ht,l),m(e,Zs,l),T(ft,e,l),m(e,Us,l),m(e,gt,l),m(e,Ns,l),m(e,ut,l),m(e,zs,l),m(e,_t,l),m(e,Gs,l),m(e,Tt,l),m(e,Rs,l),m(e,ee,l),s(ee,_e),s(_e,os),T(bt,os,null),s(ee,ya),s(ee,io),m(e,Bs,l),m(e,J,l),T(vt,J,null),s(J,Ma),s(J,co),s(J,wa),s(J,mo),s(J,$a),T(Te,J,null),m(e,Vs,l),m(e,te,l),s(te,be),s(be,ss),T(yt,ss,null),s(te,Ca),s(te,po),m(e,Es,l),m(e,oe,l),T(Mt,oe,null),s(oe,ka),s(oe,ve),T(wt,ve,null),s(ve,Fa),s(ve,ho),m(e,Xs,l),m(e,se,l),s(se,ye),s(ye,as),T($t,as,null),s(se,Ia),s(se,fo),m(e,Ps,l),m(e,Y,l),T(Ct,Y,null),s(Y,ja),s(Y,go),s(Y,xa),s(Y,Me),T(kt,Me,null),s(Me,Wa),s(Me,uo),m(e,Ys,l),m(e,ae,l),s(ae,we),s(we,ns),T(Ft,ns,null),s(ae,Ja),s(ae,_o),m(e,Ls,l),m(e,L,l),T(It,L,null),s(L,Da),s(L,To),s(L,Za),s(L,U),T(jt,U,null),s(U,Ua),s(U,bo),s(U,Na),T($e,U,null),s(U,za),T(Ce,U,null),m(e,Ss,l),m(e,ne,l),s(ne,ke),s(ke,rs),T(xt,rs,null),s(ne,Ga),s(ne,vo),m(e,Hs,l),m(e,x,l),T(Wt,x,null),s(x,Ra),s(x,yo),s(x,Ba),T(Fe,x,null),s(x,Va),s(x,Mo),s(x,Ea),s(x,N),T(Jt,N,null),s(N,Xa),s(N,wo),s(N,Pa),T(Ie,N,null),s(N,Ya),T(je,N,null),m(e,qs,l),m(e,re,l),s(re,xe),s(xe,ls),T(Dt,ls,null),s(re,La),s(re,$o),m(e,As,l),m(e,D,l),T(Zt,D,null),s(D,Sa),s(D,Co),s(D,Ha),s(D,ko),s(D,qa),s(D,z),T(Ut,z,null),s(z,Aa),s(z,Fo),s(z,Qa),T(We,z,null),s(z,Oa),T(Je,z,null),m(e,Qs,l),m(e,le,l),s(le,De),s(De,is),T(Nt,is,null),s(le,Ka),s(le,Io),m(e,Os,l),m(e,I,l),T(zt,I,null),s(I,en),s(I,jo),s(I,tn),s(I,xo),s(I,on),s(I,Wo),s(I,sn),s(I,Jo),s(I,an),s(I,G),T(Gt,G,null),s(G,nn),s(G,Do),s(G,rn),T(Ze,G,null),s(G,ln),T(Ue,G,null),m(e,Ks,l),m(e,ie,l),s(ie,Ne),s(Ne,ds),T(Rt,ds,null),s(ie,dn),s(ie,Zo),m(e,ea,l),m(e,S,l),T(Bt,S,null),s(S,cn),s(S,Uo),s(S,mn),s(S,R),T(Vt,R,null),s(R,pn),s(R,No),s(R,hn),T(ze,R,null),s(R,fn),T(Ge,R,null),m(e,ta,l),m(e,de,l),s(de,Re),s(Re,cs),T(Et,cs,null),s(de,gn),s(de,zo),m(e,oa,l),m(e,H,l),T(Xt,H,null),s(H,un),s(H,Go),s(H,_n),s(H,B),T(Pt,B,null),s(B,Tn),s(B,Ro),s(B,bn),T(Be,B,null),s(B,vn),T(Ve,B,null),m(e,sa,l),m(e,ce,l),s(ce,Ee),s(Ee,ms),T(Yt,ms,null),s(ce,yn),s(ce,Bo),m(e,aa,l),m(e,Z,l),T(Lt,Z,null),s(Z,Mn),s(Z,Vo),s(Z,wn),s(Z,Eo),s(Z,$n),s(Z,V),T(St,V,null),s(V,Cn),s(V,Xo),s(V,kn),T(Xe,V,null),s(V,Fn),T(Pe,V,null),m(e,na,l),m(e,me,l),s(me,Ye),s(Ye,ps),T(Ht,ps,null),s(me,In),s(me,Po),m(e,ra,l),m(e,j,l),T(qt,j,null),s(j,jn),s(j,Yo),s(j,xn),s(j,Lo),s(j,Wn),s(j,So),s(j,Jn),s(j,Ho),s(j,Dn),s(j,E),T(At,E,null),s(E,Zn),s(E,qo),s(E,Un),T(Le,E,null),s(E,Nn),T(Se,E,null),m(e,la,l),m(e,hs,l),ia=!0},p(e,[l]){const Qt={};l&2&&(Qt.$$scope={dirty:l,ctx:e}),fe.$set(Qt);const fs={};l&2&&(fs.$$scope={dirty:l,ctx:e}),Te.$set(fs);const gs={};l&2&&(gs.$$scope={dirty:l,ctx:e}),$e.$set(gs);const Ot={};l&2&&(Ot.$$scope={dirty:l,ctx:e}),Ce.$set(Ot);const us={};l&2&&(us.$$scope={dirty:l,ctx:e}),Fe.$set(us);const _s={};l&2&&(_s.$$scope={dirty:l,ctx:e}),Ie.$set(_s);const Kt={};l&2&&(Kt.$$scope={dirty:l,ctx:e}),je.$set(Kt);const Ts={};l&2&&(Ts.$$scope={dirty:l,ctx:e}),We.$set(Ts);const bs={};l&2&&(bs.$$scope={dirty:l,ctx:e}),Je.$set(bs);const eo={};l&2&&(eo.$$scope={dirty:l,ctx:e}),Ze.$set(eo);const vs={};l&2&&(vs.$$scope={dirty:l,ctx:e}),Ue.$set(vs);const ys={};l&2&&(ys.$$scope={dirty:l,ctx:e}),ze.$set(ys);const q={};l&2&&(q.$$scope={dirty:l,ctx:e}),Ge.$set(q);const to={};l&2&&(to.$$scope={dirty:l,ctx:e}),Be.$set(to);const Ms={};l&2&&(Ms.$$scope={dirty:l,ctx:e}),Ve.$set(Ms);const ws={};l&2&&(ws.$$scope={dirty:l,ctx:e}),Xe.$set(ws);const oo={};l&2&&(oo.$$scope={dirty:l,ctx:e}),Pe.$set(oo);const so={};l&2&&(so.$$scope={dirty:l,ctx:e}),Le.$set(so);const ao={};l&2&&(ao.$$scope={dirty:l,ctx:e}),Se.$set(ao)},i(e){ia||(b(at.$$.fragment,e),b(fe.$$.fragment,e),b(nt.$$.fragment,e),b(pt.$$.fragment,e),b(ft.$$.fragment,e),b(bt.$$.fragment,e),b(vt.$$.fragment,e),b(Te.$$.fragment,e),b(yt.$$.fragment,e),b(Mt.$$.fragment,e),b(wt.$$.fragment,e),b($t.$$.fragment,e),b(Ct.$$.fragment,e),b(kt.$$.fragment,e),b(Ft.$$.fragment,e),b(It.$$.fragment,e),b(jt.$$.fragment,e),b($e.$$.fragment,e),b(Ce.$$.fragment,e),b(xt.$$.fragment,e),b(Wt.$$.fragment,e),b(Fe.$$.fragment,e),b(Jt.$$.fragment,e),b(Ie.$$.fragment,e),b(je.$$.fragment,e),b(Dt.$$.fragment,e),b(Zt.$$.fragment,e),b(Ut.$$.fragment,e),b(We.$$.fragment,e),b(Je.$$.fragment,e),b(Nt.$$.fragment,e),b(zt.$$.fragment,e),b(Gt.$$.fragment,e),b(Ze.$$.fragment,e),b(Ue.$$.fragment,e),b(Rt.$$.fragment,e),b(Bt.$$.fragment,e),b(Vt.$$.fragment,e),b(ze.$$.fragment,e),b(Ge.$$.fragment,e),b(Et.$$.fragment,e),b(Xt.$$.fragment,e),b(Pt.$$.fragment,e),b(Be.$$.fragment,e),b(Ve.$$.fragment,e),b(Yt.$$.fragment,e),b(Lt.$$.fragment,e),b(St.$$.fragment,e),b(Xe.$$.fragment,e),b(Pe.$$.fragment,e),b(Ht.$$.fragment,e),b(qt.$$.fragment,e),b(At.$$.fragment,e),b(Le.$$.fragment,e),b(Se.$$.fragment,e),ia=!0)},o(e){v(at.$$.fragment,e),v(fe.$$.fragment,e),v(nt.$$.fragment,e),v(pt.$$.fragment,e),v(ft.$$.fragment,e),v(bt.$$.fragment,e),v(vt.$$.fragment,e),v(Te.$$.fragment,e),v(yt.$$.fragment,e),v(Mt.$$.fragment,e),v(wt.$$.fragment,e),v($t.$$.fragment,e),v(Ct.$$.fragment,e),v(kt.$$.fragment,e),v(Ft.$$.fragment,e),v(It.$$.fragment,e),v(jt.$$.fragment,e),v($e.$$.fragment,e),v(Ce.$$.fragment,e),v(xt.$$.fragment,e),v(Wt.$$.fragment,e),v(Fe.$$.fragment,e),v(Jt.$$.fragment,e),v(Ie.$$.fragment,e),v(je.$$.fragment,e),v(Dt.$$.fragment,e),v(Zt.$$.fragment,e),v(Ut.$$.fragment,e),v(We.$$.fragment,e),v(Je.$$.fragment,e),v(Nt.$$.fragment,e),v(zt.$$.fragment,e),v(Gt.$$.fragment,e),v(Ze.$$.fragment,e),v(Ue.$$.fragment,e),v(Rt.$$.fragment,e),v(Bt.$$.fragment,e),v(Vt.$$.fragment,e),v(ze.$$.fragment,e),v(Ge.$$.fragment,e),v(Et.$$.fragment,e),v(Xt.$$.fragment,e),v(Pt.$$.fragment,e),v(Be.$$.fragment,e),v(Ve.$$.fragment,e),v(Yt.$$.fragment,e),v(Lt.$$.fragment,e),v(St.$$.fragment,e),v(Xe.$$.fragment,e),v(Pe.$$.fragment,e),v(Ht.$$.fragment,e),v(qt.$$.fragment,e),v(At.$$.fragment,e),v(Le.$$.fragment,e),v(Se.$$.fragment,e),ia=!1},d(e){e&&(t(M),t(c),t(p),t(w),t($s),t(Cs),t(O),t(ks),t(rt),t(Fs),t(lt),t(Is),t(it),t(js),t(dt),t(xs),t(ct),t(Ws),t(mt),t(Js),t(K),t(Ds),t(ht),t(Zs),t(Us),t(gt),t(Ns),t(ut),t(zs),t(_t),t(Gs),t(Tt),t(Rs),t(ee),t(Bs),t(J),t(Vs),t(te),t(Es),t(oe),t(Xs),t(se),t(Ps),t(Y),t(Ys),t(ae),t(Ls),t(L),t(Ss),t(ne),t(Hs),t(x),t(qs),t(re),t(As),t(D),t(Qs),t(le),t(Os),t(I),t(Ks),t(ie),t(ea),t(S),t(ta),t(de),t(oa),t(H),t(sa),t(ce),t(aa),t(Z),t(na),t(me),t(ra),t(j),t(la),t(hs)),t(o),y(at),y(fe,e),y(nt),y(pt),y(ft,e),y(bt),y(vt),y(Te),y(yt),y(Mt),y(wt),y($t),y(Ct),y(kt),y(Ft),y(It),y(jt),y($e),y(Ce),y(xt),y(Wt),y(Fe),y(Jt),y(Ie),y(je),y(Dt),y(Zt),y(Ut),y(We),y(Je),y(Nt),y(zt),y(Gt),y(Ze),y(Ue),y(Rt),y(Bt),y(Vt),y(ze),y(Ge),y(Et),y(Xt),y(Pt),y(Be),y(Ve),y(Yt),y(Lt),y(St),y(Xe),y(Pe),y(Ht),y(qt),y(At),y(Le),y(Se)}}}const Il={local:"deit",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.DeiTConfig",title:"DeiTConfig"},{local:"transformers.DeiTFeatureExtractor",title:"DeiTFeatureExtractor"},{local:"transformers.DeiTImageProcessor",title:"DeiTImageProcessor"},{local:"transformers.DeiTModel",title:"DeiTModel"},{local:"transformers.DeiTForMaskedImageModeling",title:"DeiTForMaskedImageModeling"},{local:"transformers.DeiTForImageClassification",title:"DeiTForImageClassification"},{local:"transformers.DeiTForImageClassificationWithTeacher",title:"DeiTForImageClassificationWithTeacher"},{local:"transformers.TFDeiTModel",title:"TFDeiTModel"},{local:"transformers.TFDeiTForMaskedImageModeling",title:"TFDeiTForMaskedImageModeling"},{local:"transformers.TFDeiTForImageClassification",title:"TFDeiTForImageClassification"},{local:"transformers.TFDeiTForImageClassificationWithTeacher",title:"TFDeiTForImageClassificationWithTeacher"}],title:"DeiT"};function jl(C){return sl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Gl extends al{constructor(o){super(),nl(this,o,jl,Fl,ol,{})}}export{Gl as component};
