import{s as Nn,f as Fn,o as Wn,n as Qe}from"../chunks/scheduler.9bc65507.js";import{S as Un,i as Jn,g as a,s as l,u as _,A as An,h as s,f as t,c as d,j as u,v as b,y as f,k as p,o as c,a as o,w as v,d as w,t as y,x as T}from"../chunks/index.78c82d43.js";import{T as In}from"../chunks/Tip.87d55b76.js";import{D as Ve}from"../chunks/Docstring.f3d04bd2.js";import{C as qt}from"../chunks/CodeBlock.48618ec2.js";import{I as Ee}from"../chunks/IconCopyLink.bedaa44d.js";import{E as St}from"../chunks/ExampleCodeBlock.872b014d.js";import{P as Zn}from"../chunks/PipelineTag.75b0f707.js";function En(j){let i,M="Example:",h,m,g;return m=new qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERpbmF0Q29uZmlnJTJDJTIwRGluYXRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBEaW5hdCUyMHNoaS1sYWJzJTJGZGluYXQtbWluaS1pbjFrLTIyNCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBEaW5hdENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBzaGktbGFicyUyRmRpbmF0LW1pbmktaW4xay0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMERpbmF0TW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DinatConfig, DinatModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Dinat shi-labs/dinat-mini-in1k-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = DinatConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the shi-labs/dinat-mini-in1k-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DinatModel(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(){i=a("p"),i.textContent=M,h=l(),_(m.$$.fragment)},l(r){i=s(r,"P",{"data-svelte-h":!0}),f(i)!=="svelte-11lpom8"&&(i.textContent=M),h=d(r),b(m.$$.fragment,r)},m(r,$){o(r,i,$),o(r,h,$),v(m,r,$),g=!0},p:Qe,i(r){g||(w(m.$$.fragment,r),g=!0)},o(r){y(m.$$.fragment,r),g=!1},d(r){r&&(t(i),t(h)),T(m,r)}}}function zn(j){let i,M=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){i=a("p"),i.innerHTML=M},l(h){i=s(h,"P",{"data-svelte-h":!0}),f(i)!=="svelte-fincs2"&&(i.innerHTML=M)},m(h,m){o(h,i,m)},p:Qe,d(h){h&&t(i)}}}function Pn(j){let i,M="Example:",h,m,g;return m=new qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERpbmF0TW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMnNoaS1sYWJzJTJGZGluYXQtbWluaS1pbjFrLTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMERpbmF0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnNoaS1sYWJzJTJGZGluYXQtbWluaS1pbjFrLTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DinatModel
<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;shi-labs/dinat-mini-in1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DinatModel.from_pretrained(<span class="hljs-string">&quot;shi-labs/dinat-mini-in1k-224&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>, <span class="hljs-number">512</span>]`}}),{c(){i=a("p"),i.textContent=M,h=l(),_(m.$$.fragment)},l(r){i=s(r,"P",{"data-svelte-h":!0}),f(i)!=="svelte-11lpom8"&&(i.textContent=M),h=d(r),b(m.$$.fragment,r)},m(r,$){o(r,i,$),o(r,h,$),v(m,r,$),g=!0},p:Qe,i(r){g||(w(m.$$.fragment,r),g=!0)},o(r){y(m.$$.fragment,r),g=!1},d(r){r&&(t(i),t(h)),T(m,r)}}}function Gn(j){let i,M=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){i=a("p"),i.innerHTML=M},l(h){i=s(h,"P",{"data-svelte-h":!0}),f(i)!=="svelte-fincs2"&&(i.innerHTML=M)},m(h,m){o(h,i,m)},p:Qe,d(h){h&&t(i)}}}function Rn(j){let i,M="Example:",h,m,g;return m=new qt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERpbmF0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyc2hpLWxhYnMlMkZkaW5hdC1taW5pLWluMWstMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwRGluYXRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJzaGktbGFicyUyRmRpbmF0LW1pbmktaW4xay0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, DinatForImageClassification
<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;shi-labs/dinat-mini-in1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DinatForImageClassification.from_pretrained(<span class="hljs-string">&quot;shi-labs/dinat-mini-in1k-224&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`}}),{c(){i=a("p"),i.textContent=M,h=l(),_(m.$$.fragment)},l(r){i=s(r,"P",{"data-svelte-h":!0}),f(i)!=="svelte-11lpom8"&&(i.textContent=M),h=d(r),b(m.$$.fragment,r)},m(r,$){o(r,i,$),o(r,h,$),v(m,r,$),g=!0},p:Qe,i(r){g||(w(m.$$.fragment,r),g=!0)},o(r){y(m.$$.fragment,r),g=!1},d(r){r&&(t(i),t(h)),T(m,r)}}}function Hn(j){let i,M,h,m,g,r,$,Y,Ct,$e,Bt="Dilated Neighborhood Attention Transformer",Xe,N,A,ze,O,xt,Ce,Vt="Overview",Ye,K,Qt=`DiNAT was proposed in <a href="https://arxiv.org/abs/2209.15001" rel="nofollow">Dilated Neighborhood Attention Transformer</a>
by Ali Hassani and Humphrey Shi.`,Oe,ee,Xt=`It extends <a href="nat">NAT</a> by adding a Dilated Neighborhood Attention pattern to capture global context,
and shows significant performance improvements over it.`,Ke,te,Yt="The abstract from the paper is the following:",et,ne,Ot=`<em>Transformers are quickly becoming one of the most heavily applied deep learning architectures across modalities,
domains, and tasks. In vision, on top of ongoing efforts into plain transformers, hierarchical transformers have
also gained significant attention, thanks to their performance and easy integration into existing frameworks.
These models typically employ localized attention mechanisms, such as the sliding-window Neighborhood Attention (NA)
or Swin Transformer’s Shifted Window Self Attention. While effective at reducing self attention’s quadratic complexity,
local attention weakens two of the most desirable properties of self attention: long range inter-dependency modeling,
and global receptive field. In this paper, we introduce Dilated Neighborhood Attention (DiNA), a natural, flexible and
efficient extension to NA that can capture more global context and expand receptive fields exponentially at no
additional cost. NA’s local attention and DiNA’s sparse global attention complement each other, and therefore we
introduce Dilated Neighborhood Attention Transformer (DiNAT), a new hierarchical vision transformer built upon both.
DiNAT variants enjoy significant improvements over strong baselines such as NAT, Swin, and ConvNeXt.
Our large model is faster and ahead of its Swin counterpart by 1.5% box AP in COCO object detection,
1.3% mask AP in COCO instance segmentation, and 1.1% mIoU in ADE20K semantic segmentation.
Paired with new frameworks, our large variant is the new state of the art panoptic segmentation model on COCO (58.2 PQ)
and ADE20K (48.5 PQ), and instance segmentation model on Cityscapes (44.5 AP) and ADE20K (35.4 AP) (no extra data).
It also matches the state of the art specialized semantic segmentation models on ADE20K (58.2 mIoU),
and ranks second on Cityscapes (84.5 mIoU) (no extra data).</em>`,tt,oe,Kt="Tips:",nt,ae,en=`<li>One can use the <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a> API to prepare images for the model.</li> <li>DiNAT can be used as a <em>backbone</em>. When <code>output_hidden_states = True</code>,
it will output both <code>hidden_states</code> and <code>reshaped_hidden_states</code>. The <code>reshaped_hidden_states</code> have a shape of <code>(batch, num_channels, height, width)</code> rather than <code>(batch_size, height, width, num_channels)</code>.</li>`,ot,se,tn="Notes:",at,re,nn=`<li>DiNAT depends on <a href="https://github.com/SHI-Labs/NATTEN/" rel="nofollow">NATTEN</a>’s implementation of Neighborhood Attention and Dilated Neighborhood Attention.
You can install it with pre-built wheels for Linux by referring to <a href="https://shi-labs.com/natten" rel="nofollow">shi-labs.com/natten</a>, or build on your system by running <code>pip install natten</code>.
Note that the latter will likely take time to compile. NATTEN does not support Windows devices yet.</li> <li>Patch size of 4 is only supported at the moment.</li>`,st,Z,on,rt,ie,an=`Neighborhood Attention with different dilation values.
Taken from the <a href="https://arxiv.org/abs/2209.15001">original paper</a>.`,it,le,sn=`This model was contributed by <a href="https://huggingface.co/alihassanijr" rel="nofollow">Ali Hassani</a>.
The original code can be found <a href="https://github.com/SHI-Labs/Neighborhood-Attention-Transformer" rel="nofollow">here</a>.`,lt,F,E,Pe,de,jt,xe,rn="Resources",dt,ce,ln="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DiNAT.",ct,pe,pt,he,dn='<li><a href="/docs/transformers/v4.33.3/en/model_doc/dinat#transformers.DinatForImageClassification">DinatForImageClassification</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification" rel="nofollow">example script</a> and <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb" rel="nofollow">notebook</a>.</li> <li>See also: <a href="../tasks/image_classification">Image classification task guide</a></li>',ht,me,cn="If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",mt,W,z,Ge,fe,Dt,je,pn="DinatConfig",ft,C,ue,kt,De,hn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/dinat#transformers.DinatModel">DinatModel</a>. It is used to instantiate a Dinat
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 Dinat
<a href="https://huggingface.co/shi-labs/dinat-mini-in1k-224" rel="nofollow">shi-labs/dinat-mini-in1k-224</a> architecture.`,It,ke,mn=`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.`,Nt,P,ut,U,G,Re,ge,Ft,Ie,fn="DinatModel",gt,I,_e,Wt,Ne,un=`The bare Dinat 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> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Ut,D,be,Jt,Fe,gn='The <a href="/docs/transformers/v4.33.3/en/model_doc/dinat#transformers.DinatModel">DinatModel</a> forward method, overrides the <code>__call__</code> special method.',At,R,Zt,H,_t,J,L,He,ve,Et,We,_n="DinatForImageClassification",bt,x,we,zt,Ue,bn=`Dinat 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.`,Pt,Je,vn=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Gt,k,ye,Rt,Ae,wn='The <a href="/docs/transformers/v4.33.3/en/model_doc/dinat#transformers.DinatForImageClassification">DinatForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',Ht,S,Lt,q,vt,Le,wt;return Y=new Ee({}),O=new Ee({}),de=new Ee({}),pe=new Zn({props:{pipeline:"image-classification"}}),fe=new Ee({}),ue=new Ve({props:{name:"class transformers.DinatConfig",anchor:"transformers.DinatConfig",parameters:[{name:"patch_size",val:" = 4"},{name:"num_channels",val:" = 3"},{name:"embed_dim",val:" = 64"},{name:"depths",val:" = [3, 4, 6, 5]"},{name:"num_heads",val:" = [2, 4, 8, 16]"},{name:"kernel_size",val:" = 7"},{name:"dilations",val:" = [[1, 8, 1], [1, 4, 1, 4], [1, 2, 1, 2, 1, 2], [1, 1, 1, 1, 1]]"},{name:"mlp_ratio",val:" = 3.0"},{name:"qkv_bias",val:" = True"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"drop_path_rate",val:" = 0.1"},{name:"hidden_act",val:" = 'gelu'"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"layer_scale_init_value",val:" = 0.0"},{name:"out_features",val:" = None"},{name:"out_indices",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DinatConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The size (resolution) of each patch. NOTE: Only patch size of 4 is supported at the moment.`,name:"patch_size"},{anchor:"transformers.DinatConfig.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.DinatConfig.embed_dim",description:`<strong>embed_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Dimensionality of patch embedding.`,name:"embed_dim"},{anchor:"transformers.DinatConfig.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 2, 6, 2]</code>) &#x2014;
Number of layers in each level of the encoder.`,name:"depths"},{anchor:"transformers.DinatConfig.num_heads",description:`<strong>num_heads</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 6, 12, 24]</code>) &#x2014;
Number of attention heads in each layer of the Transformer encoder.`,name:"num_heads"},{anchor:"transformers.DinatConfig.kernel_size",description:`<strong>kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 7) &#x2014;
Neighborhood Attention kernel size.`,name:"kernel_size"},{anchor:"transformers.DinatConfig.dilations",description:`<strong>dilations</strong> (<code>List[List[int]]</code>, <em>optional</em>, defaults to <code>[[1, 8, 1], [1, 4, 1, 4], [1, 2, 1, 2, 1, 2], [1, 1, 1, 1, 1]]</code>) &#x2014;
Dilation value of each NA layer in the Transformer encoder.`,name:"dilations"},{anchor:"transformers.DinatConfig.mlp_ratio",description:`<strong>mlp_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 3.0) &#x2014;
Ratio of MLP hidden dimensionality to embedding dimensionality.`,name:"mlp_ratio"},{anchor:"transformers.DinatConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not a learnable bias should be added to the queries, keys and values.`,name:"qkv_bias"},{anchor:"transformers.DinatConfig.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 and encoder.`,name:"hidden_dropout_prob"},{anchor:"transformers.DinatConfig.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.DinatConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Stochastic depth rate.`,name:"drop_path_rate"},{anchor:"transformers.DinatConfig.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. 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.DinatConfig.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.DinatConfig.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.DinatConfig.layer_scale_init_value",description:`<strong>layer_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The initial value for the layer scale. Disabled if &lt;=0.`,name:"layer_scale_init_value"},{anchor:"transformers.DinatConfig.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.`,name:"out_features"},{anchor:"transformers.DinatConfig.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.`,name:"out_indices"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/dinat/configuration_dinat.py#L30"}}),P=new St({props:{anchor:"transformers.DinatConfig.example",$$slots:{default:[En]},$$scope:{ctx:j}}}),ge=new Ee({}),_e=new Ve({props:{name:"class transformers.DinatModel",anchor:"transformers.DinatModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.DinatModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/dinat#transformers.DinatConfig">DinatConfig</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/dinat/modeling_dinat.py#L700"}}),be=new Ve({props:{name:"forward",anchor:"transformers.DinatModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.DinatModel.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.DinatModel.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.DinatModel.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.DinatModel.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"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/dinat/modeling_dinat.py#L730",returnDescription:`
<p>A <code>transformers.models.dinat.modeling_dinat.DinatModelOutput</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/dinat#transformers.DinatConfig"
>DinatConfig</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>, <em>optional</em>, returned when <code>add_pooling_layer=True</code> is passed) — Average pooling of the last layer hidden-state.</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 + one for the output of each stage) 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(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 stage) 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>
<li>
<p><strong>reshaped_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each stage) of
shape <code>(batch_size, hidden_size, height, width)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs reshaped to
include the spatial dimensions.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.dinat.modeling_dinat.DinatModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),R=new In({props:{$$slots:{default:[zn]},$$scope:{ctx:j}}}),H=new St({props:{anchor:"transformers.DinatModel.forward.example",$$slots:{default:[Pn]},$$scope:{ctx:j}}}),ve=new Ee({}),we=new Ve({props:{name:"class transformers.DinatForImageClassification",anchor:"transformers.DinatForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DinatForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/dinat#transformers.DinatConfig">DinatConfig</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/dinat/modeling_dinat.py#L792"}}),ye=new Ve({props:{name:"forward",anchor:"transformers.DinatForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.DinatForImageClassification.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.DinatForImageClassification.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.DinatForImageClassification.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.DinatForImageClassification.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.DinatForImageClassification.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/dinat/modeling_dinat.py#L809",returnDescription:`
<p>A <code>transformers.models.dinat.modeling_dinat.DinatImageClassifierOutput</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/dinat#transformers.DinatConfig"
>DinatConfig</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 + one for the output of each stage) 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(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 stage) 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>
<li>
<p><strong>reshaped_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each stage) of
shape <code>(batch_size, hidden_size, height, width)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs reshaped to
include the spatial dimensions.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.dinat.modeling_dinat.DinatImageClassifierOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),S=new In({props:{$$slots:{default:[Gn]},$$scope:{ctx:j}}}),q=new St({props:{anchor:"transformers.DinatForImageClassification.forward.example",$$slots:{default:[Rn]},$$scope:{ctx:j}}}),{c(){i=a("meta"),M=l(),h=a("p"),m=l(),g=a("h1"),r=a("a"),$=a("span"),_(Y.$$.fragment),Ct=l(),$e=a("span"),$e.textContent=Bt,Xe=l(),N=a("h2"),A=a("a"),ze=a("span"),_(O.$$.fragment),xt=l(),Ce=a("span"),Ce.textContent=Vt,Ye=l(),K=a("p"),K.innerHTML=Qt,Oe=l(),ee=a("p"),ee.innerHTML=Xt,Ke=l(),te=a("p"),te.textContent=Yt,et=l(),ne=a("p"),ne.innerHTML=Ot,tt=l(),oe=a("p"),oe.textContent=Kt,nt=l(),ae=a("ul"),ae.innerHTML=en,ot=l(),se=a("p"),se.textContent=tn,at=l(),re=a("ul"),re.innerHTML=nn,st=l(),Z=a("img"),rt=l(),ie=a("small"),ie.innerHTML=an,it=l(),le=a("p"),le.innerHTML=sn,lt=l(),F=a("h2"),E=a("a"),Pe=a("span"),_(de.$$.fragment),jt=l(),xe=a("span"),xe.textContent=rn,dt=l(),ce=a("p"),ce.textContent=ln,ct=l(),_(pe.$$.fragment),pt=l(),he=a("ul"),he.innerHTML=dn,ht=l(),me=a("p"),me.textContent=cn,mt=l(),W=a("h2"),z=a("a"),Ge=a("span"),_(fe.$$.fragment),Dt=l(),je=a("span"),je.textContent=pn,ft=l(),C=a("div"),_(ue.$$.fragment),kt=l(),De=a("p"),De.innerHTML=hn,It=l(),ke=a("p"),ke.innerHTML=mn,Nt=l(),_(P.$$.fragment),ut=l(),U=a("h2"),G=a("a"),Re=a("span"),_(ge.$$.fragment),Ft=l(),Ie=a("span"),Ie.textContent=fn,gt=l(),I=a("div"),_(_e.$$.fragment),Wt=l(),Ne=a("p"),Ne.innerHTML=un,Ut=l(),D=a("div"),_(be.$$.fragment),Jt=l(),Fe=a("p"),Fe.innerHTML=gn,At=l(),_(R.$$.fragment),Zt=l(),_(H.$$.fragment),_t=l(),J=a("h2"),L=a("a"),He=a("span"),_(ve.$$.fragment),Et=l(),We=a("span"),We.textContent=_n,bt=l(),x=a("div"),_(we.$$.fragment),zt=l(),Ue=a("p"),Ue.textContent=bn,Pt=l(),Je=a("p"),Je.innerHTML=vn,Gt=l(),k=a("div"),_(ye.$$.fragment),Rt=l(),Ae=a("p"),Ae.innerHTML=wn,Ht=l(),_(S.$$.fragment),Lt=l(),_(q.$$.fragment),vt=l(),Le=a("p"),this.h()},l(e){const n=An("svelte-1phssyn",document.head);i=s(n,"META",{name:!0,content:!0}),n.forEach(t),M=d(e),h=s(e,"P",{}),u(h).forEach(t),m=d(e),g=s(e,"H1",{class:!0});var Te=u(g);r=s(Te,"A",{id:!0,class:!0,href:!0});var Se=u(r);$=s(Se,"SPAN",{});var qe=u($);b(Y.$$.fragment,qe),qe.forEach(t),Se.forEach(t),Ct=d(Te),$e=s(Te,"SPAN",{"data-svelte-h":!0}),f($e)!=="svelte-90ctvj"&&($e.textContent=Bt),Te.forEach(t),Xe=d(e),N=s(e,"H2",{class:!0});var Me=u(N);A=s(Me,"A",{id:!0,class:!0,href:!0});var Be=u(A);ze=s(Be,"SPAN",{});var yn=u(ze);b(O.$$.fragment,yn),yn.forEach(t),Be.forEach(t),xt=d(Me),Ce=s(Me,"SPAN",{"data-svelte-h":!0}),f(Ce)!=="svelte-1jsw1pg"&&(Ce.textContent=Vt),Me.forEach(t),Ye=d(e),K=s(e,"P",{"data-svelte-h":!0}),f(K)!=="svelte-3lrypl"&&(K.innerHTML=Qt),Oe=d(e),ee=s(e,"P",{"data-svelte-h":!0}),f(ee)!=="svelte-1xqjndc"&&(ee.innerHTML=Xt),Ke=d(e),te=s(e,"P",{"data-svelte-h":!0}),f(te)!=="svelte-vfdo9a"&&(te.textContent=Yt),et=d(e),ne=s(e,"P",{"data-svelte-h":!0}),f(ne)!=="svelte-1ufwjgc"&&(ne.innerHTML=Ot),tt=d(e),oe=s(e,"P",{"data-svelte-h":!0}),f(oe)!=="svelte-axv494"&&(oe.textContent=Kt),nt=d(e),ae=s(e,"UL",{"data-svelte-h":!0}),f(ae)!=="svelte-iv8r9m"&&(ae.innerHTML=en),ot=d(e),se=s(e,"P",{"data-svelte-h":!0}),f(se)!=="svelte-1biq3pv"&&(se.textContent=tn),at=d(e),re=s(e,"UL",{"data-svelte-h":!0}),f(re)!=="svelte-dxsoin"&&(re.innerHTML=nn),st=d(e),Z=s(e,"IMG",{src:!0,alt:!0,width:!0}),rt=d(e),ie=s(e,"SMALL",{"data-svelte-h":!0}),f(ie)!=="svelte-cvtpr4"&&(ie.innerHTML=an),it=d(e),le=s(e,"P",{"data-svelte-h":!0}),f(le)!=="svelte-1emlw2j"&&(le.innerHTML=sn),lt=d(e),F=s(e,"H2",{class:!0});var yt=u(F);E=s(yt,"A",{id:!0,class:!0,href:!0});var Tn=u(E);Pe=s(Tn,"SPAN",{});var Mn=u(Pe);b(de.$$.fragment,Mn),Mn.forEach(t),Tn.forEach(t),jt=d(yt),xe=s(yt,"SPAN",{"data-svelte-h":!0}),f(xe)!=="svelte-w4zzv6"&&(xe.textContent=rn),yt.forEach(t),dt=d(e),ce=s(e,"P",{"data-svelte-h":!0}),f(ce)!=="svelte-1nm4j59"&&(ce.textContent=ln),ct=d(e),b(pe.$$.fragment,e),pt=d(e),he=s(e,"UL",{"data-svelte-h":!0}),f(he)!=="svelte-kvus3x"&&(he.innerHTML=dn),ht=d(e),me=s(e,"P",{"data-svelte-h":!0}),f(me)!=="svelte-1xesile"&&(me.textContent=cn),mt=d(e),W=s(e,"H2",{class:!0});var Tt=u(W);z=s(Tt,"A",{id:!0,class:!0,href:!0});var $n=u(z);Ge=s($n,"SPAN",{});var Cn=u(Ge);b(fe.$$.fragment,Cn),Cn.forEach(t),$n.forEach(t),Dt=d(Tt),je=s(Tt,"SPAN",{"data-svelte-h":!0}),f(je)!=="svelte-1r7ea37"&&(je.textContent=pn),Tt.forEach(t),ft=d(e),C=s(e,"DIV",{class:!0});var B=u(C);b(ue.$$.fragment,B),kt=d(B),De=s(B,"P",{"data-svelte-h":!0}),f(De)!=="svelte-tvymb"&&(De.innerHTML=hn),It=d(B),ke=s(B,"P",{"data-svelte-h":!0}),f(ke)!=="svelte-cfh5wl"&&(ke.innerHTML=mn),Nt=d(B),b(P.$$.fragment,B),B.forEach(t),ut=d(e),U=s(e,"H2",{class:!0});var Mt=u(U);G=s(Mt,"A",{id:!0,class:!0,href:!0});var xn=u(G);Re=s(xn,"SPAN",{});var jn=u(Re);b(ge.$$.fragment,jn),jn.forEach(t),xn.forEach(t),Ft=d(Mt),Ie=s(Mt,"SPAN",{"data-svelte-h":!0}),f(Ie)!=="svelte-59qcl8"&&(Ie.textContent=fn),Mt.forEach(t),gt=d(e),I=s(e,"DIV",{class:!0});var Ze=u(I);b(_e.$$.fragment,Ze),Wt=d(Ze),Ne=s(Ze,"P",{"data-svelte-h":!0}),f(Ne)!=="svelte-bq276k"&&(Ne.innerHTML=un),Ut=d(Ze),D=s(Ze,"DIV",{class:!0});var V=u(D);b(be.$$.fragment,V),Jt=d(V),Fe=s(V,"P",{"data-svelte-h":!0}),f(Fe)!=="svelte-h6veyh"&&(Fe.innerHTML=gn),At=d(V),b(R.$$.fragment,V),Zt=d(V),b(H.$$.fragment,V),V.forEach(t),Ze.forEach(t),_t=d(e),J=s(e,"H2",{class:!0});var $t=u(J);L=s($t,"A",{id:!0,class:!0,href:!0});var Dn=u(L);He=s(Dn,"SPAN",{});var kn=u(He);b(ve.$$.fragment,kn),kn.forEach(t),Dn.forEach(t),Et=d($t),We=s($t,"SPAN",{"data-svelte-h":!0}),f(We)!=="svelte-1hvq9b9"&&(We.textContent=_n),$t.forEach(t),bt=d(e),x=s(e,"DIV",{class:!0});var Q=u(x);b(we.$$.fragment,Q),zt=d(Q),Ue=s(Q,"P",{"data-svelte-h":!0}),f(Ue)!=="svelte-17tpduv"&&(Ue.textContent=bn),Pt=d(Q),Je=s(Q,"P",{"data-svelte-h":!0}),f(Je)!=="svelte-68lg8f"&&(Je.innerHTML=vn),Gt=d(Q),k=s(Q,"DIV",{class:!0});var X=u(k);b(ye.$$.fragment,X),Rt=d(X),Ae=s(X,"P",{"data-svelte-h":!0}),f(Ae)!=="svelte-xqeegb"&&(Ae.innerHTML=wn),Ht=d(X),b(S.$$.fragment,X),Lt=d(X),b(q.$$.fragment,X),X.forEach(t),Q.forEach(t),vt=d(e),Le=s(e,"P",{}),u(Le).forEach(t),this.h()},h(){p(i,"name","hf:doc:metadata"),p(i,"content",JSON.stringify(Ln)),p(r,"id","dilated-neighborhood-attention-transformer"),p(r,"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"),p(r,"href","#dilated-neighborhood-attention-transformer"),p(g,"class","relative group"),p(A,"id","overview"),p(A,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(A,"href","#overview"),p(N,"class","relative group"),Fn(Z.src,on="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/dilated-neighborhood-attention-pattern.jpg")||p(Z,"src",on),p(Z,"alt","drawing"),p(Z,"width","600"),p(E,"id","resources"),p(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"),p(E,"href","#resources"),p(F,"class","relative group"),p(z,"id","transformers.DinatConfig"),p(z,"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"),p(z,"href","#transformers.DinatConfig"),p(W,"class","relative group"),p(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(G,"id","transformers.DinatModel"),p(G,"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"),p(G,"href","#transformers.DinatModel"),p(U,"class","relative group"),p(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(L,"id","transformers.DinatForImageClassification"),p(L,"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"),p(L,"href","#transformers.DinatForImageClassification"),p(J,"class","relative group"),p(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(x,"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,n){c(document.head,i),o(e,M,n),o(e,h,n),o(e,m,n),o(e,g,n),c(g,r),c(r,$),v(Y,$,null),c(g,Ct),c(g,$e),o(e,Xe,n),o(e,N,n),c(N,A),c(A,ze),v(O,ze,null),c(N,xt),c(N,Ce),o(e,Ye,n),o(e,K,n),o(e,Oe,n),o(e,ee,n),o(e,Ke,n),o(e,te,n),o(e,et,n),o(e,ne,n),o(e,tt,n),o(e,oe,n),o(e,nt,n),o(e,ae,n),o(e,ot,n),o(e,se,n),o(e,at,n),o(e,re,n),o(e,st,n),o(e,Z,n),o(e,rt,n),o(e,ie,n),o(e,it,n),o(e,le,n),o(e,lt,n),o(e,F,n),c(F,E),c(E,Pe),v(de,Pe,null),c(F,jt),c(F,xe),o(e,dt,n),o(e,ce,n),o(e,ct,n),v(pe,e,n),o(e,pt,n),o(e,he,n),o(e,ht,n),o(e,me,n),o(e,mt,n),o(e,W,n),c(W,z),c(z,Ge),v(fe,Ge,null),c(W,Dt),c(W,je),o(e,ft,n),o(e,C,n),v(ue,C,null),c(C,kt),c(C,De),c(C,It),c(C,ke),c(C,Nt),v(P,C,null),o(e,ut,n),o(e,U,n),c(U,G),c(G,Re),v(ge,Re,null),c(U,Ft),c(U,Ie),o(e,gt,n),o(e,I,n),v(_e,I,null),c(I,Wt),c(I,Ne),c(I,Ut),c(I,D),v(be,D,null),c(D,Jt),c(D,Fe),c(D,At),v(R,D,null),c(D,Zt),v(H,D,null),o(e,_t,n),o(e,J,n),c(J,L),c(L,He),v(ve,He,null),c(J,Et),c(J,We),o(e,bt,n),o(e,x,n),v(we,x,null),c(x,zt),c(x,Ue),c(x,Pt),c(x,Je),c(x,Gt),c(x,k),v(ye,k,null),c(k,Rt),c(k,Ae),c(k,Ht),v(S,k,null),c(k,Lt),v(q,k,null),o(e,vt,n),o(e,Le,n),wt=!0},p(e,[n]){const Te={};n&2&&(Te.$$scope={dirty:n,ctx:e}),P.$set(Te);const Se={};n&2&&(Se.$$scope={dirty:n,ctx:e}),R.$set(Se);const qe={};n&2&&(qe.$$scope={dirty:n,ctx:e}),H.$set(qe);const Me={};n&2&&(Me.$$scope={dirty:n,ctx:e}),S.$set(Me);const Be={};n&2&&(Be.$$scope={dirty:n,ctx:e}),q.$set(Be)},i(e){wt||(w(Y.$$.fragment,e),w(O.$$.fragment,e),w(de.$$.fragment,e),w(pe.$$.fragment,e),w(fe.$$.fragment,e),w(ue.$$.fragment,e),w(P.$$.fragment,e),w(ge.$$.fragment,e),w(_e.$$.fragment,e),w(be.$$.fragment,e),w(R.$$.fragment,e),w(H.$$.fragment,e),w(ve.$$.fragment,e),w(we.$$.fragment,e),w(ye.$$.fragment,e),w(S.$$.fragment,e),w(q.$$.fragment,e),wt=!0)},o(e){y(Y.$$.fragment,e),y(O.$$.fragment,e),y(de.$$.fragment,e),y(pe.$$.fragment,e),y(fe.$$.fragment,e),y(ue.$$.fragment,e),y(P.$$.fragment,e),y(ge.$$.fragment,e),y(_e.$$.fragment,e),y(be.$$.fragment,e),y(R.$$.fragment,e),y(H.$$.fragment,e),y(ve.$$.fragment,e),y(we.$$.fragment,e),y(ye.$$.fragment,e),y(S.$$.fragment,e),y(q.$$.fragment,e),wt=!1},d(e){e&&(t(M),t(h),t(m),t(g),t(Xe),t(N),t(Ye),t(K),t(Oe),t(ee),t(Ke),t(te),t(et),t(ne),t(tt),t(oe),t(nt),t(ae),t(ot),t(se),t(at),t(re),t(st),t(Z),t(rt),t(ie),t(it),t(le),t(lt),t(F),t(dt),t(ce),t(ct),t(pt),t(he),t(ht),t(me),t(mt),t(W),t(ft),t(C),t(ut),t(U),t(gt),t(I),t(_t),t(J),t(bt),t(x),t(vt),t(Le)),t(i),T(Y),T(O),T(de),T(pe,e),T(fe),T(ue),T(P),T(ge),T(_e),T(be),T(R),T(H),T(ve),T(we),T(ye),T(S),T(q)}}}const Ln={local:"dilated-neighborhood-attention-transformer",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.DinatConfig",title:"DinatConfig"},{local:"transformers.DinatModel",title:"DinatModel"},{local:"transformers.DinatForImageClassification",title:"DinatForImageClassification"}],title:"Dilated Neighborhood Attention Transformer"};function Sn(j){return Wn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class eo extends Un{constructor(i){super(),Jn(this,i,Sn,Hn,Nn,{})}}export{eo as component};
