import{s as Qi,f as Di,o as Oi,n as I}from"../chunks/scheduler.9bc65507.js";import{S as Ki,i as el,g as n,s as l,u as _,A as tl,h as s,f as t,c as d,j as g,v,y as h,k as f,o as a,a as i,w as T,d as b,t as y,x as w}from"../chunks/index.78c82d43.js";import{T as te}from"../chunks/Tip.87d55b76.js";import{D as N}from"../chunks/Docstring.f3d04bd2.js";import{C as ct}from"../chunks/CodeBlock.48618ec2.js";import{I as B}from"../chunks/IconCopyLink.bedaa44d.js";import{E as dt}from"../chunks/ExampleCodeBlock.872b014d.js";import{P as Yi}from"../chunks/PipelineTag.75b0f707.js";function ol(C){let o,u="Example:",p,m,M;return m=new ct({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpVENvbmZpZyUyQyUyMFZpVE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFZpVCUyMHZpdC1iYXNlLXBhdGNoMTYtMjI0JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFZpVENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjB2aXQtYmFzZS1wYXRjaDE2LTIyNCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwVmlUTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ViTConfig, ViTModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the vit-base-patch16-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTModel(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`}}),{c(){o=n("p"),o.textContent=u,p=l(),_(m.$$.fragment)},l(c){o=s(c,"P",{"data-svelte-h":!0}),h(o)!=="svelte-11lpom8"&&(o.textContent=u),p=d(c),v(m.$$.fragment,c)},m(c,$){i(c,o,$),i(c,p,$),T(m,c,$),M=!0},p:I,i(c){M||(b(m.$$.fragment,c),M=!0)},o(c){y(m.$$.fragment,c),M=!1},d(c){c&&(t(o),t(p)),w(m,c)}}}function nl(C){let o,u=`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=u},l(p){o=s(p,"P",{"data-svelte-h":!0}),h(o)!=="svelte-fincs2"&&(o.innerHTML=u)},m(p,m){i(p,o,m)},p:I,d(p){p&&t(o)}}}function sl(C){let o,u="Example:",p,m,M;return m=new ct({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpVE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ2aXQtYmFzZS1wYXRjaDE2LTIyNC1pbjIxayUyMiklMEFtb2RlbCUyMCUzRCUyMFZpVE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ2aXQtYmFzZS1wYXRjaDE2LTIyNC1pbjIxayUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ViTModel
<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;google/vit-base-patch16-224-in21k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTModel.from_pretrained(<span class="hljs-string">&quot;google/vit-base-patch16-224-in21k&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">197</span>, <span class="hljs-number">768</span>]`}}),{c(){o=n("p"),o.textContent=u,p=l(),_(m.$$.fragment)},l(c){o=s(c,"P",{"data-svelte-h":!0}),h(o)!=="svelte-11lpom8"&&(o.textContent=u),p=d(c),v(m.$$.fragment,c)},m(c,$){i(c,o,$),i(c,p,$),T(m,c,$),M=!0},p:I,i(c){M||(b(m.$$.fragment,c),M=!0)},o(c){y(m.$$.fragment,c),M=!1},d(c){c&&(t(o),t(p)),w(m,c)}}}function al(C){let o,u=`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=u},l(p){o=s(p,"P",{"data-svelte-h":!0}),h(o)!=="svelte-7i3y9o"&&(o.innerHTML=u)},m(p,m){i(p,o,m)},p:I,d(p){p&&t(o)}}}function rl(C){let o,u=`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=u},l(p){o=s(p,"P",{"data-svelte-h":!0}),h(o)!=="svelte-fincs2"&&(o.innerHTML=u)},m(p,m){i(p,o,m)},p:I,d(p){p&&t(o)}}}function il(C){let o,u="Examples:",p,m,M;return m=new ct({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpVEZvck1hc2tlZEltYWdlTW9kZWxpbmclMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdml0LWJhc2UtcGF0Y2gxNi0yMjQtaW4yMWslMjIpJTBBbW9kZWwlMjAlM0QlMjBWaVRGb3JNYXNrZWRJbWFnZU1vZGVsaW5nLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ2aXQtYmFzZS1wYXRjaDE2LTIyNC1pbjIxayUyMiklMEElMEFudW1fcGF0Y2hlcyUyMCUzRCUyMChtb2RlbC5jb25maWcuaW1hZ2Vfc2l6ZSUyMCUyRiUyRiUyMG1vZGVsLmNvbmZpZy5wYXRjaF9zaXplKSUyMCoqJTIwMiUwQXBpeGVsX3ZhbHVlcyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLnBpeGVsX3ZhbHVlcyUwQSUyMyUyMGNyZWF0ZSUyMHJhbmRvbSUyMGJvb2xlYW4lMjBtYXNrJTIwb2YlMjBzaGFwZSUyMChiYXRjaF9zaXplJTJDJTIwbnVtX3BhdGNoZXMpJTBBYm9vbF9tYXNrZWRfcG9zJTIwJTNEJTIwdG9yY2gucmFuZGludChsb3clM0QwJTJDJTIwaGlnaCUzRDIlMkMlMjBzaXplJTNEKDElMkMlMjBudW1fcGF0Y2hlcykpLmJvb2woKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChwaXhlbF92YWx1ZXMlMkMlMjBib29sX21hc2tlZF9wb3MlM0Rib29sX21hc2tlZF9wb3MpJTBBbG9zcyUyQyUyMHJlY29uc3RydWN0ZWRfcGl4ZWxfdmFsdWVzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTJDJTIwb3V0cHV0cy5yZWNvbnN0cnVjdGlvbiUwQWxpc3QocmVjb25zdHJ1Y3RlZF9waXhlbF92YWx1ZXMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ViTForMaskedImageModeling
<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;google/vit-base-patch16-224-in21k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTForMaskedImageModeling.from_pretrained(<span class="hljs-string">&quot;google/vit-base-patch16-224-in21k&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>]`}}),{c(){o=n("p"),o.textContent=u,p=l(),_(m.$$.fragment)},l(c){o=s(c,"P",{"data-svelte-h":!0}),h(o)!=="svelte-kvfsh7"&&(o.textContent=u),p=d(c),v(m.$$.fragment,c)},m(c,$){i(c,o,$),i(c,p,$),T(m,c,$),M=!0},p:I,i(c){M||(b(m.$$.fragment,c),M=!0)},o(c){y(m.$$.fragment,c),M=!1},d(c){c&&(t(o),t(p)),w(m,c)}}}function ll(C){let o,u=`Note that it’s possible to fine-tune ViT on higher resolution images than the ones it has been trained on, by
setting <code>interpolate_pos_encoding</code> to <code>True</code> in the forward of the model. This will interpolate the pre-trained
position embeddings to the higher resolution.`;return{c(){o=n("p"),o.innerHTML=u},l(p){o=s(p,"P",{"data-svelte-h":!0}),h(o)!=="svelte-111lhr1"&&(o.innerHTML=u)},m(p,m){i(p,o,m)},p:I,d(p){p&&t(o)}}}function dl(C){let o,u=`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=u},l(p){o=s(p,"P",{"data-svelte-h":!0}),h(o)!=="svelte-fincs2"&&(o.innerHTML=u)},m(p,m){i(p,o,m)},p:I,d(p){p&&t(o)}}}function cl(C){let o,u="Example:",p,m,M;return m=new ct({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpVEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnZpdC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwVmlURm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdml0LWJhc2UtcGF0Y2gxNi0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ViTForImageClassification
<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;google/vit-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ViTForImageClassification.from_pretrained(<span class="hljs-string">&quot;google/vit-base-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])
Egyptian cat`}}),{c(){o=n("p"),o.textContent=u,p=l(),_(m.$$.fragment)},l(c){o=s(c,"P",{"data-svelte-h":!0}),h(o)!=="svelte-11lpom8"&&(o.textContent=u),p=d(c),v(m.$$.fragment,c)},m(c,$){i(c,o,$),i(c,p,$),T(m,c,$),M=!0},p:I,i(c){M||(b(m.$$.fragment,c),M=!0)},o(c){y(m.$$.fragment,c),M=!1},d(c){c&&(t(o),t(p)),w(m,c)}}}function pl(C){let o,u="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",p,m,M="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",c,$,G=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,q,j,be=`<li>a single Tensor with <code>pixel_values</code> only and nothing else: <code>model(pixel_values)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([pixel_values, attention_mask])</code> or <code>model([pixel_values, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;pixel_values&quot;: pixel_values, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,P,V,H=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){o=n("p"),o.innerHTML=u,p=l(),m=n("ul"),m.innerHTML=M,c=l(),$=n("p"),$.innerHTML=G,q=l(),j=n("ul"),j.innerHTML=be,P=l(),V=n("p"),V.innerHTML=H},l(x){o=s(x,"P",{"data-svelte-h":!0}),h(o)!=="svelte-1ajbfxg"&&(o.innerHTML=u),p=d(x),m=s(x,"UL",{"data-svelte-h":!0}),h(m)!=="svelte-qm1t26"&&(m.innerHTML=M),c=d(x),$=s(x,"P",{"data-svelte-h":!0}),h($)!=="svelte-1v9qsc5"&&($.innerHTML=G),q=d(x),j=s(x,"UL",{"data-svelte-h":!0}),h(j)!=="svelte-99h8aq"&&(j.innerHTML=be),P=d(x),V=s(x,"P",{"data-svelte-h":!0}),h(V)!=="svelte-1an3odd"&&(V.innerHTML=H)},m(x,F){i(x,o,F),i(x,p,F),i(x,m,F),i(x,c,F),i(x,$,F),i(x,q,F),i(x,j,F),i(x,P,F),i(x,V,F)},p:I,d(x){x&&(t(o),t(p),t(m),t(c),t($),t(q),t(j),t(P),t(V))}}}function ml(C){let o,u=`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=u},l(p){o=s(p,"P",{"data-svelte-h":!0}),h(o)!=="svelte-fincs2"&&(o.innerHTML=u)},m(p,m){i(p,o,m)},p:I,d(p){p&&t(o)}}}function hl(C){let o,u="Example:",p,m,M;return m=new ct({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGVmlUTW9kZWwlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ2aXQtYmFzZS1wYXRjaDE2LTIyNC1pbjIxayUyMiklMEFtb2RlbCUyMCUzRCUyMFRGVmlUTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnZpdC1iYXNlLXBhdGNoMTYtMjI0LWluMjFrJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFViTModel
<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;google/vit-base-patch16-224-in21k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFViTModel.from_pretrained(<span class="hljs-string">&quot;google/vit-base-patch16-224-in21k&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">197</span>, <span class="hljs-number">768</span>]`}}),{c(){o=n("p"),o.textContent=u,p=l(),_(m.$$.fragment)},l(c){o=s(c,"P",{"data-svelte-h":!0}),h(o)!=="svelte-11lpom8"&&(o.textContent=u),p=d(c),v(m.$$.fragment,c)},m(c,$){i(c,o,$),i(c,p,$),T(m,c,$),M=!0},p:I,i(c){M||(b(m.$$.fragment,c),M=!0)},o(c){y(m.$$.fragment,c),M=!1},d(c){c&&(t(o),t(p)),w(m,c)}}}function fl(C){let o,u=`Note that it’s possible to fine-tune ViT on higher resolution images than the ones it has been trained on, by
setting <code>interpolate_pos_encoding</code> to <code>True</code> in the forward of the model. This will interpolate the pre-trained
position embeddings to the higher resolution.`;return{c(){o=n("p"),o.innerHTML=u},l(p){o=s(p,"P",{"data-svelte-h":!0}),h(o)!=="svelte-111lhr1"&&(o.innerHTML=u)},m(p,m){i(p,o,m)},p:I,d(p){p&&t(o)}}}function ul(C){let o,u="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",p,m,M="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",c,$,G=`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,q,j,be=`<li>a single Tensor with <code>pixel_values</code> only and nothing else: <code>model(pixel_values)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([pixel_values, attention_mask])</code> or <code>model([pixel_values, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;pixel_values&quot;: pixel_values, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,P,V,H=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){o=n("p"),o.innerHTML=u,p=l(),m=n("ul"),m.innerHTML=M,c=l(),$=n("p"),$.innerHTML=G,q=l(),j=n("ul"),j.innerHTML=be,P=l(),V=n("p"),V.innerHTML=H},l(x){o=s(x,"P",{"data-svelte-h":!0}),h(o)!=="svelte-1ajbfxg"&&(o.innerHTML=u),p=d(x),m=s(x,"UL",{"data-svelte-h":!0}),h(m)!=="svelte-qm1t26"&&(m.innerHTML=M),c=d(x),$=s(x,"P",{"data-svelte-h":!0}),h($)!=="svelte-1v9qsc5"&&($.innerHTML=G),q=d(x),j=s(x,"UL",{"data-svelte-h":!0}),h(j)!=="svelte-99h8aq"&&(j.innerHTML=be),P=d(x),V=s(x,"P",{"data-svelte-h":!0}),h(V)!=="svelte-1an3odd"&&(V.innerHTML=H)},m(x,F){i(x,o,F),i(x,p,F),i(x,m,F),i(x,c,F),i(x,$,F),i(x,q,F),i(x,j,F),i(x,P,F),i(x,V,F)},p:I,d(x){x&&(t(o),t(p),t(m),t(c),t($),t(q),t(j),t(P),t(V))}}}function gl(C){let o,u=`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=u},l(p){o=s(p,"P",{"data-svelte-h":!0}),h(o)!=="svelte-fincs2"&&(o.innerHTML=u)},m(p,m){i(p,o,m)},p:I,d(p){p&&t(o)}}}function _l(C){let o,u="Example:",p,m,M;return m=new ct({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGVmlURm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdml0LWJhc2UtcGF0Y2gxNi0yMjQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlZpVEZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnZpdC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFViTForImageClassification
<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;google/vit-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFViTForImageClassification.from_pretrained(<span class="hljs-string">&quot;google/vit-base-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])
Egyptian cat`}}),{c(){o=n("p"),o.textContent=u,p=l(),_(m.$$.fragment)},l(c){o=s(c,"P",{"data-svelte-h":!0}),h(o)!=="svelte-11lpom8"&&(o.textContent=u),p=d(c),v(m.$$.fragment,c)},m(c,$){i(c,o,$),i(c,p,$),T(m,c,$),M=!0},p:I,i(c){M||(b(m.$$.fragment,c),M=!0)},o(c){y(m.$$.fragment,c),M=!1},d(c){c&&(t(o),t(p)),w(m,c)}}}function vl(C){let o,u=`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=u},l(p){o=s(p,"P",{"data-svelte-h":!0}),h(o)!=="svelte-fincs2"&&(o.innerHTML=u)},m(p,m){i(p,o,m)},p:I,d(p){p&&t(o)}}}function Tl(C){let o,u="Examples:",p,m,M;return m=new ct({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEZsYXhWaVRNb2RlbCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGdml0LWJhc2UtcGF0Y2gxNi0yMjQtaW4yMWslMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4VmlUTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnZpdC1iYXNlLXBhdGNoMTYtMjI0LWluMjFrJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, FlaxViTModel
<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;google/vit-base-patch16-224-in21k&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxViTModel.from_pretrained(<span class="hljs-string">&quot;google/vit-base-patch16-224-in21k&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;np&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`}}),{c(){o=n("p"),o.textContent=u,p=l(),_(m.$$.fragment)},l(c){o=s(c,"P",{"data-svelte-h":!0}),h(o)!=="svelte-kvfsh7"&&(o.textContent=u),p=d(c),v(m.$$.fragment,c)},m(c,$){i(c,o,$),i(c,p,$),T(m,c,$),M=!0},p:I,i(c){M||(b(m.$$.fragment,c),M=!0)},o(c){y(m.$$.fragment,c),M=!1},d(c){c&&(t(o),t(p)),w(m,c)}}}function bl(C){let o,u=`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=u},l(p){o=s(p,"P",{"data-svelte-h":!0}),h(o)!=="svelte-fincs2"&&(o.innerHTML=u)},m(p,m){i(p,o,m)},p:I,d(p){p&&t(o)}}}function yl(C){let o,u="Example:",p,m,M;return m=new ct({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEZsYXhWaVRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwamF4JTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ2aXQtYmFzZS1wYXRjaDE2LTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhWaVRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZ2aXQtYmFzZS1wYXRjaDE2LTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfY2xhc3NfaWR4JTIwJTNEJTIwamF4Lm51bXB5LmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpJTBBcHJpbnQoJTIyUHJlZGljdGVkJTIwY2xhc3MlM0ElMjIlMkMlMjBtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfY2xhc3NfaWR4Lml0ZW0oKSU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, FlaxViTForImageClassification
<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> jax
<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;google/vit-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxViTForImageClassification.from_pretrained(<span class="hljs-string">&quot;google/vit-base-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;np&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 = jax.numpy.argmax(logits, axis=-<span class="hljs-number">1</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[predicted_class_idx.item()])`}}),{c(){o=n("p"),o.textContent=u,p=l(),_(m.$$.fragment)},l(c){o=s(c,"P",{"data-svelte-h":!0}),h(o)!=="svelte-11lpom8"&&(o.textContent=u),p=d(c),v(m.$$.fragment,c)},m(c,$){i(c,o,$),i(c,p,$),T(m,c,$),M=!0},p:I,i(c){M||(b(m.$$.fragment,c),M=!0)},o(c){y(m.$$.fragment,c),M=!1},d(c){c&&(t(o),t(p)),w(m,c)}}}function wl(C){let o,u,p,m,M,c,$,G,q,j,be="Vision Transformer (ViT)",P,V,H,x,F,Ys,wo,gr="Overview",Rn,pt,_r=`The Vision Transformer (ViT) model was proposed in <a href="https://arxiv.org/abs/2010.11929" rel="nofollow">An Image is Worth 16x16 Words: Transformers for Image Recognition
at Scale</a> by Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk
Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob
Uszkoreit, Neil Houlsby. It’s the first paper that successfully trains a Transformer encoder on ImageNet, attaining
very good results compared to familiar convolutional architectures.`,Bn,mt,vr="The abstract from the paper is the following:",Gn,ht,Tr=`<em>While the Transformer architecture has become the de-facto standard for natural language processing tasks, its
applications to computer vision remain limited. In vision, attention is either applied in conjunction with
convolutional networks, or used to replace certain components of convolutional networks while keeping their overall
structure in place. We show that this reliance on CNNs is not necessary and a pure transformer applied directly to
sequences of image patches can perform very well on image classification tasks. When pre-trained on large amounts of
data and transferred to multiple mid-sized or small image recognition benchmarks (ImageNet, CIFAR-100, VTAB, etc.),
Vision Transformer (ViT) attains excellent results compared to state-of-the-art convolutional networks while requiring
substantially fewer computational resources to train.</em>`,qn,ft,br="Tips:",Sn,ut,yr=`<li>Demo notebooks regarding inference as well as fine-tuning ViT on custom data can be found <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/VisionTransformer" rel="nofollow">here</a>.</li> <li>To feed images to the Transformer encoder, each image is split into a sequence of fixed-size non-overlapping patches,
which are then linearly embedded. A [CLS] token is added to serve as representation of an entire image, which can be
used for classification. The authors also add absolute position embeddings, and feed the resulting sequence of
vectors to a standard Transformer encoder.</li> <li>As the Vision Transformer expects each image to be of the same size (resolution), one can use
<a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTImageProcessor">ViTImageProcessor</a> to resize (or rescale) and normalize images for the model.</li> <li>Both the patch resolution and image resolution used during pre-training or fine-tuning are reflected in the name of
each checkpoint. For example, <code>google/vit-base-patch16-224</code> refers to a base-sized architecture with patch
resolution of 16x16 and fine-tuning resolution of 224x224. All checkpoints can be found on the <a href="https://huggingface.co/models?search=vit" rel="nofollow">hub</a>.</li> <li>The available checkpoints are either (1) pre-trained on <a href="http://www.image-net.org/" rel="nofollow">ImageNet-21k</a> (a collection of
14 million images and 21k classes) only, or (2) also fine-tuned on <a href="http://www.image-net.org/challenges/LSVRC/2012/" rel="nofollow">ImageNet</a> (also referred to as ILSVRC 2012, a collection of 1.3 million
images and 1,000 classes).</li> <li>The Vision Transformer was pre-trained using a resolution of 224x224. During fine-tuning, it is often beneficial to
use a higher resolution than pre-training <a href="https://arxiv.org/abs/1906.06423" rel="nofollow">(Touvron et al., 2019)</a>, <a href="https://arxiv.org/abs/1912.11370" rel="nofollow">(Kolesnikov
et al., 2020)</a>. In order to fine-tune at higher resolution, the authors perform
2D interpolation of the pre-trained position embeddings, according to their location in the original image.</li> <li>The best results are obtained with supervised pre-training, which is not the case in NLP. The authors also performed
an experiment with a self-supervised pre-training objective, namely masked patched prediction (inspired by masked
language modeling). With this approach, the smaller ViT-B/16 model achieves 79.9% accuracy on ImageNet, a significant
improvement of 2% to training from scratch, but still 4% behind supervised pre-training.</li>`,An,ye,wr,Xn,gt,Mr='ViT architecture. Taken from the <a href="https://arxiv.org/abs/2010.11929">original paper.</a>',Yn,_t,$r="Following the original Vision Transformer, some follow-up works have been made:",Qn,vt,xr=`<li><p><a href="deit">DeiT</a> (Data-efficient Image Transformers) by Facebook AI. DeiT models are distilled vision transformers.
The authors of DeiT also released more efficiently trained ViT models, which you can directly plug into <a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTModel">ViTModel</a> or
<a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</a>. 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.33.3/en/model_doc/deit#transformers.DeiTImageProcessor">DeiTImageProcessor</a> in order to prepare images for the model.</p></li> <li><p><a href="beit">BEiT</a> (BERT pre-training of Image Transformers) by Microsoft Research. BEiT models outperform supervised pre-trained
vision transformers using a self-supervised method inspired by BERT (masked image modeling) and based on a VQ-VAE.</p></li> <li><p>DINO (a method for self-supervised training of Vision Transformers) by Facebook AI. Vision Transformers trained using
the DINO method show very interesting properties not seen with convolutional models. They are capable of segmenting
objects, without having ever been trained to do so. DINO checkpoints can be found on the <a href="https://huggingface.co/models?other=dino" rel="nofollow">hub</a>.</p></li> <li><p><a href="vit_mae">MAE</a> (Masked Autoencoders) by Facebook AI. By pre-training Vision Transformers to reconstruct pixel values for a high portion
(75%) of masked patches (using an asymmetric encoder-decoder architecture), the authors show that this simple method outperforms
supervised pre-training after fine-tuning.</p></li>`,Dn,Tt,Cr=`This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>. The original code (written in JAX) can be
found <a href="https://github.com/google-research/vision_transformer" rel="nofollow">here</a>.`,On,bt,Fr=`Note that we converted the weights from Ross Wightman’s <a href="https://github.com/rwightman/pytorch-image-models" rel="nofollow">timm library</a>, who already converted the weights from JAX to PyTorch. Credits
go to him!`,Kn,ie,we,_n,yt,Qs,Mo,Vr="Resources",es,wt,jr="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ViT.",ts,Mt,os,$t,Ir='<li><a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</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>A blog on fine-tuning <a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</a> on a custom dataset can be found <a href="https://huggingface.co/blog/fine-tune-vit" rel="nofollow">here</a>.</li> <li>More demo notebooks to fine-tune <a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</a> can be found <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/VisionTransformer" rel="nofollow">here</a>.</li> <li><a href="../tasks/image_classification">Image classification task guide</a></li>',ns,xt,kr="Besides that:",ss,Ct,Ur='<li><a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTForMaskedImageModeling">ViTForMaskedImageModeling</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-pretraining" rel="nofollow">example script</a>.</li>',as,Ft,Jr="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,le,Me,vn,Vt,Ds,$o,Nr="Resources",is,jt,Wr="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ViT. 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.",ls,It,Zr="<code>ViTForImageClassification</code> is supported by:",ds,kt,cs,Ut,zr='<li>A blog post on how to <a href="https://huggingface.co/blog/fine-tune-vit" rel="nofollow">Fine-Tune ViT for Image Classification with Hugging Face Transformers</a></li> <li>A blog post on <a href="https://www.philschmid.de/image-classification-huggingface-transformers-keras" rel="nofollow">Image Classification with Hugging Face Transformers and <code>Keras</code></a></li> <li>A notebook on <a href="https://github.com/huggingface/notebooks/blob/main/examples/image_classification.ipynb" rel="nofollow">Fine-tuning for Image Classification with Hugging Face Transformers</a></li> <li>A notebook on how to <a href="https://github.com/NielsRogge/Transformers-Tutorials/blob/master/VisionTransformer/Fine_tuning_the_Vision_Transformer_on_CIFAR_10_with_the_%F0%9F%A4%97_Trainer.ipynb" rel="nofollow">Fine-tune the Vision Transformer on CIFAR-10 with the Hugging Face Trainer</a></li> <li>A notebook on how to <a href="https://github.com/NielsRogge/Transformers-Tutorials/blob/master/VisionTransformer/Fine_tuning_the_Vision_Transformer_on_CIFAR_10_with_PyTorch_Lightning.ipynb" rel="nofollow">Fine-tune the Vision Transformer on CIFAR-10 with PyTorch Lightning</a></li>',ps,Jt,Pr="⚗️ Optimization",ms,Nt,Hr='<li>A blog post on how to <a href="https://www.philschmid.de/optimizing-vision-transformer" rel="nofollow">Accelerate Vision Transformer (ViT) with Quantization using Optimum</a></li>',hs,Wt,Lr="⚡️ Inference",fs,Zt,Er='<li>A notebook on <a href="https://github.com/NielsRogge/Transformers-Tutorials/blob/master/VisionTransformer/Quick_demo_of_HuggingFace_version_of_Vision_Transformer_inference.ipynb" rel="nofollow">Quick demo: Vision Transformer (ViT) by Google Brain</a></li>',us,zt,Rr="🚀 Deploy",gs,Pt,Br='<li>A blog post on <a href="https://huggingface.co/blog/tf-serving-vision" rel="nofollow">Deploying Tensorflow Vision Models in Hugging Face with TF Serving</a></li> <li>A blog post on <a href="https://huggingface.co/blog/deploy-vertex-ai" rel="nofollow">Deploying Hugging Face ViT on Vertex AI</a></li> <li>A blog post on <a href="https://huggingface.co/blog/deploy-tfserving-kubernetes" rel="nofollow">Deploying Hugging Face ViT on Kubernetes with TF Serving</a></li>',_s,de,$e,Tn,Ht,Os,xo,Gr="ViTConfig",vs,S,Lt,Ks,Co,qr=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTModel">ViTModel</a>. It is used to instantiate an ViT
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the ViT
<a href="https://huggingface.co/google/vit-base-patch16-224" rel="nofollow">google/vit-base-patch16-224</a> architecture.`,ea,Fo,Sr=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/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.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ta,xe,Ts,ce,Ce,bn,Et,oa,Vo,Ar="ViTFeatureExtractor",bs,pe,Rt,na,Fe,Bt,sa,jo,Xr="Preprocess an image or a batch of images.",ys,me,Ve,yn,Gt,aa,Io,Yr="ViTImageProcessor",ws,oe,qt,ra,ko,Qr="Constructs a ViT image processor.",ia,je,St,la,Uo,Dr="Preprocess an image or batch of images.",Ms,he,Ie,wn,At,da,Jo,Or="ViTModel",$s,ne,Xt,ca,No,Kr=`The bare ViT 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.`,pa,A,Yt,ma,Wo,ei='The <a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTModel">ViTModel</a> forward method, overrides the <code>__call__</code> special method.',ha,ke,fa,Ue,xs,fe,Je,Mn,Qt,ua,Zo,ti="ViTForMaskedImageModeling",Cs,Z,Dt,ga,zo,oi='ViT 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>.',_a,Ne,va,Po,ni=`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.`,Ta,X,Ot,ba,Ho,si='The <a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTForMaskedImageModeling">ViTForMaskedImageModeling</a> forward method, overrides the <code>__call__</code> special method.',ya,We,wa,Ze,Fs,ue,ze,$n,Kt,Ma,Lo,ai="ViTForImageClassification",Vs,z,eo,$a,Eo,ri=`ViT 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.`,xa,Pe,Ca,Ro,ii=`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.`,Fa,Y,to,Va,Bo,li='The <a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTForImageClassification">ViTForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',ja,He,Ia,Le,js,ge,Ee,xn,oo,ka,Go,di="TFViTModel",Is,W,no,Ua,qo,ci="The bare ViT Model transformer outputting raw hidden-states without any specific head on top.",Ja,So,pi=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Na,Ao,mi=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,Wa,Re,Za,Q,so,za,Xo,hi='The <a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.TFViTModel">TFViTModel</a> forward method, overrides the <code>__call__</code> special method.',Pa,Be,Ha,Ge,ks,_e,qe,Cn,ao,La,Yo,fi="TFViTForImageClassification",Us,k,ro,Ea,Qo,ui=`ViT 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.`,Ra,Se,Ba,Do,gi=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Ga,Oo,_i=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,qa,Ae,Sa,D,io,Aa,Ko,vi='The <a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.TFViTForImageClassification">TFViTForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Xa,Xe,Ya,Ye,Js,ve,Qe,Fn,lo,Qa,en,Ti="FlaxVitModel",Ns,U,co,Da,tn,bi="The bare ViT Model transformer outputting raw hidden-states without any specific head on top.",Oa,on,yi=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,Ka,nn,wi=`This model is also a Flax Linen <a href="https://flax.readthedocs.io/en/latest/flax.linen.html#module" rel="nofollow">flax.linen.Module</a>
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`,er,sn,Mi="Finally, this model supports inherent JAX features such as:",tr,an,$i='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',or,O,po,nr,rn,xi="The <code>FlaxViTPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",sr,De,ar,Oe,Ws,Te,Ke,Vn,mo,rr,ln,Ci="FlaxViTForImageClassification",Zs,J,ho,ir,dn,Fi=`ViT 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.`,lr,cn,Vi=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,dr,pn,ji=`This model is also a Flax Linen <a href="https://flax.readthedocs.io/en/latest/flax.linen.html#module" rel="nofollow">flax.linen.Module</a>
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`,cr,mn,Ii="Finally, this model supports inherent JAX features such as:",pr,hn,ki='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',mr,K,fo,hr,fn,Ui="The <code>FlaxViTPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",fr,et,ur,tt,zs,jn,Ps;return G=new B({}),F=new B({}),yt=new B({}),Mt=new Yi({props:{pipeline:"image-classification"}}),Vt=new B({}),kt=new Yi({props:{pipeline:"image-classification"}}),Ht=new B({}),Lt=new N({props:{name:"class transformers.ViTConfig",anchor:"transformers.ViTConfig",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.ViTConfig.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.ViTConfig.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.ViTConfig.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.ViTConfig.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.ViTConfig.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.ViTConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.ViTConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.ViTConfig.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.ViTConfig.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.ViTConfig.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.ViTConfig.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.ViTConfig.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.ViTConfig.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.ViTConfig.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.33.3/src/transformers/models/vit/configuration_vit.py#L35"}}),xe=new dt({props:{anchor:"transformers.ViTConfig.example",$$slots:{default:[ol]},$$scope:{ctx:C}}}),Et=new B({}),Rt=new N({props:{name:"class transformers.ViTFeatureExtractor",anchor:"transformers.ViTFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/vit/feature_extraction_vit.py#L26"}}),Bt=new N({props:{name:"__call__",anchor:"transformers.ViTFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/image_processing_utils.py#L544"}}),Gt=new B({}),qt=new N({props:{name:"class transformers.ViTImageProcessor",anchor:"transformers.ViTImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Union[typing.Dict[str, int], NoneType] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{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.ViTImageProcessor.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[&quot;height&quot;], size[&quot;width&quot;])</code>. Can be overridden by the <code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.ViTImageProcessor.size",description:`<strong>size</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.ViTImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by the <code>resample</code> parameter in the
<code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.ViTImageProcessor.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.ViTImageProcessor.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.ViTImageProcessor.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.ViTImageProcessor.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.ViTImageProcessor.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.33.3/src/transformers/models/vit/image_processing_vit.py#L41"}}),St=new N({props:{name:"preprocess",anchor:"transformers.ViTImageProcessor.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:": typing.Optional[bool] = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[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:": typing.Union[str, transformers.image_utils.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.ViTImageProcessor.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.ViTImageProcessor.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.ViTImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Dictionary in the format <code>{&quot;height&quot;: h, &quot;width&quot;: w}</code> specifying the size of the output image after
resizing.`,name:"size"},{anchor:"transformers.ViTImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code> filter, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
<code>PILImageResampling</code> filter to use if resizing the image e.g. <code>PILImageResampling.BILINEAR</code>. Only has
an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.ViTImageProcessor.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.ViTImageProcessor.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.ViTImageProcessor.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.ViTImageProcessor.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 to use if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.ViTImageProcessor.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 to use if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_std"},{anchor:"transformers.ViTImageProcessor.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>Unset: 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.ViTImageProcessor.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>&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>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.ViTImageProcessor.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.33.3/src/transformers/models/vit/image_processing_vit.py#L146"}}),At=new B({}),Xt=new N({props:{name:"class transformers.ViTModel",anchor:"transformers.ViTModel",parameters:[{name:"config",val:": ViTConfig"},{name:"add_pooling_layer",val:": bool = True"},{name:"use_mask_token",val:": bool = False"}],parametersDescription:[{anchor:"transformers.ViTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTConfig">ViTConfig</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.33.3/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.33.3/src/transformers/models/vit/modeling_vit.py#L515"}}),Yt=new N({props:{name:"forward",anchor:"transformers.ViTModel.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:"interpolate_pos_encoding",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ViTModel.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.33.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.33.3/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ViTModel.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.ViTModel.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.ViTModel.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.ViTModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.ViTModel.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.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ViTModel.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.33.3/src/transformers/models/vit/modeling_vit.py#L540",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/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.33.3/en/model_doc/vit#transformers.ViTConfig"
>ViTConfig</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.33.3/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ke=new te({props:{$$slots:{default:[nl]},$$scope:{ctx:C}}}),Ue=new dt({props:{anchor:"transformers.ViTModel.forward.example",$$slots:{default:[sl]},$$scope:{ctx:C}}}),Qt=new B({}),Dt=new N({props:{name:"class transformers.ViTForMaskedImageModeling",anchor:"transformers.ViTForMaskedImageModeling",parameters:[{name:"config",val:": ViTConfig"}],parametersDescription:[{anchor:"transformers.ViTForMaskedImageModeling.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTConfig">ViTConfig</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.33.3/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.33.3/src/transformers/models/vit/modeling_vit.py#L637"}}),Ne=new te({props:{$$slots:{default:[al]},$$scope:{ctx:C}}}),Ot=new N({props:{name:"forward",anchor:"transformers.ViTForMaskedImageModeling.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:"interpolate_pos_encoding",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ViTForMaskedImageModeling.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.33.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.33.3/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ViTForMaskedImageModeling.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.ViTForMaskedImageModeling.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.ViTForMaskedImageModeling.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.ViTForMaskedImageModeling.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.ViTForMaskedImageModeling.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.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ViTForMaskedImageModeling.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.33.3/src/transformers/models/vit/modeling_vit.py#L655",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.33.3/en/model_doc/vit#transformers.ViTConfig"
>ViTConfig</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>
`}}),We=new te({props:{$$slots:{default:[rl]},$$scope:{ctx:C}}}),Ze=new dt({props:{anchor:"transformers.ViTForMaskedImageModeling.forward.example",$$slots:{default:[il]},$$scope:{ctx:C}}}),Kt=new B({}),eo=new N({props:{name:"class transformers.ViTForImageClassification",anchor:"transformers.ViTForImageClassification",parameters:[{name:"config",val:": ViTConfig"}],parametersDescription:[{anchor:"transformers.ViTForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTConfig">ViTConfig</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.33.3/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.33.3/src/transformers/models/vit/modeling_vit.py#L766"}}),Pe=new te({props:{$$slots:{default:[ll]},$$scope:{ctx:C}}}),to=new N({props:{name:"forward",anchor:"transformers.ViTForImageClassification.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:"interpolate_pos_encoding",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ViTForImageClassification.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.33.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.33.3/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.ViTForImageClassification.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.ViTForImageClassification.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.ViTForImageClassification.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.ViTForImageClassification.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.ViTForImageClassification.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.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ViTForImageClassification.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.33.3/src/transformers/models/vit/modeling_vit.py#L779",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/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.33.3/en/model_doc/vit#transformers.ViTConfig"
>ViTConfig</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.33.3/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),He=new te({props:{$$slots:{default:[dl]},$$scope:{ctx:C}}}),Le=new dt({props:{anchor:"transformers.ViTForImageClassification.forward.example",$$slots:{default:[cl]},$$scope:{ctx:C}}}),oo=new B({}),no=new N({props:{name:"class transformers.TFViTModel",anchor:"transformers.TFViTModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFViTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTConfig">ViTConfig</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.33.3/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/vit/modeling_tf_vit.py#L631"}}),Re=new te({props:{$$slots:{default:[pl]},$$scope:{ctx:C}}}),so=new N({props:{name:"call",anchor:"transformers.TFViTModel.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFViTModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.33.3/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.TFViTModel.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFViTModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFViTModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFViTModel.call.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.TFViTModel.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.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFViTModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/vit/modeling_tf_vit.py#L637",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/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.33.3/en/model_doc/vit#transformers.ViTConfig"
>ViTConfig</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.33.3/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Be=new te({props:{$$slots:{default:[ml]},$$scope:{ctx:C}}}),Ge=new dt({props:{anchor:"transformers.TFViTModel.call.example",$$slots:{default:[hl]},$$scope:{ctx:C}}}),ao=new B({}),ro=new N({props:{name:"class transformers.TFViTForImageClassification",anchor:"transformers.TFViTForImageClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFViTForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTConfig">ViTConfig</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.33.3/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/vit/modeling_tf_vit.py#L704"}}),Se=new te({props:{$$slots:{default:[fl]},$$scope:{ctx:C}}}),Ae=new te({props:{$$slots:{default:[ul]},$$scope:{ctx:C}}}),io=new N({props:{name:"call",anchor:"transformers.TFViTForImageClassification.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFViTForImageClassification.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.33.3/en/model_doc/mobilevit#transformers.MobileViTFeatureExtractor.__call__">ViTImageProcessor.<strong>call</strong>()</a>
for details.`,name:"pixel_values"},{anchor:"transformers.TFViTForImageClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFViTForImageClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFViTForImageClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFViTForImageClassification.call.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"},{anchor:"transformers.TFViTForImageClassification.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.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFViTForImageClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFViTForImageClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</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.33.3/src/transformers/models/vit/modeling_tf_vit.py#L718",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</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.33.3/en/model_doc/vit#transformers.ViTConfig"
>ViTConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</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 + 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.33.3/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Xe=new te({props:{$$slots:{default:[gl]},$$scope:{ctx:C}}}),Ye=new dt({props:{anchor:"transformers.TFViTForImageClassification.call.example",$$slots:{default:[_l]},$$scope:{ctx:C}}}),lo=new B({}),co=new N({props:{name:"class transformers.FlaxViTModel",anchor:"transformers.FlaxViTModel",parameters:[{name:"config",val:": ViTConfig"},{name:"input_shape",val:" = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxViTModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTConfig">ViTConfig</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.33.3/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxViTModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/vit/modeling_flax_vit.py#L555"}}),po=new N({props:{name:"__call__",anchor:"transformers.FlaxViTModel.__call__",parameters:[{name:"pixel_values",val:""},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/vit/modeling_flax_vit.py#L471",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</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 (<code>&lt;class 'transformers.models.vit.configuration_vit.ViTConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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>jnp.ndarray</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>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>jnp.ndarray</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.33.3/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),De=new te({props:{$$slots:{default:[vl]},$$scope:{ctx:C}}}),Oe=new dt({props:{anchor:"transformers.FlaxViTModel.__call__.example",$$slots:{default:[Tl]},$$scope:{ctx:C}}}),mo=new B({}),ho=new N({props:{name:"class transformers.FlaxViTForImageClassification",anchor:"transformers.FlaxViTForImageClassification",parameters:[{name:"config",val:": ViTConfig"},{name:"input_shape",val:" = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxViTForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/vit#transformers.ViTConfig">ViTConfig</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.33.3/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxViTForImageClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/vit/modeling_flax_vit.py#L638"}}),fo=new N({props:{name:"__call__",anchor:"transformers.FlaxViTForImageClassification.__call__",parameters:[{name:"pixel_values",val:""},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/vit/modeling_flax_vit.py#L471",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</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 (<code>&lt;class 'transformers.models.vit.configuration_vit.ViTConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>jnp.ndarray</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.33.3/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),et=new te({props:{$$slots:{default:[bl]},$$scope:{ctx:C}}}),tt=new dt({props:{anchor:"transformers.FlaxViTForImageClassification.__call__.example",$$slots:{default:[yl]},$$scope:{ctx:C}}}),{c(){o=n("meta"),u=l(),p=n("p"),m=l(),M=n("h1"),c=n("a"),$=n("span"),_(G.$$.fragment),q=l(),j=n("span"),j.textContent=be,P=l(),V=n("h2"),H=n("a"),x=n("span"),_(F.$$.fragment),Ys=l(),wo=n("span"),wo.textContent=gr,Rn=l(),pt=n("p"),pt.innerHTML=_r,Bn=l(),mt=n("p"),mt.textContent=vr,Gn=l(),ht=n("p"),ht.innerHTML=Tr,qn=l(),ft=n("p"),ft.textContent=br,Sn=l(),ut=n("ul"),ut.innerHTML=yr,An=l(),ye=n("img"),Xn=l(),gt=n("small"),gt.innerHTML=Mr,Yn=l(),_t=n("p"),_t.textContent=$r,Qn=l(),vt=n("ul"),vt.innerHTML=xr,Dn=l(),Tt=n("p"),Tt.innerHTML=Cr,On=l(),bt=n("p"),bt.innerHTML=Fr,Kn=l(),ie=n("h2"),we=n("a"),_n=n("span"),_(yt.$$.fragment),Qs=l(),Mo=n("span"),Mo.textContent=Vr,es=l(),wt=n("p"),wt.textContent=jr,ts=l(),_(Mt.$$.fragment),os=l(),$t=n("ul"),$t.innerHTML=Ir,ns=l(),xt=n("p"),xt.textContent=kr,ss=l(),Ct=n("ul"),Ct.innerHTML=Ur,as=l(),Ft=n("p"),Ft.textContent=Jr,rs=l(),le=n("h2"),Me=n("a"),vn=n("span"),_(Vt.$$.fragment),Ds=l(),$o=n("span"),$o.textContent=Nr,is=l(),jt=n("p"),jt.textContent=Wr,ls=l(),It=n("p"),It.innerHTML=Zr,ds=l(),_(kt.$$.fragment),cs=l(),Ut=n("ul"),Ut.innerHTML=zr,ps=l(),Jt=n("p"),Jt.textContent=Pr,ms=l(),Nt=n("ul"),Nt.innerHTML=Hr,hs=l(),Wt=n("p"),Wt.textContent=Lr,fs=l(),Zt=n("ul"),Zt.innerHTML=Er,us=l(),zt=n("p"),zt.textContent=Rr,gs=l(),Pt=n("ul"),Pt.innerHTML=Br,_s=l(),de=n("h2"),$e=n("a"),Tn=n("span"),_(Ht.$$.fragment),Os=l(),xo=n("span"),xo.textContent=Gr,vs=l(),S=n("div"),_(Lt.$$.fragment),Ks=l(),Co=n("p"),Co.innerHTML=qr,ea=l(),Fo=n("p"),Fo.innerHTML=Sr,ta=l(),_(xe.$$.fragment),Ts=l(),ce=n("h2"),Ce=n("a"),bn=n("span"),_(Et.$$.fragment),oa=l(),Vo=n("span"),Vo.textContent=Ar,bs=l(),pe=n("div"),_(Rt.$$.fragment),na=l(),Fe=n("div"),_(Bt.$$.fragment),sa=l(),jo=n("p"),jo.textContent=Xr,ys=l(),me=n("h2"),Ve=n("a"),yn=n("span"),_(Gt.$$.fragment),aa=l(),Io=n("span"),Io.textContent=Yr,ws=l(),oe=n("div"),_(qt.$$.fragment),ra=l(),ko=n("p"),ko.textContent=Qr,ia=l(),je=n("div"),_(St.$$.fragment),la=l(),Uo=n("p"),Uo.textContent=Dr,Ms=l(),he=n("h2"),Ie=n("a"),wn=n("span"),_(At.$$.fragment),da=l(),Jo=n("span"),Jo.textContent=Or,$s=l(),ne=n("div"),_(Xt.$$.fragment),ca=l(),No=n("p"),No.innerHTML=Kr,pa=l(),A=n("div"),_(Yt.$$.fragment),ma=l(),Wo=n("p"),Wo.innerHTML=ei,ha=l(),_(ke.$$.fragment),fa=l(),_(Ue.$$.fragment),xs=l(),fe=n("h2"),Je=n("a"),Mn=n("span"),_(Qt.$$.fragment),ua=l(),Zo=n("span"),Zo.textContent=ti,Cs=l(),Z=n("div"),_(Dt.$$.fragment),ga=l(),zo=n("p"),zo.innerHTML=oi,_a=l(),_(Ne.$$.fragment),va=l(),Po=n("p"),Po.innerHTML=ni,Ta=l(),X=n("div"),_(Ot.$$.fragment),ba=l(),Ho=n("p"),Ho.innerHTML=si,ya=l(),_(We.$$.fragment),wa=l(),_(Ze.$$.fragment),Fs=l(),ue=n("h2"),ze=n("a"),$n=n("span"),_(Kt.$$.fragment),Ma=l(),Lo=n("span"),Lo.textContent=ai,Vs=l(),z=n("div"),_(eo.$$.fragment),$a=l(),Eo=n("p"),Eo.textContent=ri,xa=l(),_(Pe.$$.fragment),Ca=l(),Ro=n("p"),Ro.innerHTML=ii,Fa=l(),Y=n("div"),_(to.$$.fragment),Va=l(),Bo=n("p"),Bo.innerHTML=li,ja=l(),_(He.$$.fragment),Ia=l(),_(Le.$$.fragment),js=l(),ge=n("h2"),Ee=n("a"),xn=n("span"),_(oo.$$.fragment),ka=l(),Go=n("span"),Go.textContent=di,Is=l(),W=n("div"),_(no.$$.fragment),Ua=l(),qo=n("p"),qo.textContent=ci,Ja=l(),So=n("p"),So.innerHTML=pi,Na=l(),Ao=n("p"),Ao.innerHTML=mi,Wa=l(),_(Re.$$.fragment),Za=l(),Q=n("div"),_(so.$$.fragment),za=l(),Xo=n("p"),Xo.innerHTML=hi,Pa=l(),_(Be.$$.fragment),Ha=l(),_(Ge.$$.fragment),ks=l(),_e=n("h2"),qe=n("a"),Cn=n("span"),_(ao.$$.fragment),La=l(),Yo=n("span"),Yo.textContent=fi,Us=l(),k=n("div"),_(ro.$$.fragment),Ea=l(),Qo=n("p"),Qo.textContent=ui,Ra=l(),_(Se.$$.fragment),Ba=l(),Do=n("p"),Do.innerHTML=gi,Ga=l(),Oo=n("p"),Oo.innerHTML=_i,qa=l(),_(Ae.$$.fragment),Sa=l(),D=n("div"),_(io.$$.fragment),Aa=l(),Ko=n("p"),Ko.innerHTML=vi,Xa=l(),_(Xe.$$.fragment),Ya=l(),_(Ye.$$.fragment),Js=l(),ve=n("h2"),Qe=n("a"),Fn=n("span"),_(lo.$$.fragment),Qa=l(),en=n("span"),en.textContent=Ti,Ns=l(),U=n("div"),_(co.$$.fragment),Da=l(),tn=n("p"),tn.textContent=bi,Oa=l(),on=n("p"),on.innerHTML=yi,Ka=l(),nn=n("p"),nn.innerHTML=wi,er=l(),sn=n("p"),sn.textContent=Mi,tr=l(),an=n("ul"),an.innerHTML=$i,or=l(),O=n("div"),_(po.$$.fragment),nr=l(),rn=n("p"),rn.innerHTML=xi,sr=l(),_(De.$$.fragment),ar=l(),_(Oe.$$.fragment),Ws=l(),Te=n("h2"),Ke=n("a"),Vn=n("span"),_(mo.$$.fragment),rr=l(),ln=n("span"),ln.textContent=Ci,Zs=l(),J=n("div"),_(ho.$$.fragment),ir=l(),dn=n("p"),dn.textContent=Fi,lr=l(),cn=n("p"),cn.innerHTML=Vi,dr=l(),pn=n("p"),pn.innerHTML=ji,cr=l(),mn=n("p"),mn.textContent=Ii,pr=l(),hn=n("ul"),hn.innerHTML=ki,mr=l(),K=n("div"),_(fo.$$.fragment),hr=l(),fn=n("p"),fn.innerHTML=Ui,fr=l(),_(et.$$.fragment),ur=l(),_(tt.$$.fragment),zs=l(),jn=n("p"),this.h()},l(e){const r=tl("svelte-1phssyn",document.head);o=s(r,"META",{name:!0,content:!0}),r.forEach(t),u=d(e),p=s(e,"P",{}),g(p).forEach(t),m=d(e),M=s(e,"H1",{class:!0});var uo=g(M);c=s(uo,"A",{id:!0,class:!0,href:!0});var In=g(c);$=s(In,"SPAN",{});var kn=g($);v(G.$$.fragment,kn),kn.forEach(t),In.forEach(t),q=d(uo),j=s(uo,"SPAN",{"data-svelte-h":!0}),h(j)!=="svelte-ylspxq"&&(j.textContent=be),uo.forEach(t),P=d(e),V=s(e,"H2",{class:!0});var go=g(V);H=s(go,"A",{id:!0,class:!0,href:!0});var Un=g(H);x=s(Un,"SPAN",{});var Jn=g(x);v(F.$$.fragment,Jn),Jn.forEach(t),Un.forEach(t),Ys=d(go),wo=s(go,"SPAN",{"data-svelte-h":!0}),h(wo)!=="svelte-1jsw1pg"&&(wo.textContent=gr),go.forEach(t),Rn=d(e),pt=s(e,"P",{"data-svelte-h":!0}),h(pt)!=="svelte-mxwj6a"&&(pt.innerHTML=_r),Bn=d(e),mt=s(e,"P",{"data-svelte-h":!0}),h(mt)!=="svelte-vfdo9a"&&(mt.textContent=vr),Gn=d(e),ht=s(e,"P",{"data-svelte-h":!0}),h(ht)!=="svelte-yjj3f8"&&(ht.innerHTML=Tr),qn=d(e),ft=s(e,"P",{"data-svelte-h":!0}),h(ft)!=="svelte-axv494"&&(ft.textContent=br),Sn=d(e),ut=s(e,"UL",{"data-svelte-h":!0}),h(ut)!=="svelte-1w6c4z"&&(ut.innerHTML=yr),An=d(e),ye=s(e,"IMG",{src:!0,alt:!0,width:!0}),Xn=d(e),gt=s(e,"SMALL",{"data-svelte-h":!0}),h(gt)!=="svelte-7mkw5i"&&(gt.innerHTML=Mr),Yn=d(e),_t=s(e,"P",{"data-svelte-h":!0}),h(_t)!=="svelte-ghhnmw"&&(_t.textContent=$r),Qn=d(e),vt=s(e,"UL",{"data-svelte-h":!0}),h(vt)!=="svelte-16ct02s"&&(vt.innerHTML=xr),Dn=d(e),Tt=s(e,"P",{"data-svelte-h":!0}),h(Tt)!=="svelte-pwnwoc"&&(Tt.innerHTML=Cr),On=d(e),bt=s(e,"P",{"data-svelte-h":!0}),h(bt)!=="svelte-oyfczv"&&(bt.innerHTML=Fr),Kn=d(e),ie=s(e,"H2",{class:!0});var _o=g(ie);we=s(_o,"A",{id:!0,class:!0,href:!0});var Nn=g(we);_n=s(Nn,"SPAN",{});var Wn=g(_n);v(yt.$$.fragment,Wn),Wn.forEach(t),Nn.forEach(t),Qs=d(_o),Mo=s(_o,"SPAN",{"data-svelte-h":!0}),h(Mo)!=="svelte-w4zzv6"&&(Mo.textContent=Vr),_o.forEach(t),es=d(e),wt=s(e,"P",{"data-svelte-h":!0}),h(wt)!=="svelte-14npj7m"&&(wt.textContent=jr),ts=d(e),v(Mt.$$.fragment,e),os=d(e),$t=s(e,"UL",{"data-svelte-h":!0}),h($t)!=="svelte-i519h7"&&($t.innerHTML=Ir),ns=d(e),xt=s(e,"P",{"data-svelte-h":!0}),h(xt)!=="svelte-1k821ua"&&(xt.textContent=kr),ss=d(e),Ct=s(e,"UL",{"data-svelte-h":!0}),h(Ct)!=="svelte-170v2bo"&&(Ct.innerHTML=Ur),as=d(e),Ft=s(e,"P",{"data-svelte-h":!0}),h(Ft)!=="svelte-1xesile"&&(Ft.textContent=Jr),rs=d(e),le=s(e,"H2",{class:!0});var vo=g(le);Me=s(vo,"A",{id:!0,class:!0,href:!0});var Zn=g(Me);vn=s(Zn,"SPAN",{});var zn=g(vn);v(Vt.$$.fragment,zn),zn.forEach(t),Zn.forEach(t),Ds=d(vo),$o=s(vo,"SPAN",{"data-svelte-h":!0}),h($o)!=="svelte-w4zzv6"&&($o.textContent=Nr),vo.forEach(t),is=d(e),jt=s(e,"P",{"data-svelte-h":!0}),h(jt)!=="svelte-110l0o8"&&(jt.textContent=Wr),ls=d(e),It=s(e,"P",{"data-svelte-h":!0}),h(It)!=="svelte-qrf7lp"&&(It.innerHTML=Zr),ds=d(e),v(kt.$$.fragment,e),cs=d(e),Ut=s(e,"UL",{"data-svelte-h":!0}),h(Ut)!=="svelte-1fybkhs"&&(Ut.innerHTML=zr),ps=d(e),Jt=s(e,"P",{"data-svelte-h":!0}),h(Jt)!=="svelte-liq2q7"&&(Jt.textContent=Pr),ms=d(e),Nt=s(e,"UL",{"data-svelte-h":!0}),h(Nt)!=="svelte-1vxkfqp"&&(Nt.innerHTML=Hr),hs=d(e),Wt=s(e,"P",{"data-svelte-h":!0}),h(Wt)!=="svelte-1wntqpp"&&(Wt.textContent=Lr),fs=d(e),Zt=s(e,"UL",{"data-svelte-h":!0}),h(Zt)!=="svelte-1q3e2i6"&&(Zt.innerHTML=Er),us=d(e),zt=s(e,"P",{"data-svelte-h":!0}),h(zt)!=="svelte-lk14e4"&&(zt.textContent=Rr),gs=d(e),Pt=s(e,"UL",{"data-svelte-h":!0}),h(Pt)!=="svelte-1e4wiq4"&&(Pt.innerHTML=Br),_s=d(e),de=s(e,"H2",{class:!0});var To=g(de);$e=s(To,"A",{id:!0,class:!0,href:!0});var Pn=g($e);Tn=s(Pn,"SPAN",{});var Hn=g(Tn);v(Ht.$$.fragment,Hn),Hn.forEach(t),Pn.forEach(t),Os=d(To),xo=s(To,"SPAN",{"data-svelte-h":!0}),h(xo)!=="svelte-s2vdju"&&(xo.textContent=Gr),To.forEach(t),vs=d(e),S=s(e,"DIV",{class:!0});var se=g(S);v(Lt.$$.fragment,se),Ks=d(se),Co=s(se,"P",{"data-svelte-h":!0}),h(Co)!=="svelte-1yagcnm"&&(Co.innerHTML=qr),ea=d(se),Fo=s(se,"P",{"data-svelte-h":!0}),h(Fo)!=="svelte-cfh5wl"&&(Fo.innerHTML=Sr),ta=d(se),v(xe.$$.fragment,se),se.forEach(t),Ts=d(e),ce=s(e,"H2",{class:!0});var bo=g(ce);Ce=s(bo,"A",{id:!0,class:!0,href:!0});var Ln=g(Ce);bn=s(Ln,"SPAN",{});var En=g(bn);v(Et.$$.fragment,En),En.forEach(t),Ln.forEach(t),oa=d(bo),Vo=s(bo,"SPAN",{"data-svelte-h":!0}),h(Vo)!=="svelte-73qs5a"&&(Vo.textContent=Ar),bo.forEach(t),bs=d(e),pe=s(e,"DIV",{class:!0});var yo=g(pe);v(Rt.$$.fragment,yo),na=d(yo),Fe=s(yo,"DIV",{class:!0});var Hs=g(Fe);v(Bt.$$.fragment,Hs),sa=d(Hs),jo=s(Hs,"P",{"data-svelte-h":!0}),h(jo)!=="svelte-khengj"&&(jo.textContent=Xr),Hs.forEach(t),yo.forEach(t),ys=d(e),me=s(e,"H2",{class:!0});var Ls=g(me);Ve=s(Ls,"A",{id:!0,class:!0,href:!0});var Ji=g(Ve);yn=s(Ji,"SPAN",{});var Ni=g(yn);v(Gt.$$.fragment,Ni),Ni.forEach(t),Ji.forEach(t),aa=d(Ls),Io=s(Ls,"SPAN",{"data-svelte-h":!0}),h(Io)!=="svelte-1fd2oi7"&&(Io.textContent=Yr),Ls.forEach(t),ws=d(e),oe=s(e,"DIV",{class:!0});var un=g(oe);v(qt.$$.fragment,un),ra=d(un),ko=s(un,"P",{"data-svelte-h":!0}),h(ko)!=="svelte-1ebexfn"&&(ko.textContent=Qr),ia=d(un),je=s(un,"DIV",{class:!0});var Es=g(je);v(St.$$.fragment,Es),la=d(Es),Uo=s(Es,"P",{"data-svelte-h":!0}),h(Uo)!=="svelte-1x3yxsa"&&(Uo.textContent=Dr),Es.forEach(t),un.forEach(t),Ms=d(e),he=s(e,"H2",{class:!0});var Rs=g(he);Ie=s(Rs,"A",{id:!0,class:!0,href:!0});var Wi=g(Ie);wn=s(Wi,"SPAN",{});var Zi=g(wn);v(At.$$.fragment,Zi),Zi.forEach(t),Wi.forEach(t),da=d(Rs),Jo=s(Rs,"SPAN",{"data-svelte-h":!0}),h(Jo)!=="svelte-1dljylp"&&(Jo.textContent=Or),Rs.forEach(t),$s=d(e),ne=s(e,"DIV",{class:!0});var gn=g(ne);v(Xt.$$.fragment,gn),ca=d(gn),No=s(gn,"P",{"data-svelte-h":!0}),h(No)!=="svelte-ulamh0"&&(No.innerHTML=Kr),pa=d(gn),A=s(gn,"DIV",{class:!0});var ot=g(A);v(Yt.$$.fragment,ot),ma=d(ot),Wo=s(ot,"P",{"data-svelte-h":!0}),h(Wo)!=="svelte-es0dns"&&(Wo.innerHTML=ei),ha=d(ot),v(ke.$$.fragment,ot),fa=d(ot),v(Ue.$$.fragment,ot),ot.forEach(t),gn.forEach(t),xs=d(e),fe=s(e,"H2",{class:!0});var Bs=g(fe);Je=s(Bs,"A",{id:!0,class:!0,href:!0});var zi=g(Je);Mn=s(zi,"SPAN",{});var Pi=g(Mn);v(Qt.$$.fragment,Pi),Pi.forEach(t),zi.forEach(t),ua=d(Bs),Zo=s(Bs,"SPAN",{"data-svelte-h":!0}),h(Zo)!=="svelte-13qolt4"&&(Zo.textContent=ti),Bs.forEach(t),Cs=d(e),Z=s(e,"DIV",{class:!0});var ae=g(Z);v(Dt.$$.fragment,ae),ga=d(ae),zo=s(ae,"P",{"data-svelte-h":!0}),h(zo)!=="svelte-hwvz1m"&&(zo.innerHTML=oi),_a=d(ae),v(Ne.$$.fragment,ae),va=d(ae),Po=s(ae,"P",{"data-svelte-h":!0}),h(Po)!=="svelte-1gjh92c"&&(Po.innerHTML=ni),Ta=d(ae),X=s(ae,"DIV",{class:!0});var nt=g(X);v(Ot.$$.fragment,nt),ba=d(nt),Ho=s(nt,"P",{"data-svelte-h":!0}),h(Ho)!=="svelte-1rur9tw"&&(Ho.innerHTML=si),ya=d(nt),v(We.$$.fragment,nt),wa=d(nt),v(Ze.$$.fragment,nt),nt.forEach(t),ae.forEach(t),Fs=d(e),ue=s(e,"H2",{class:!0});var Gs=g(ue);ze=s(Gs,"A",{id:!0,class:!0,href:!0});var Hi=g(ze);$n=s(Hi,"SPAN",{});var Li=g($n);v(Kt.$$.fragment,Li),Li.forEach(t),Hi.forEach(t),Ma=d(Gs),Lo=s(Gs,"SPAN",{"data-svelte-h":!0}),h(Lo)!=="svelte-qspwis"&&(Lo.textContent=ai),Gs.forEach(t),Vs=d(e),z=s(e,"DIV",{class:!0});var re=g(z);v(eo.$$.fragment,re),$a=d(re),Eo=s(re,"P",{"data-svelte-h":!0}),h(Eo)!=="svelte-ju5wm2"&&(Eo.textContent=ri),xa=d(re),v(Pe.$$.fragment,re),Ca=d(re),Ro=s(re,"P",{"data-svelte-h":!0}),h(Ro)!=="svelte-1gjh92c"&&(Ro.innerHTML=ii),Fa=d(re),Y=s(re,"DIV",{class:!0});var st=g(Y);v(to.$$.fragment,st),Va=d(st),Bo=s(st,"P",{"data-svelte-h":!0}),h(Bo)!=="svelte-kgpmls"&&(Bo.innerHTML=li),ja=d(st),v(He.$$.fragment,st),Ia=d(st),v(Le.$$.fragment,st),st.forEach(t),re.forEach(t),js=d(e),ge=s(e,"H2",{class:!0});var qs=g(ge);Ee=s(qs,"A",{id:!0,class:!0,href:!0});var Ei=g(Ee);xn=s(Ei,"SPAN",{});var Ri=g(xn);v(oo.$$.fragment,Ri),Ri.forEach(t),Ei.forEach(t),ka=d(qs),Go=s(qs,"SPAN",{"data-svelte-h":!0}),h(Go)!=="svelte-1nx3p2b"&&(Go.textContent=di),qs.forEach(t),Is=d(e),W=s(e,"DIV",{class:!0});var ee=g(W);v(no.$$.fragment,ee),Ua=d(ee),qo=s(ee,"P",{"data-svelte-h":!0}),h(qo)!=="svelte-1vbye9a"&&(qo.textContent=ci),Ja=d(ee),So=s(ee,"P",{"data-svelte-h":!0}),h(So)!=="svelte-1e9g3w8"&&(So.innerHTML=pi),Na=d(ee),Ao=s(ee,"P",{"data-svelte-h":!0}),h(Ao)!=="svelte-1ivrf8m"&&(Ao.innerHTML=mi),Wa=d(ee),v(Re.$$.fragment,ee),Za=d(ee),Q=s(ee,"DIV",{class:!0});var at=g(Q);v(so.$$.fragment,at),za=d(at),Xo=s(at,"P",{"data-svelte-h":!0}),h(Xo)!=="svelte-1gaqxyg"&&(Xo.innerHTML=hi),Pa=d(at),v(Be.$$.fragment,at),Ha=d(at),v(Ge.$$.fragment,at),at.forEach(t),ee.forEach(t),ks=d(e),_e=s(e,"H2",{class:!0});var Ss=g(_e);qe=s(Ss,"A",{id:!0,class:!0,href:!0});var Bi=g(qe);Cn=s(Bi,"SPAN",{});var Gi=g(Cn);v(ao.$$.fragment,Gi),Gi.forEach(t),Bi.forEach(t),La=d(Ss),Yo=s(Ss,"SPAN",{"data-svelte-h":!0}),h(Yo)!=="svelte-1li9aoa"&&(Yo.textContent=fi),Ss.forEach(t),Us=d(e),k=s(e,"DIV",{class:!0});var L=g(k);v(ro.$$.fragment,L),Ea=d(L),Qo=s(L,"P",{"data-svelte-h":!0}),h(Qo)!=="svelte-ju5wm2"&&(Qo.textContent=ui),Ra=d(L),v(Se.$$.fragment,L),Ba=d(L),Do=s(L,"P",{"data-svelte-h":!0}),h(Do)!=="svelte-1e9g3w8"&&(Do.innerHTML=gi),Ga=d(L),Oo=s(L,"P",{"data-svelte-h":!0}),h(Oo)!=="svelte-1ivrf8m"&&(Oo.innerHTML=_i),qa=d(L),v(Ae.$$.fragment,L),Sa=d(L),D=s(L,"DIV",{class:!0});var rt=g(D);v(io.$$.fragment,rt),Aa=d(rt),Ko=s(rt,"P",{"data-svelte-h":!0}),h(Ko)!=="svelte-bazhpo"&&(Ko.innerHTML=vi),Xa=d(rt),v(Xe.$$.fragment,rt),Ya=d(rt),v(Ye.$$.fragment,rt),rt.forEach(t),L.forEach(t),Js=d(e),ve=s(e,"H2",{class:!0});var As=g(ve);Qe=s(As,"A",{id:!0,class:!0,href:!0});var qi=g(Qe);Fn=s(qi,"SPAN",{});var Si=g(Fn);v(lo.$$.fragment,Si),Si.forEach(t),qi.forEach(t),Qa=d(As),en=s(As,"SPAN",{"data-svelte-h":!0}),h(en)!=="svelte-1orv4r4"&&(en.textContent=Ti),As.forEach(t),Ns=d(e),U=s(e,"DIV",{class:!0});var E=g(U);v(co.$$.fragment,E),Da=d(E),tn=s(E,"P",{"data-svelte-h":!0}),h(tn)!=="svelte-1vbye9a"&&(tn.textContent=bi),Oa=d(E),on=s(E,"P",{"data-svelte-h":!0}),h(on)!=="svelte-1gfofcr"&&(on.innerHTML=yi),Ka=d(E),nn=s(E,"P",{"data-svelte-h":!0}),h(nn)!=="svelte-9ybkh"&&(nn.innerHTML=wi),er=d(E),sn=s(E,"P",{"data-svelte-h":!0}),h(sn)!=="svelte-1pplc4a"&&(sn.textContent=Mi),tr=d(E),an=s(E,"UL",{"data-svelte-h":!0}),h(an)!=="svelte-1w7z84m"&&(an.innerHTML=$i),or=d(E),O=s(E,"DIV",{class:!0});var it=g(O);v(po.$$.fragment,it),nr=d(it),rn=s(it,"P",{"data-svelte-h":!0}),h(rn)!=="svelte-8rbifc"&&(rn.innerHTML=xi),sr=d(it),v(De.$$.fragment,it),ar=d(it),v(Oe.$$.fragment,it),it.forEach(t),E.forEach(t),Ws=d(e),Te=s(e,"H2",{class:!0});var Xs=g(Te);Ke=s(Xs,"A",{id:!0,class:!0,href:!0});var Ai=g(Ke);Vn=s(Ai,"SPAN",{});var Xi=g(Vn);v(mo.$$.fragment,Xi),Xi.forEach(t),Ai.forEach(t),rr=d(Xs),ln=s(Xs,"SPAN",{"data-svelte-h":!0}),h(ln)!=="svelte-d204cp"&&(ln.textContent=Ci),Xs.forEach(t),Zs=d(e),J=s(e,"DIV",{class:!0});var R=g(J);v(ho.$$.fragment,R),ir=d(R),dn=s(R,"P",{"data-svelte-h":!0}),h(dn)!=="svelte-ju5wm2"&&(dn.textContent=Fi),lr=d(R),cn=s(R,"P",{"data-svelte-h":!0}),h(cn)!=="svelte-1gfofcr"&&(cn.innerHTML=Vi),dr=d(R),pn=s(R,"P",{"data-svelte-h":!0}),h(pn)!=="svelte-9ybkh"&&(pn.innerHTML=ji),cr=d(R),mn=s(R,"P",{"data-svelte-h":!0}),h(mn)!=="svelte-1pplc4a"&&(mn.textContent=Ii),pr=d(R),hn=s(R,"UL",{"data-svelte-h":!0}),h(hn)!=="svelte-1w7z84m"&&(hn.innerHTML=ki),mr=d(R),K=s(R,"DIV",{class:!0});var lt=g(K);v(fo.$$.fragment,lt),hr=d(lt),fn=s(lt,"P",{"data-svelte-h":!0}),h(fn)!=="svelte-8rbifc"&&(fn.innerHTML=Ui),fr=d(lt),v(et.$$.fragment,lt),ur=d(lt),v(tt.$$.fragment,lt),lt.forEach(t),R.forEach(t),zs=d(e),jn=s(e,"P",{}),g(jn).forEach(t),this.h()},h(){f(o,"name","hf:doc:metadata"),f(o,"content",JSON.stringify(Ml)),f(c,"id","vision-transformer-vit"),f(c,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(c,"href","#vision-transformer-vit"),f(M,"class","relative group"),f(H,"id","overview"),f(H,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(H,"href","#overview"),f(V,"class","relative group"),Di(ye.src,wr="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/vit_architecture.jpg")||f(ye,"src",wr),f(ye,"alt","drawing"),f(ye,"width","600"),f(we,"id","resources"),f(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"),f(we,"href","#resources"),f(ie,"class","relative group"),f(Me,"id","resources"),f(Me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Me,"href","#resources"),f(le,"class","relative group"),f($e,"id","transformers.ViTConfig"),f($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"),f($e,"href","#transformers.ViTConfig"),f(de,"class","relative group"),f(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ce,"id","transformers.ViTFeatureExtractor"),f(Ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ce,"href","#transformers.ViTFeatureExtractor"),f(ce,"class","relative group"),f(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ve,"id","transformers.ViTImageProcessor"),f(Ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ve,"href","#transformers.ViTImageProcessor"),f(me,"class","relative group"),f(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ie,"id","transformers.ViTModel"),f(Ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ie,"href","#transformers.ViTModel"),f(he,"class","relative group"),f(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Je,"id","transformers.ViTForMaskedImageModeling"),f(Je,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Je,"href","#transformers.ViTForMaskedImageModeling"),f(fe,"class","relative group"),f(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ze,"id","transformers.ViTForImageClassification"),f(ze,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ze,"href","#transformers.ViTForImageClassification"),f(ue,"class","relative group"),f(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ee,"id","transformers.TFViTModel"),f(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"),f(Ee,"href","#transformers.TFViTModel"),f(ge,"class","relative group"),f(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(qe,"id","transformers.TFViTForImageClassification"),f(qe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(qe,"href","#transformers.TFViTForImageClassification"),f(_e,"class","relative group"),f(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Qe,"id","transformers.FlaxViTModel"),f(Qe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Qe,"href","#transformers.FlaxViTModel"),f(ve,"class","relative group"),f(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ke,"id","transformers.FlaxViTForImageClassification"),f(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"),f(Ke,"href","#transformers.FlaxViTForImageClassification"),f(Te,"class","relative group"),f(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,r){a(document.head,o),i(e,u,r),i(e,p,r),i(e,m,r),i(e,M,r),a(M,c),a(c,$),T(G,$,null),a(M,q),a(M,j),i(e,P,r),i(e,V,r),a(V,H),a(H,x),T(F,x,null),a(V,Ys),a(V,wo),i(e,Rn,r),i(e,pt,r),i(e,Bn,r),i(e,mt,r),i(e,Gn,r),i(e,ht,r),i(e,qn,r),i(e,ft,r),i(e,Sn,r),i(e,ut,r),i(e,An,r),i(e,ye,r),i(e,Xn,r),i(e,gt,r),i(e,Yn,r),i(e,_t,r),i(e,Qn,r),i(e,vt,r),i(e,Dn,r),i(e,Tt,r),i(e,On,r),i(e,bt,r),i(e,Kn,r),i(e,ie,r),a(ie,we),a(we,_n),T(yt,_n,null),a(ie,Qs),a(ie,Mo),i(e,es,r),i(e,wt,r),i(e,ts,r),T(Mt,e,r),i(e,os,r),i(e,$t,r),i(e,ns,r),i(e,xt,r),i(e,ss,r),i(e,Ct,r),i(e,as,r),i(e,Ft,r),i(e,rs,r),i(e,le,r),a(le,Me),a(Me,vn),T(Vt,vn,null),a(le,Ds),a(le,$o),i(e,is,r),i(e,jt,r),i(e,ls,r),i(e,It,r),i(e,ds,r),T(kt,e,r),i(e,cs,r),i(e,Ut,r),i(e,ps,r),i(e,Jt,r),i(e,ms,r),i(e,Nt,r),i(e,hs,r),i(e,Wt,r),i(e,fs,r),i(e,Zt,r),i(e,us,r),i(e,zt,r),i(e,gs,r),i(e,Pt,r),i(e,_s,r),i(e,de,r),a(de,$e),a($e,Tn),T(Ht,Tn,null),a(de,Os),a(de,xo),i(e,vs,r),i(e,S,r),T(Lt,S,null),a(S,Ks),a(S,Co),a(S,ea),a(S,Fo),a(S,ta),T(xe,S,null),i(e,Ts,r),i(e,ce,r),a(ce,Ce),a(Ce,bn),T(Et,bn,null),a(ce,oa),a(ce,Vo),i(e,bs,r),i(e,pe,r),T(Rt,pe,null),a(pe,na),a(pe,Fe),T(Bt,Fe,null),a(Fe,sa),a(Fe,jo),i(e,ys,r),i(e,me,r),a(me,Ve),a(Ve,yn),T(Gt,yn,null),a(me,aa),a(me,Io),i(e,ws,r),i(e,oe,r),T(qt,oe,null),a(oe,ra),a(oe,ko),a(oe,ia),a(oe,je),T(St,je,null),a(je,la),a(je,Uo),i(e,Ms,r),i(e,he,r),a(he,Ie),a(Ie,wn),T(At,wn,null),a(he,da),a(he,Jo),i(e,$s,r),i(e,ne,r),T(Xt,ne,null),a(ne,ca),a(ne,No),a(ne,pa),a(ne,A),T(Yt,A,null),a(A,ma),a(A,Wo),a(A,ha),T(ke,A,null),a(A,fa),T(Ue,A,null),i(e,xs,r),i(e,fe,r),a(fe,Je),a(Je,Mn),T(Qt,Mn,null),a(fe,ua),a(fe,Zo),i(e,Cs,r),i(e,Z,r),T(Dt,Z,null),a(Z,ga),a(Z,zo),a(Z,_a),T(Ne,Z,null),a(Z,va),a(Z,Po),a(Z,Ta),a(Z,X),T(Ot,X,null),a(X,ba),a(X,Ho),a(X,ya),T(We,X,null),a(X,wa),T(Ze,X,null),i(e,Fs,r),i(e,ue,r),a(ue,ze),a(ze,$n),T(Kt,$n,null),a(ue,Ma),a(ue,Lo),i(e,Vs,r),i(e,z,r),T(eo,z,null),a(z,$a),a(z,Eo),a(z,xa),T(Pe,z,null),a(z,Ca),a(z,Ro),a(z,Fa),a(z,Y),T(to,Y,null),a(Y,Va),a(Y,Bo),a(Y,ja),T(He,Y,null),a(Y,Ia),T(Le,Y,null),i(e,js,r),i(e,ge,r),a(ge,Ee),a(Ee,xn),T(oo,xn,null),a(ge,ka),a(ge,Go),i(e,Is,r),i(e,W,r),T(no,W,null),a(W,Ua),a(W,qo),a(W,Ja),a(W,So),a(W,Na),a(W,Ao),a(W,Wa),T(Re,W,null),a(W,Za),a(W,Q),T(so,Q,null),a(Q,za),a(Q,Xo),a(Q,Pa),T(Be,Q,null),a(Q,Ha),T(Ge,Q,null),i(e,ks,r),i(e,_e,r),a(_e,qe),a(qe,Cn),T(ao,Cn,null),a(_e,La),a(_e,Yo),i(e,Us,r),i(e,k,r),T(ro,k,null),a(k,Ea),a(k,Qo),a(k,Ra),T(Se,k,null),a(k,Ba),a(k,Do),a(k,Ga),a(k,Oo),a(k,qa),T(Ae,k,null),a(k,Sa),a(k,D),T(io,D,null),a(D,Aa),a(D,Ko),a(D,Xa),T(Xe,D,null),a(D,Ya),T(Ye,D,null),i(e,Js,r),i(e,ve,r),a(ve,Qe),a(Qe,Fn),T(lo,Fn,null),a(ve,Qa),a(ve,en),i(e,Ns,r),i(e,U,r),T(co,U,null),a(U,Da),a(U,tn),a(U,Oa),a(U,on),a(U,Ka),a(U,nn),a(U,er),a(U,sn),a(U,tr),a(U,an),a(U,or),a(U,O),T(po,O,null),a(O,nr),a(O,rn),a(O,sr),T(De,O,null),a(O,ar),T(Oe,O,null),i(e,Ws,r),i(e,Te,r),a(Te,Ke),a(Ke,Vn),T(mo,Vn,null),a(Te,rr),a(Te,ln),i(e,Zs,r),i(e,J,r),T(ho,J,null),a(J,ir),a(J,dn),a(J,lr),a(J,cn),a(J,dr),a(J,pn),a(J,cr),a(J,mn),a(J,pr),a(J,hn),a(J,mr),a(J,K),T(fo,K,null),a(K,hr),a(K,fn),a(K,fr),T(et,K,null),a(K,ur),T(tt,K,null),i(e,zs,r),i(e,jn,r),Ps=!0},p(e,[r]){const uo={};r&2&&(uo.$$scope={dirty:r,ctx:e}),xe.$set(uo);const In={};r&2&&(In.$$scope={dirty:r,ctx:e}),ke.$set(In);const kn={};r&2&&(kn.$$scope={dirty:r,ctx:e}),Ue.$set(kn);const go={};r&2&&(go.$$scope={dirty:r,ctx:e}),Ne.$set(go);const Un={};r&2&&(Un.$$scope={dirty:r,ctx:e}),We.$set(Un);const Jn={};r&2&&(Jn.$$scope={dirty:r,ctx:e}),Ze.$set(Jn);const _o={};r&2&&(_o.$$scope={dirty:r,ctx:e}),Pe.$set(_o);const Nn={};r&2&&(Nn.$$scope={dirty:r,ctx:e}),He.$set(Nn);const Wn={};r&2&&(Wn.$$scope={dirty:r,ctx:e}),Le.$set(Wn);const vo={};r&2&&(vo.$$scope={dirty:r,ctx:e}),Re.$set(vo);const Zn={};r&2&&(Zn.$$scope={dirty:r,ctx:e}),Be.$set(Zn);const zn={};r&2&&(zn.$$scope={dirty:r,ctx:e}),Ge.$set(zn);const To={};r&2&&(To.$$scope={dirty:r,ctx:e}),Se.$set(To);const Pn={};r&2&&(Pn.$$scope={dirty:r,ctx:e}),Ae.$set(Pn);const Hn={};r&2&&(Hn.$$scope={dirty:r,ctx:e}),Xe.$set(Hn);const se={};r&2&&(se.$$scope={dirty:r,ctx:e}),Ye.$set(se);const bo={};r&2&&(bo.$$scope={dirty:r,ctx:e}),De.$set(bo);const Ln={};r&2&&(Ln.$$scope={dirty:r,ctx:e}),Oe.$set(Ln);const En={};r&2&&(En.$$scope={dirty:r,ctx:e}),et.$set(En);const yo={};r&2&&(yo.$$scope={dirty:r,ctx:e}),tt.$set(yo)},i(e){Ps||(b(G.$$.fragment,e),b(F.$$.fragment,e),b(yt.$$.fragment,e),b(Mt.$$.fragment,e),b(Vt.$$.fragment,e),b(kt.$$.fragment,e),b(Ht.$$.fragment,e),b(Lt.$$.fragment,e),b(xe.$$.fragment,e),b(Et.$$.fragment,e),b(Rt.$$.fragment,e),b(Bt.$$.fragment,e),b(Gt.$$.fragment,e),b(qt.$$.fragment,e),b(St.$$.fragment,e),b(At.$$.fragment,e),b(Xt.$$.fragment,e),b(Yt.$$.fragment,e),b(ke.$$.fragment,e),b(Ue.$$.fragment,e),b(Qt.$$.fragment,e),b(Dt.$$.fragment,e),b(Ne.$$.fragment,e),b(Ot.$$.fragment,e),b(We.$$.fragment,e),b(Ze.$$.fragment,e),b(Kt.$$.fragment,e),b(eo.$$.fragment,e),b(Pe.$$.fragment,e),b(to.$$.fragment,e),b(He.$$.fragment,e),b(Le.$$.fragment,e),b(oo.$$.fragment,e),b(no.$$.fragment,e),b(Re.$$.fragment,e),b(so.$$.fragment,e),b(Be.$$.fragment,e),b(Ge.$$.fragment,e),b(ao.$$.fragment,e),b(ro.$$.fragment,e),b(Se.$$.fragment,e),b(Ae.$$.fragment,e),b(io.$$.fragment,e),b(Xe.$$.fragment,e),b(Ye.$$.fragment,e),b(lo.$$.fragment,e),b(co.$$.fragment,e),b(po.$$.fragment,e),b(De.$$.fragment,e),b(Oe.$$.fragment,e),b(mo.$$.fragment,e),b(ho.$$.fragment,e),b(fo.$$.fragment,e),b(et.$$.fragment,e),b(tt.$$.fragment,e),Ps=!0)},o(e){y(G.$$.fragment,e),y(F.$$.fragment,e),y(yt.$$.fragment,e),y(Mt.$$.fragment,e),y(Vt.$$.fragment,e),y(kt.$$.fragment,e),y(Ht.$$.fragment,e),y(Lt.$$.fragment,e),y(xe.$$.fragment,e),y(Et.$$.fragment,e),y(Rt.$$.fragment,e),y(Bt.$$.fragment,e),y(Gt.$$.fragment,e),y(qt.$$.fragment,e),y(St.$$.fragment,e),y(At.$$.fragment,e),y(Xt.$$.fragment,e),y(Yt.$$.fragment,e),y(ke.$$.fragment,e),y(Ue.$$.fragment,e),y(Qt.$$.fragment,e),y(Dt.$$.fragment,e),y(Ne.$$.fragment,e),y(Ot.$$.fragment,e),y(We.$$.fragment,e),y(Ze.$$.fragment,e),y(Kt.$$.fragment,e),y(eo.$$.fragment,e),y(Pe.$$.fragment,e),y(to.$$.fragment,e),y(He.$$.fragment,e),y(Le.$$.fragment,e),y(oo.$$.fragment,e),y(no.$$.fragment,e),y(Re.$$.fragment,e),y(so.$$.fragment,e),y(Be.$$.fragment,e),y(Ge.$$.fragment,e),y(ao.$$.fragment,e),y(ro.$$.fragment,e),y(Se.$$.fragment,e),y(Ae.$$.fragment,e),y(io.$$.fragment,e),y(Xe.$$.fragment,e),y(Ye.$$.fragment,e),y(lo.$$.fragment,e),y(co.$$.fragment,e),y(po.$$.fragment,e),y(De.$$.fragment,e),y(Oe.$$.fragment,e),y(mo.$$.fragment,e),y(ho.$$.fragment,e),y(fo.$$.fragment,e),y(et.$$.fragment,e),y(tt.$$.fragment,e),Ps=!1},d(e){e&&(t(u),t(p),t(m),t(M),t(P),t(V),t(Rn),t(pt),t(Bn),t(mt),t(Gn),t(ht),t(qn),t(ft),t(Sn),t(ut),t(An),t(ye),t(Xn),t(gt),t(Yn),t(_t),t(Qn),t(vt),t(Dn),t(Tt),t(On),t(bt),t(Kn),t(ie),t(es),t(wt),t(ts),t(os),t($t),t(ns),t(xt),t(ss),t(Ct),t(as),t(Ft),t(rs),t(le),t(is),t(jt),t(ls),t(It),t(ds),t(cs),t(Ut),t(ps),t(Jt),t(ms),t(Nt),t(hs),t(Wt),t(fs),t(Zt),t(us),t(zt),t(gs),t(Pt),t(_s),t(de),t(vs),t(S),t(Ts),t(ce),t(bs),t(pe),t(ys),t(me),t(ws),t(oe),t(Ms),t(he),t($s),t(ne),t(xs),t(fe),t(Cs),t(Z),t(Fs),t(ue),t(Vs),t(z),t(js),t(ge),t(Is),t(W),t(ks),t(_e),t(Us),t(k),t(Js),t(ve),t(Ns),t(U),t(Ws),t(Te),t(Zs),t(J),t(zs),t(jn)),t(o),w(G),w(F),w(yt),w(Mt,e),w(Vt),w(kt,e),w(Ht),w(Lt),w(xe),w(Et),w(Rt),w(Bt),w(Gt),w(qt),w(St),w(At),w(Xt),w(Yt),w(ke),w(Ue),w(Qt),w(Dt),w(Ne),w(Ot),w(We),w(Ze),w(Kt),w(eo),w(Pe),w(to),w(He),w(Le),w(oo),w(no),w(Re),w(so),w(Be),w(Ge),w(ao),w(ro),w(Se),w(Ae),w(io),w(Xe),w(Ye),w(lo),w(co),w(po),w(De),w(Oe),w(mo),w(ho),w(fo),w(et),w(tt)}}}const Ml={local:"vision-transformer-vit",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"resources",title:"Resources"},{local:"transformers.ViTConfig",title:"ViTConfig"},{local:"transformers.ViTFeatureExtractor",title:"ViTFeatureExtractor"},{local:"transformers.ViTImageProcessor",title:"ViTImageProcessor"},{local:"transformers.ViTModel",title:"ViTModel"},{local:"transformers.ViTForMaskedImageModeling",title:"ViTForMaskedImageModeling"},{local:"transformers.ViTForImageClassification",title:"ViTForImageClassification"},{local:"transformers.TFViTModel",title:"TFViTModel"},{local:"transformers.TFViTForImageClassification",title:"TFViTForImageClassification"},{local:"transformers.FlaxViTModel",title:"FlaxVitModel"},{local:"transformers.FlaxViTForImageClassification",title:"FlaxViTForImageClassification"}],title:"Vision Transformer (ViT)"};function $l(C){return Oi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Jl extends Ki{constructor(o){super(),el(this,o,$l,wl,Qi,{})}}export{Jl as component};
