import{s as Ft,f as Ut,o as Nt,n as Me}from"../chunks/scheduler.25b97de1.js";import{S as Jt,i as kt,g as l,s as i,r as u,A as Zt,h as d,f as n,c as r,j as me,u as g,x as h,k as N,y as p,a as o,v as _,d as b,t as w,w as y}from"../chunks/index.d9030fc9.js";import{T as Wt}from"../chunks/Tip.baa67368.js";import{D as Te}from"../chunks/Docstring.e257edda.js";import{C as dt}from"../chunks/CodeBlock.e6cd0d95.js";import{E as lt}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{P as zt}from"../chunks/PipelineTag.5f100392.js";import{H as pe,E as Gt}from"../chunks/EditOnGithub.91d95064.js";function Rt(C){let a,T="Example:",c,m,f;return m=new dt({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`,wrap:!1}}),{c(){a=l("p"),a.textContent=T,c=i(),u(m.$$.fragment)},l(s){a=d(s,"P",{"data-svelte-h":!0}),h(a)!=="svelte-11lpom8"&&(a.textContent=T),c=r(s),g(m.$$.fragment,s)},m(s,M){o(s,a,M),o(s,c,M),_(m,s,M),f=!0},p:Me,i(s){f||(b(m.$$.fragment,s),f=!0)},o(s){w(m.$$.fragment,s),f=!1},d(s){s&&(n(a),n(c)),y(m,s)}}}function At(C){let a,T=`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(){a=l("p"),a.innerHTML=T},l(c){a=d(c,"P",{"data-svelte-h":!0}),h(a)!=="svelte-fincs2"&&(a.innerHTML=T)},m(c,m){o(c,a,m)},p:Me,d(c){c&&n(a)}}}function Et(C){let a,T="Example:",c,m,f;return m=new dt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERpbmF0TW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMnNoaS1sYWJzJTJGZGluYXQtbWluaS1pbjFrLTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMERpbmF0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnNoaS1sYWJzJTJGZGluYXQtbWluaS1pbjFrLTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",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>, 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;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>]`,wrap:!1}}),{c(){a=l("p"),a.textContent=T,c=i(),u(m.$$.fragment)},l(s){a=d(s,"P",{"data-svelte-h":!0}),h(a)!=="svelte-11lpom8"&&(a.textContent=T),c=r(s),g(m.$$.fragment,s)},m(s,M){o(s,a,M),o(s,c,M),_(m,s,M),f=!0},p:Me,i(s){f||(b(m.$$.fragment,s),f=!0)},o(s){w(m.$$.fragment,s),f=!1},d(s){s&&(n(a),n(c)),y(m,s)}}}function Ht(C){let a,T=`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(){a=l("p"),a.innerHTML=T},l(c){a=d(c,"P",{"data-svelte-h":!0}),h(a)!=="svelte-fincs2"&&(a.innerHTML=T)},m(c,m){o(c,a,m)},p:Me,d(c){c&&n(a)}}}function Lt(C){let a,T="Example:",c,m,f;return m=new dt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMERpbmF0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyc2hpLWxhYnMlMkZkaW5hdC1taW5pLWluMWstMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwRGluYXRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJzaGktbGFicyUyRmRpbmF0LW1pbmktaW4xay0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",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>, 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;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`,wrap:!1}}),{c(){a=l("p"),a.textContent=T,c=i(),u(m.$$.fragment)},l(s){a=d(s,"P",{"data-svelte-h":!0}),h(a)!=="svelte-11lpom8"&&(a.textContent=T),c=r(s),g(m.$$.fragment,s)},m(s,M){o(s,a,M),o(s,c,M),_(m,s,M),f=!0},p:Me,i(s){f||(b(m.$$.fragment,s),f=!0)},o(s){w(m.$$.fragment,s),f=!1},d(s){s&&(n(a),n(c)),y(m,s)}}}function Pt(C){let a,T,c,m,f,s,M,$e,E,ct=`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.`,ve,H,mt=`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.`,Ce,L,pt="The abstract from the paper is the following:",je,P,ht=`<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>`,xe,k,ft,De,q,ut=`Neighborhood Attention with different dilation values.
Taken from the <a href="https://arxiv.org/abs/2209.15001">original paper</a>.`,Ie,B,gt=`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>.`,We,S,Fe,V,_t=`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>.`,Ue,X,bt="Notes:",Ne,Y,wt=`<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>`,Je,Q,ke,O,yt="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with DiNAT.",Ze,K,ze,ee,Tt='<li><a href="/docs/transformers/main/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>',Ge,te,Mt="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.",Re,ne,Ae,$,oe,Ve,he,$t=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/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.`,Xe,fe,vt=`Configuration objects inherit from <a href="/docs/transformers/main/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/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ye,Z,Ee,ae,He,D,se,Qe,ue,Ct=`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.`,Oe,j,ie,Ke,ge,jt='The <a href="/docs/transformers/main/en/model_doc/dinat#transformers.DinatModel">DinatModel</a> forward method, overrides the <code>__call__</code> special method.',et,z,tt,G,Le,re,Pe,v,le,nt,_e,xt=`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.`,ot,be,Dt=`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.`,at,x,de,st,we,It='The <a href="/docs/transformers/main/en/model_doc/dinat#transformers.DinatForImageClassification">DinatForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',it,R,rt,A,qe,ce,Be,ye,Se;return f=new pe({props:{title:"Dilated Neighborhood Attention Transformer",local:"dilated-neighborhood-attention-transformer",headingTag:"h1"}}),M=new pe({props:{title:"Overview",local:"overview",headingTag:"h2"}}),S=new pe({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),Q=new pe({props:{title:"Resources",local:"resources",headingTag:"h2"}}),K=new zt({props:{pipeline:"image-classification"}}),ne=new pe({props:{title:"DinatConfig",local:"transformers.DinatConfig",headingTag:"h2"}}),oe=new Te({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>[3, 4, 6, 5]</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>[2, 4, 8, 16]</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-05) &#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. Must be in the
same order as defined in the <code>stage_names</code> attribute.`,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. Must be in the
same order as defined in the <code>stage_names</code> attribute.`,name:"out_indices"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/dinat/configuration_dinat.py#L25"}}),Z=new lt({props:{anchor:"transformers.DinatConfig.example",$$slots:{default:[Rt]},$$scope:{ctx:C}}}),ae=new pe({props:{title:"DinatModel",local:"transformers.DinatModel",headingTag:"h2"}}),se=new Te({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/main/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/main/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/main/src/transformers/models/dinat/modeling_dinat.py#L672"}}),ie=new Te({props:{name:"forward",anchor:"transformers.DinatModel.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/vit#transformers.ViTFeatureExtractor.__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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/dinat/modeling_dinat.py#L706",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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/main/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.dinat.modeling_dinat.DinatModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),z=new Wt({props:{$$slots:{default:[At]},$$scope:{ctx:C}}}),G=new lt({props:{anchor:"transformers.DinatModel.forward.example",$$slots:{default:[Et]},$$scope:{ctx:C}}}),re=new pe({props:{title:"DinatForImageClassification",local:"transformers.DinatForImageClassification",headingTag:"h2"}}),le=new Te({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/main/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/main/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/main/src/transformers/models/dinat/modeling_dinat.py#L761"}}),de=new Te({props:{name:"forward",anchor:"transformers.DinatForImageClassification.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/vit#transformers.ViTFeatureExtractor.__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/main/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/main/src/transformers/models/dinat/modeling_dinat.py#L785",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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/main/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.dinat.modeling_dinat.DinatImageClassifierOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),R=new Wt({props:{$$slots:{default:[Ht]},$$scope:{ctx:C}}}),A=new lt({props:{anchor:"transformers.DinatForImageClassification.forward.example",$$slots:{default:[Lt]},$$scope:{ctx:C}}}),ce=new Gt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/dinat.md"}}),{c(){a=l("meta"),T=i(),c=l("p"),m=i(),u(f.$$.fragment),s=i(),u(M.$$.fragment),$e=i(),E=l("p"),E.innerHTML=ct,ve=i(),H=l("p"),H.innerHTML=mt,Ce=i(),L=l("p"),L.textContent=pt,je=i(),P=l("p"),P.innerHTML=ht,xe=i(),k=l("img"),De=i(),q=l("small"),q.innerHTML=ut,Ie=i(),B=l("p"),B.innerHTML=gt,We=i(),u(S.$$.fragment),Fe=i(),V=l("p"),V.innerHTML=_t,Ue=i(),X=l("p"),X.textContent=bt,Ne=i(),Y=l("ul"),Y.innerHTML=wt,Je=i(),u(Q.$$.fragment),ke=i(),O=l("p"),O.textContent=yt,Ze=i(),u(K.$$.fragment),ze=i(),ee=l("ul"),ee.innerHTML=Tt,Ge=i(),te=l("p"),te.textContent=Mt,Re=i(),u(ne.$$.fragment),Ae=i(),$=l("div"),u(oe.$$.fragment),Ve=i(),he=l("p"),he.innerHTML=$t,Xe=i(),fe=l("p"),fe.innerHTML=vt,Ye=i(),u(Z.$$.fragment),Ee=i(),u(ae.$$.fragment),He=i(),D=l("div"),u(se.$$.fragment),Qe=i(),ue=l("p"),ue.innerHTML=Ct,Oe=i(),j=l("div"),u(ie.$$.fragment),Ke=i(),ge=l("p"),ge.innerHTML=jt,et=i(),u(z.$$.fragment),tt=i(),u(G.$$.fragment),Le=i(),u(re.$$.fragment),Pe=i(),v=l("div"),u(le.$$.fragment),nt=i(),_e=l("p"),_e.textContent=xt,ot=i(),be=l("p"),be.innerHTML=Dt,at=i(),x=l("div"),u(de.$$.fragment),st=i(),we=l("p"),we.innerHTML=It,it=i(),u(R.$$.fragment),rt=i(),u(A.$$.fragment),qe=i(),u(ce.$$.fragment),Be=i(),ye=l("p"),this.h()},l(e){const t=Zt("svelte-u9bgzb",document.head);a=d(t,"META",{name:!0,content:!0}),t.forEach(n),T=r(e),c=d(e,"P",{}),me(c).forEach(n),m=r(e),g(f.$$.fragment,e),s=r(e),g(M.$$.fragment,e),$e=r(e),E=d(e,"P",{"data-svelte-h":!0}),h(E)!=="svelte-3lrypl"&&(E.innerHTML=ct),ve=r(e),H=d(e,"P",{"data-svelte-h":!0}),h(H)!=="svelte-1xqjndc"&&(H.innerHTML=mt),Ce=r(e),L=d(e,"P",{"data-svelte-h":!0}),h(L)!=="svelte-vfdo9a"&&(L.textContent=pt),je=r(e),P=d(e,"P",{"data-svelte-h":!0}),h(P)!=="svelte-1ufwjgc"&&(P.innerHTML=ht),xe=r(e),k=d(e,"IMG",{src:!0,alt:!0,width:!0}),De=r(e),q=d(e,"SMALL",{"data-svelte-h":!0}),h(q)!=="svelte-cvtpr4"&&(q.innerHTML=ut),Ie=r(e),B=d(e,"P",{"data-svelte-h":!0}),h(B)!=="svelte-1emlw2j"&&(B.innerHTML=gt),We=r(e),g(S.$$.fragment,e),Fe=r(e),V=d(e,"P",{"data-svelte-h":!0}),h(V)!=="svelte-1rigu5j"&&(V.innerHTML=_t),Ue=r(e),X=d(e,"P",{"data-svelte-h":!0}),h(X)!=="svelte-1biq3pv"&&(X.textContent=bt),Ne=r(e),Y=d(e,"UL",{"data-svelte-h":!0}),h(Y)!=="svelte-dxsoin"&&(Y.innerHTML=wt),Je=r(e),g(Q.$$.fragment,e),ke=r(e),O=d(e,"P",{"data-svelte-h":!0}),h(O)!=="svelte-1nm4j59"&&(O.textContent=yt),Ze=r(e),g(K.$$.fragment,e),ze=r(e),ee=d(e,"UL",{"data-svelte-h":!0}),h(ee)!=="svelte-mopgip"&&(ee.innerHTML=Tt),Ge=r(e),te=d(e,"P",{"data-svelte-h":!0}),h(te)!=="svelte-1xesile"&&(te.textContent=Mt),Re=r(e),g(ne.$$.fragment,e),Ae=r(e),$=d(e,"DIV",{class:!0});var I=me($);g(oe.$$.fragment,I),Ve=r(I),he=d(I,"P",{"data-svelte-h":!0}),h(he)!=="svelte-v5wi0v"&&(he.innerHTML=$t),Xe=r(I),fe=d(I,"P",{"data-svelte-h":!0}),h(fe)!=="svelte-o55m63"&&(fe.innerHTML=vt),Ye=r(I),g(Z.$$.fragment,I),I.forEach(n),Ee=r(e),g(ae.$$.fragment,e),He=r(e),D=d(e,"DIV",{class:!0});var J=me(D);g(se.$$.fragment,J),Qe=r(J),ue=d(J,"P",{"data-svelte-h":!0}),h(ue)!=="svelte-bq276k"&&(ue.innerHTML=Ct),Oe=r(J),j=d(J,"DIV",{class:!0});var W=me(j);g(ie.$$.fragment,W),Ke=r(W),ge=d(W,"P",{"data-svelte-h":!0}),h(ge)!=="svelte-jb4bz"&&(ge.innerHTML=jt),et=r(W),g(z.$$.fragment,W),tt=r(W),g(G.$$.fragment,W),W.forEach(n),J.forEach(n),Le=r(e),g(re.$$.fragment,e),Pe=r(e),v=d(e,"DIV",{class:!0});var F=me(v);g(le.$$.fragment,F),nt=r(F),_e=d(F,"P",{"data-svelte-h":!0}),h(_e)!=="svelte-17tpduv"&&(_e.textContent=xt),ot=r(F),be=d(F,"P",{"data-svelte-h":!0}),h(be)!=="svelte-68lg8f"&&(be.innerHTML=Dt),at=r(F),x=d(F,"DIV",{class:!0});var U=me(x);g(de.$$.fragment,U),st=r(U),we=d(U,"P",{"data-svelte-h":!0}),h(we)!=="svelte-1w8jja9"&&(we.innerHTML=It),it=r(U),g(R.$$.fragment,U),rt=r(U),g(A.$$.fragment,U),U.forEach(n),F.forEach(n),qe=r(e),g(ce.$$.fragment,e),Be=r(e),ye=d(e,"P",{}),me(ye).forEach(n),this.h()},h(){N(a,"name","hf:doc:metadata"),N(a,"content",qt),Ut(k.src,ft="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/dilated-neighborhood-attention-pattern.jpg")||N(k,"src",ft),N(k,"alt","drawing"),N(k,"width","600"),N($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),N(v,"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,a),o(e,T,t),o(e,c,t),o(e,m,t),_(f,e,t),o(e,s,t),_(M,e,t),o(e,$e,t),o(e,E,t),o(e,ve,t),o(e,H,t),o(e,Ce,t),o(e,L,t),o(e,je,t),o(e,P,t),o(e,xe,t),o(e,k,t),o(e,De,t),o(e,q,t),o(e,Ie,t),o(e,B,t),o(e,We,t),_(S,e,t),o(e,Fe,t),o(e,V,t),o(e,Ue,t),o(e,X,t),o(e,Ne,t),o(e,Y,t),o(e,Je,t),_(Q,e,t),o(e,ke,t),o(e,O,t),o(e,Ze,t),_(K,e,t),o(e,ze,t),o(e,ee,t),o(e,Ge,t),o(e,te,t),o(e,Re,t),_(ne,e,t),o(e,Ae,t),o(e,$,t),_(oe,$,null),p($,Ve),p($,he),p($,Xe),p($,fe),p($,Ye),_(Z,$,null),o(e,Ee,t),_(ae,e,t),o(e,He,t),o(e,D,t),_(se,D,null),p(D,Qe),p(D,ue),p(D,Oe),p(D,j),_(ie,j,null),p(j,Ke),p(j,ge),p(j,et),_(z,j,null),p(j,tt),_(G,j,null),o(e,Le,t),_(re,e,t),o(e,Pe,t),o(e,v,t),_(le,v,null),p(v,nt),p(v,_e),p(v,ot),p(v,be),p(v,at),p(v,x),_(de,x,null),p(x,st),p(x,we),p(x,it),_(R,x,null),p(x,rt),_(A,x,null),o(e,qe,t),_(ce,e,t),o(e,Be,t),o(e,ye,t),Se=!0},p(e,[t]){const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),Z.$set(I);const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),z.$set(J);const W={};t&2&&(W.$$scope={dirty:t,ctx:e}),G.$set(W);const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),R.$set(F);const U={};t&2&&(U.$$scope={dirty:t,ctx:e}),A.$set(U)},i(e){Se||(b(f.$$.fragment,e),b(M.$$.fragment,e),b(S.$$.fragment,e),b(Q.$$.fragment,e),b(K.$$.fragment,e),b(ne.$$.fragment,e),b(oe.$$.fragment,e),b(Z.$$.fragment,e),b(ae.$$.fragment,e),b(se.$$.fragment,e),b(ie.$$.fragment,e),b(z.$$.fragment,e),b(G.$$.fragment,e),b(re.$$.fragment,e),b(le.$$.fragment,e),b(de.$$.fragment,e),b(R.$$.fragment,e),b(A.$$.fragment,e),b(ce.$$.fragment,e),Se=!0)},o(e){w(f.$$.fragment,e),w(M.$$.fragment,e),w(S.$$.fragment,e),w(Q.$$.fragment,e),w(K.$$.fragment,e),w(ne.$$.fragment,e),w(oe.$$.fragment,e),w(Z.$$.fragment,e),w(ae.$$.fragment,e),w(se.$$.fragment,e),w(ie.$$.fragment,e),w(z.$$.fragment,e),w(G.$$.fragment,e),w(re.$$.fragment,e),w(le.$$.fragment,e),w(de.$$.fragment,e),w(R.$$.fragment,e),w(A.$$.fragment,e),w(ce.$$.fragment,e),Se=!1},d(e){e&&(n(T),n(c),n(m),n(s),n($e),n(E),n(ve),n(H),n(Ce),n(L),n(je),n(P),n(xe),n(k),n(De),n(q),n(Ie),n(B),n(We),n(Fe),n(V),n(Ue),n(X),n(Ne),n(Y),n(Je),n(ke),n(O),n(Ze),n(ze),n(ee),n(Ge),n(te),n(Re),n(Ae),n($),n(Ee),n(He),n(D),n(Le),n(Pe),n(v),n(qe),n(Be),n(ye)),n(a),y(f,e),y(M,e),y(S,e),y(Q,e),y(K,e),y(ne,e),y(oe),y(Z),y(ae,e),y(se),y(ie),y(z),y(G),y(re,e),y(le),y(de),y(R),y(A),y(ce,e)}}}const qt='{"title":"Dilated Neighborhood Attention Transformer","local":"dilated-neighborhood-attention-transformer","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"DinatConfig","local":"transformers.DinatConfig","sections":[],"depth":2},{"title":"DinatModel","local":"transformers.DinatModel","sections":[],"depth":2},{"title":"DinatForImageClassification","local":"transformers.DinatForImageClassification","sections":[],"depth":2}],"depth":1}';function Bt(C){return Nt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class tn extends Jt{constructor(a){super(),kt(this,a,Bt,Pt,Ft,{})}}export{tn as component};
