import{s as Mt,f as Tt,o as Wt,n as ve}from"../chunks/scheduler.25b97de1.js";import{S as $t,i as Rt,g as c,s as r,r as _,A as Ct,h as m,f as s,c as i,j as ie,u as v,x as h,k as D,y as p,a,v as b,d as y,t as w,w as M}from"../chunks/index.d9030fc9.js";import{T as wt}from"../chunks/Tip.baa67368.js";import{D as ue}from"../chunks/Docstring.ffac8efa.js";import{C as tt}from"../chunks/CodeBlock.e6cd0d95.js";import{E as et}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as _e,E as jt}from"../chunks/EditOnGithub.91d95064.js";function xt($){let o,f="Example:",l,d,g;return d=new tt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpbm92MldpdGhSZWdpc3RlcnNDb25maWclMkMlMjBEaW5vdjJXaXRoUmVnaXN0ZXJzTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwRGlub3YyV2l0aFJlZ2lzdGVycyUyMGJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwRGlub3YyV2l0aFJlZ2lzdGVyc0NvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBiYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBEaW5vdjJXaXRoUmVnaXN0ZXJzTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Dinov2WithRegistersConfig, Dinov2WithRegistersModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Dinov2WithRegisters base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = Dinov2WithRegistersConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Dinov2WithRegistersModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){o=c("p"),o.textContent=f,l=r(),_(d.$$.fragment)},l(n){o=m(n,"P",{"data-svelte-h":!0}),h(o)!=="svelte-11lpom8"&&(o.textContent=f),l=i(n),v(d.$$.fragment,n)},m(n,u){a(n,o,u),a(n,l,u),b(d,n,u),g=!0},p:ve,i(n){g||(y(d.$$.fragment,n),g=!0)},o(n){w(d.$$.fragment,n),g=!1},d(n){n&&(s(o),s(l)),M(d,n)}}}function kt($){let o,f=`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=c("p"),o.innerHTML=f},l(l){o=m(l,"P",{"data-svelte-h":!0}),h(o)!=="svelte-fincs2"&&(o.innerHTML=f)},m(l,d){a(l,o,d)},p:ve,d(l){l&&s(o)}}}function It($){let o,f="Example:",l,d,g;return d=new tt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERpbm92MldpdGhSZWdpc3RlcnNNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZkaW5vdjJfd2l0aF9yZWdpc3RlcnMtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMERpbm92MldpdGhSZWdpc3RlcnNNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZkaW5vdjJfd2l0aF9yZWdpc3RlcnMtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, Dinov2WithRegistersModel
<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>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/dinov2_with_registers-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Dinov2WithRegistersModel.from_pretrained(<span class="hljs-string">&quot;facebook/dinov2_with_registers-base&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">257</span>, <span class="hljs-number">768</span>]`,wrap:!1}}),{c(){o=c("p"),o.textContent=f,l=r(),_(d.$$.fragment)},l(n){o=m(n,"P",{"data-svelte-h":!0}),h(o)!=="svelte-11lpom8"&&(o.textContent=f),l=i(n),v(d.$$.fragment,n)},m(n,u){a(n,o,u),a(n,l,u),b(d,n,u),g=!0},p:ve,i(n){g||(y(d.$$.fragment,n),g=!0)},o(n){w(d.$$.fragment,n),g=!1},d(n){n&&(s(o),s(l)),M(d,n)}}}function Jt($){let o,f=`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=c("p"),o.innerHTML=f},l(l){o=m(l,"P",{"data-svelte-h":!0}),h(o)!=="svelte-fincs2"&&(o.innerHTML=f)},m(l,d){a(l,o,d)},p:ve,d(l){l&&s(o)}}}function Dt($){let o,f="Example:",l,d,g;return d=new tt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERpbm92MldpdGhSZWdpc3RlcnNGb3JJbWFnZUNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmRpbm92Ml93aXRoX3JlZ2lzdGVycy1zbWFsbC1pbWFnZW5ldDFrLTEtbGF5ZXIlMjIpJTBBbW9kZWwlMjAlM0QlMjBEaW5vdjJXaXRoUmVnaXN0ZXJzRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZkaW5vdjJfd2l0aF9yZWdpc3RlcnMtc21hbGwtaW1hZ2VuZXQxay0xLWxheWVyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, Dinov2WithRegistersForImageClassification
<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>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/dinov2_with_registers-small-imagenet1k-1-layer&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Dinov2WithRegistersForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/dinov2_with_registers-small-imagenet1k-1-layer&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`,wrap:!1}}),{c(){o=c("p"),o.textContent=f,l=r(),_(d.$$.fragment)},l(n){o=m(n,"P",{"data-svelte-h":!0}),h(o)!=="svelte-11lpom8"&&(o.textContent=f),l=i(n),v(d.$$.fragment,n)},m(n,u){a(n,o,u),a(n,l,u),b(d,n,u),g=!0},p:ve,i(n){g||(y(d.$$.fragment,n),g=!0)},o(n){w(d.$$.fragment,n),g=!1},d(n){n&&(s(o),s(l)),M(d,n)}}}function Zt($){let o,f,l,d,g,n,u,be,E,st='The DINOv2 with Registers model was proposed in <a href="https://arxiv.org/abs/2309.16588" rel="nofollow">Vision Transformers Need Registers</a> by Timothée Darcet, Maxime Oquab, Julien Mairal, Piotr Bojanowski.',ye,V,ot='The <a href="vit">Vision Transformer</a> (ViT) is a transformer encoder model (BERT-like) originally introduced to do supervised image classification on ImageNet.',we,q,nt='Next, people figured out ways to make ViT work really well on self-supervised image feature extraction (i.e. learning meaningful features, also called embeddings) on images without requiring any labels. Some example papers here include <a href="dinov2">DINOv2</a> and <a href="vit_mae">MAE</a>.',Me,H,at="The authors of DINOv2 noticed that ViTs have artifacts in attention maps. It’s due to the model using some image patches as “registers”. The authors propose a fix: just add some new tokens (called “register” tokens), which you only use during pre-training (and throw away afterwards). This results in:",Te,X,rt="<li>no artifacts</li> <li>interpretable attention maps</li> <li>and improved performances.</li>",We,P,it="The abstract from the paper is the following:",$e,L,lt="<em>Transformers have recently emerged as a powerful tool for learning visual representations. In this paper, we identify and characterize artifacts in feature maps of both supervised and self-supervised ViT networks. The artifacts correspond to high-norm tokens appearing during inference primarily in low-informative background areas of images, that are repurposed for internal computations. We propose a simple yet effective solution based on providing additional tokens to the input sequence of the Vision Transformer to fill that role. We show that this solution fixes that problem entirely for both supervised and self-supervised models, sets a new state of the art for self-supervised visual models on dense visual prediction tasks, enables object discovery methods with larger models, and most importantly leads to smoother feature maps and attention maps for downstream visual processing.</em>",Re,F,dt,Ce,S,ct='Visualization of attention maps of various models trained with vs. without registers. Taken from the <a href="https://arxiv.org/abs/2309.16588">original paper</a>.',je,Y,mt="Tips:",xe,O,pt="<li>Usage of DINOv2 with Registers is identical to DINOv2 without, you’ll just get better performance.</li>",ke,Q,ht=`This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>.
The original code can be found <a href="https://github.com/facebookresearch/dinov2" rel="nofollow">here</a>.`,Ie,A,Je,T,K,Ge,le,gt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30530/en/model_doc/dinov2_with_registers#transformers.Dinov2WithRegistersModel">Dinov2WithRegistersModel</a>. It is used to instantiate an
Dinov2WithRegisters 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 DINOv2 with Registers
<a href="https://huggingface.co/facebook/dinov2-with-registers-base" rel="nofollow">facebook/dinov2-with-registers-base</a> architecture.`,Ee,de,ft=`Configuration objects inherit from <a href="/docs/transformers/pr_30530/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/pr_30530/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ve,z,De,ee,Ze,j,te,qe,ce,ut=`The bare Dinov2WithRegisters 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.`,He,R,se,Xe,me,_t='The <a href="/docs/transformers/pr_30530/en/model_doc/dinov2_with_registers#transformers.Dinov2WithRegistersModel">Dinov2WithRegistersModel</a> forward method, overrides the <code>__call__</code> special method.',Pe,U,Le,B,Fe,oe,ze,W,ne,Se,pe,vt=`Dinov2WithRegisters 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.`,Ye,he,bt=`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.`,Oe,C,ae,Qe,ge,yt='The <a href="/docs/transformers/pr_30530/en/model_doc/dinov2_with_registers#transformers.Dinov2WithRegistersForImageClassification">Dinov2WithRegistersForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Ae,N,Ke,G,Ue,re,Be,fe,Ne;return g=new _e({props:{title:"DINOv2 with Registers",local:"dinov2-with-registers",headingTag:"h1"}}),u=new _e({props:{title:"Overview",local:"overview",headingTag:"h2"}}),A=new _e({props:{title:"Dinov2WithRegistersConfig",local:"transformers.Dinov2WithRegistersConfig",headingTag:"h2"}}),K=new ue({props:{name:"class transformers.Dinov2WithRegistersConfig",anchor:"transformers.Dinov2WithRegistersConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"mlp_ratio",val:" = 4"},{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-06"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"qkv_bias",val:" = True"},{name:"layerscale_value",val:" = 1.0"},{name:"drop_path_rate",val:" = 0.0"},{name:"use_swiglu_ffn",val:" = False"},{name:"num_register_tokens",val:" = 4"},{name:"out_features",val:" = None"},{name:"out_indices",val:" = None"},{name:"apply_layernorm",val:" = True"},{name:"reshape_hidden_states",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Dinov2WithRegistersConfig.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.Dinov2WithRegistersConfig.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.Dinov2WithRegistersConfig.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.Dinov2WithRegistersConfig.mlp_ratio",description:`<strong>mlp_ratio</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Ratio of the hidden size of the MLPs relative to the <code>hidden_size</code>.`,name:"mlp_ratio"},{anchor:"transformers.Dinov2WithRegistersConfig.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.Dinov2WithRegistersConfig.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.Dinov2WithRegistersConfig.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.Dinov2WithRegistersConfig.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.Dinov2WithRegistersConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-06) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.Dinov2WithRegistersConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.Dinov2WithRegistersConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.Dinov2WithRegistersConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.Dinov2WithRegistersConfig.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.Dinov2WithRegistersConfig.layerscale_value",description:`<strong>layerscale_value</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Initial value to use for layer scale.`,name:"layerscale_value"},{anchor:"transformers.Dinov2WithRegistersConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Stochastic depth rate per sample (when applied in the main path of residual layers).`,name:"drop_path_rate"},{anchor:"transformers.Dinov2WithRegistersConfig.use_swiglu_ffn",description:`<strong>use_swiglu_ffn</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use the SwiGLU feedforward neural network.`,name:"use_swiglu_ffn"},{anchor:"transformers.Dinov2WithRegistersConfig.num_register_tokens",description:`<strong>num_register_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of register tokens to use.`,name:"num_register_tokens"},{anchor:"transformers.Dinov2WithRegistersConfig.out_features",description:`<strong>out_features</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
If used as backbone, list of features to output. Can be any of <code>&quot;stem&quot;</code>, <code>&quot;stage1&quot;</code>, <code>&quot;stage2&quot;</code>, etc.
(depending on how many stages the model has). If unset and <code>out_indices</code> is set, will default to the
corresponding stages. If unset and <code>out_indices</code> is unset, will default to the last stage. Must be in the
same order as defined in the <code>stage_names</code> attribute.`,name:"out_features"},{anchor:"transformers.Dinov2WithRegistersConfig.out_indices",description:`<strong>out_indices</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
If used as backbone, list of indices of features to output. Can be any of 0, 1, 2, etc. (depending on how
many stages the model has). If unset and <code>out_features</code> is set, will default to the corresponding stages.
If unset and <code>out_features</code> is unset, will default to the last stage. Must be in the
same order as defined in the <code>stage_names</code> attribute.`,name:"out_indices"},{anchor:"transformers.Dinov2WithRegistersConfig.apply_layernorm",description:`<strong>apply_layernorm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to apply layer normalization to the feature maps in case the model is used as backbone.`,name:"apply_layernorm"},{anchor:"transformers.Dinov2WithRegistersConfig.reshape_hidden_states",description:`<strong>reshape_hidden_states</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to reshape the feature maps to 4D tensors of shape <code>(batch_size, hidden_size, height, width)</code> in
case the model is used as backbone. If <code>False</code>, the feature maps will be 3D tensors of shape <code>(batch_size, seq_len, hidden_size)</code>.`,name:"reshape_hidden_states"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/dinov2_with_registers/configuration_dinov2_with_registers.py#L27"}}),z=new et({props:{anchor:"transformers.Dinov2WithRegistersConfig.example",$$slots:{default:[xt]},$$scope:{ctx:$}}}),ee=new _e({props:{title:"Dinov2WithRegistersModel",local:"transformers.Dinov2WithRegistersModel",headingTag:"h2"}}),te=new ue({props:{name:"class transformers.Dinov2WithRegistersModel",anchor:"transformers.Dinov2WithRegistersModel",parameters:[{name:"config",val:": Dinov2WithRegistersConfig"}],parametersDescription:[{anchor:"transformers.Dinov2WithRegistersModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30530/en/model_doc/dinov2_with_registers#transformers.Dinov2WithRegistersConfig">Dinov2WithRegistersConfig</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/pr_30530/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/vr_30530/src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py#L622"}}),se=new ue({props:{name:"forward",anchor:"transformers.Dinov2WithRegistersModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"bool_masked_pos",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Dinov2WithRegistersModel.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/pr_30530/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_30530/en/model_doc/bit#transformers.BitImageProcessor.preprocess">BitImageProcessor.preprocess()</a> for details.`,name:"pixel_values"},{anchor:"transformers.Dinov2WithRegistersModel.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0). Only relevant for
pre-training.`,name:"bool_masked_pos"},{anchor:"transformers.Dinov2WithRegistersModel.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.Dinov2WithRegistersModel.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.Dinov2WithRegistersModel.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.Dinov2WithRegistersModel.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/pr_30530/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py#L650",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/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/pr_30530/en/model_doc/dinov2_with_registers#transformers.Dinov2WithRegistersConfig"
>Dinov2WithRegistersConfig</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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30530/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),U=new wt({props:{$$slots:{default:[kt]},$$scope:{ctx:$}}}),B=new et({props:{anchor:"transformers.Dinov2WithRegistersModel.forward.example",$$slots:{default:[It]},$$scope:{ctx:$}}}),oe=new _e({props:{title:"Dinov2WithRegistersForImageClassification",local:"transformers.Dinov2WithRegistersForImageClassification",headingTag:"h2"}}),ne=new ue({props:{name:"class transformers.Dinov2WithRegistersForImageClassification",anchor:"transformers.Dinov2WithRegistersForImageClassification",parameters:[{name:"config",val:": Dinov2WithRegistersConfig"}],parametersDescription:[{anchor:"transformers.Dinov2WithRegistersForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30530/en/model_doc/dinov2_with_registers#transformers.Dinov2WithRegistersConfig">Dinov2WithRegistersConfig</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/pr_30530/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/vr_30530/src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py#L735"}}),ae=new ue({props:{name:"forward",anchor:"transformers.Dinov2WithRegistersForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Dinov2WithRegistersForImageClassification.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/pr_30530/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_30530/en/model_doc/bit#transformers.BitImageProcessor.preprocess">BitImageProcessor.preprocess()</a> for details.`,name:"pixel_values"},{anchor:"transformers.Dinov2WithRegistersForImageClassification.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.Dinov2WithRegistersForImageClassification.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.Dinov2WithRegistersForImageClassification.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.Dinov2WithRegistersForImageClassification.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/pr_30530/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Dinov2WithRegistersForImageClassification.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/vr_30530/src/transformers/models/dinov2_with_registers/modeling_dinov2_with_registers.py#L757",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/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/pr_30530/en/model_doc/dinov2_with_registers#transformers.Dinov2WithRegistersConfig"
>Dinov2WithRegistersConfig</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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30530/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),N=new wt({props:{$$slots:{default:[Jt]},$$scope:{ctx:$}}}),G=new et({props:{anchor:"transformers.Dinov2WithRegistersForImageClassification.forward.example",$$slots:{default:[Dt]},$$scope:{ctx:$}}}),re=new jt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/dinov2_with_registers.md"}}),{c(){o=c("meta"),f=r(),l=c("p"),d=r(),_(g.$$.fragment),n=r(),_(u.$$.fragment),be=r(),E=c("p"),E.innerHTML=st,ye=r(),V=c("p"),V.innerHTML=ot,we=r(),q=c("p"),q.innerHTML=nt,Me=r(),H=c("p"),H.textContent=at,Te=r(),X=c("ul"),X.innerHTML=rt,We=r(),P=c("p"),P.textContent=it,$e=r(),L=c("p"),L.innerHTML=lt,Re=r(),F=c("img"),Ce=r(),S=c("small"),S.innerHTML=ct,je=r(),Y=c("p"),Y.textContent=mt,xe=r(),O=c("ul"),O.innerHTML=pt,ke=r(),Q=c("p"),Q.innerHTML=ht,Ie=r(),_(A.$$.fragment),Je=r(),T=c("div"),_(K.$$.fragment),Ge=r(),le=c("p"),le.innerHTML=gt,Ee=r(),de=c("p"),de.innerHTML=ft,Ve=r(),_(z.$$.fragment),De=r(),_(ee.$$.fragment),Ze=r(),j=c("div"),_(te.$$.fragment),qe=r(),ce=c("p"),ce.innerHTML=ut,He=r(),R=c("div"),_(se.$$.fragment),Xe=r(),me=c("p"),me.innerHTML=_t,Pe=r(),_(U.$$.fragment),Le=r(),_(B.$$.fragment),Fe=r(),_(oe.$$.fragment),ze=r(),W=c("div"),_(ne.$$.fragment),Se=r(),pe=c("p"),pe.textContent=vt,Ye=r(),he=c("p"),he.innerHTML=bt,Oe=r(),C=c("div"),_(ae.$$.fragment),Qe=r(),ge=c("p"),ge.innerHTML=yt,Ae=r(),_(N.$$.fragment),Ke=r(),_(G.$$.fragment),Ue=r(),_(re.$$.fragment),Be=r(),fe=c("p"),this.h()},l(e){const t=Ct("svelte-u9bgzb",document.head);o=m(t,"META",{name:!0,content:!0}),t.forEach(s),f=i(e),l=m(e,"P",{}),ie(l).forEach(s),d=i(e),v(g.$$.fragment,e),n=i(e),v(u.$$.fragment,e),be=i(e),E=m(e,"P",{"data-svelte-h":!0}),h(E)!=="svelte-186wjoo"&&(E.innerHTML=st),ye=i(e),V=m(e,"P",{"data-svelte-h":!0}),h(V)!=="svelte-18g9qk4"&&(V.innerHTML=ot),we=i(e),q=m(e,"P",{"data-svelte-h":!0}),h(q)!=="svelte-wk8sx6"&&(q.innerHTML=nt),Me=i(e),H=m(e,"P",{"data-svelte-h":!0}),h(H)!=="svelte-mt6h66"&&(H.textContent=at),Te=i(e),X=m(e,"UL",{"data-svelte-h":!0}),h(X)!=="svelte-yewla5"&&(X.innerHTML=rt),We=i(e),P=m(e,"P",{"data-svelte-h":!0}),h(P)!=="svelte-vfdo9a"&&(P.textContent=it),$e=i(e),L=m(e,"P",{"data-svelte-h":!0}),h(L)!=="svelte-1hjigbh"&&(L.innerHTML=lt),Re=i(e),F=m(e,"IMG",{src:!0,alt:!0,width:!0}),Ce=i(e),S=m(e,"SMALL",{"data-svelte-h":!0}),h(S)!=="svelte-1reu7vt"&&(S.innerHTML=ct),je=i(e),Y=m(e,"P",{"data-svelte-h":!0}),h(Y)!=="svelte-axv494"&&(Y.textContent=mt),xe=i(e),O=m(e,"UL",{"data-svelte-h":!0}),h(O)!=="svelte-5wbwen"&&(O.innerHTML=pt),ke=i(e),Q=m(e,"P",{"data-svelte-h":!0}),h(Q)!=="svelte-1exxkia"&&(Q.innerHTML=ht),Ie=i(e),v(A.$$.fragment,e),Je=i(e),T=m(e,"DIV",{class:!0});var x=ie(T);v(K.$$.fragment,x),Ge=i(x),le=m(x,"P",{"data-svelte-h":!0}),h(le)!=="svelte-11mqirq"&&(le.innerHTML=gt),Ee=i(x),de=m(x,"P",{"data-svelte-h":!0}),h(de)!=="svelte-l1blo3"&&(de.innerHTML=ft),Ve=i(x),v(z.$$.fragment,x),x.forEach(s),De=i(e),v(ee.$$.fragment,e),Ze=i(e),j=m(e,"DIV",{class:!0});var Z=ie(j);v(te.$$.fragment,Z),qe=i(Z),ce=m(Z,"P",{"data-svelte-h":!0}),h(ce)!=="svelte-z68dvz"&&(ce.innerHTML=ut),He=i(Z),R=m(Z,"DIV",{class:!0});var k=ie(R);v(se.$$.fragment,k),Xe=i(k),me=m(k,"P",{"data-svelte-h":!0}),h(me)!=="svelte-11ry0be"&&(me.innerHTML=_t),Pe=i(k),v(U.$$.fragment,k),Le=i(k),v(B.$$.fragment,k),k.forEach(s),Z.forEach(s),Fe=i(e),v(oe.$$.fragment,e),ze=i(e),W=m(e,"DIV",{class:!0});var I=ie(W);v(ne.$$.fragment,I),Se=i(I),pe=m(I,"P",{"data-svelte-h":!0}),h(pe)!=="svelte-1swlkuj"&&(pe.textContent=vt),Ye=i(I),he=m(I,"P",{"data-svelte-h":!0}),h(he)!=="svelte-1gjh92c"&&(he.innerHTML=bt),Oe=i(I),C=m(I,"DIV",{class:!0});var J=ie(C);v(ae.$$.fragment,J),Qe=i(J),ge=m(J,"P",{"data-svelte-h":!0}),h(ge)!=="svelte-192d3ik"&&(ge.innerHTML=yt),Ae=i(J),v(N.$$.fragment,J),Ke=i(J),v(G.$$.fragment,J),J.forEach(s),I.forEach(s),Ue=i(e),v(re.$$.fragment,e),Be=i(e),fe=m(e,"P",{}),ie(fe).forEach(s),this.h()},h(){D(o,"name","hf:doc:metadata"),D(o,"content",Ft),Tt(F.src,dt="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/dinov2_with_registers_visualization.png")||D(F,"src",dt),D(F,"alt","drawing"),D(F,"width","600"),D(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(W,"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,t){p(document.head,o),a(e,f,t),a(e,l,t),a(e,d,t),b(g,e,t),a(e,n,t),b(u,e,t),a(e,be,t),a(e,E,t),a(e,ye,t),a(e,V,t),a(e,we,t),a(e,q,t),a(e,Me,t),a(e,H,t),a(e,Te,t),a(e,X,t),a(e,We,t),a(e,P,t),a(e,$e,t),a(e,L,t),a(e,Re,t),a(e,F,t),a(e,Ce,t),a(e,S,t),a(e,je,t),a(e,Y,t),a(e,xe,t),a(e,O,t),a(e,ke,t),a(e,Q,t),a(e,Ie,t),b(A,e,t),a(e,Je,t),a(e,T,t),b(K,T,null),p(T,Ge),p(T,le),p(T,Ee),p(T,de),p(T,Ve),b(z,T,null),a(e,De,t),b(ee,e,t),a(e,Ze,t),a(e,j,t),b(te,j,null),p(j,qe),p(j,ce),p(j,He),p(j,R),b(se,R,null),p(R,Xe),p(R,me),p(R,Pe),b(U,R,null),p(R,Le),b(B,R,null),a(e,Fe,t),b(oe,e,t),a(e,ze,t),a(e,W,t),b(ne,W,null),p(W,Se),p(W,pe),p(W,Ye),p(W,he),p(W,Oe),p(W,C),b(ae,C,null),p(C,Qe),p(C,ge),p(C,Ae),b(N,C,null),p(C,Ke),b(G,C,null),a(e,Ue,t),b(re,e,t),a(e,Be,t),a(e,fe,t),Ne=!0},p(e,[t]){const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),z.$set(x);const Z={};t&2&&(Z.$$scope={dirty:t,ctx:e}),U.$set(Z);const k={};t&2&&(k.$$scope={dirty:t,ctx:e}),B.$set(k);const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),N.$set(I);const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),G.$set(J)},i(e){Ne||(y(g.$$.fragment,e),y(u.$$.fragment,e),y(A.$$.fragment,e),y(K.$$.fragment,e),y(z.$$.fragment,e),y(ee.$$.fragment,e),y(te.$$.fragment,e),y(se.$$.fragment,e),y(U.$$.fragment,e),y(B.$$.fragment,e),y(oe.$$.fragment,e),y(ne.$$.fragment,e),y(ae.$$.fragment,e),y(N.$$.fragment,e),y(G.$$.fragment,e),y(re.$$.fragment,e),Ne=!0)},o(e){w(g.$$.fragment,e),w(u.$$.fragment,e),w(A.$$.fragment,e),w(K.$$.fragment,e),w(z.$$.fragment,e),w(ee.$$.fragment,e),w(te.$$.fragment,e),w(se.$$.fragment,e),w(U.$$.fragment,e),w(B.$$.fragment,e),w(oe.$$.fragment,e),w(ne.$$.fragment,e),w(ae.$$.fragment,e),w(N.$$.fragment,e),w(G.$$.fragment,e),w(re.$$.fragment,e),Ne=!1},d(e){e&&(s(f),s(l),s(d),s(n),s(be),s(E),s(ye),s(V),s(we),s(q),s(Me),s(H),s(Te),s(X),s(We),s(P),s($e),s(L),s(Re),s(F),s(Ce),s(S),s(je),s(Y),s(xe),s(O),s(ke),s(Q),s(Ie),s(Je),s(T),s(De),s(Ze),s(j),s(Fe),s(ze),s(W),s(Ue),s(Be),s(fe)),s(o),M(g,e),M(u,e),M(A,e),M(K),M(z),M(ee,e),M(te),M(se),M(U),M(B),M(oe,e),M(ne),M(ae),M(N),M(G),M(re,e)}}}const Ft='{"title":"DINOv2 with Registers","local":"dinov2-with-registers","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Dinov2WithRegistersConfig","local":"transformers.Dinov2WithRegistersConfig","sections":[],"depth":2},{"title":"Dinov2WithRegistersModel","local":"transformers.Dinov2WithRegistersModel","sections":[],"depth":2},{"title":"Dinov2WithRegistersForImageClassification","local":"transformers.Dinov2WithRegistersForImageClassification","sections":[],"depth":2}],"depth":1}';function zt($){return Wt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ht extends $t{constructor(o){super(),Rt(this,o,zt,Zt,Mt,{})}}export{Ht as component};
