import{s as Ht,z as Et,o as Lt,n as $e}from"../chunks/scheduler.18a86fab.js";import{S as Gt,i as At,g as d,s as r,r as f,A as Pt,h as c,f as o,c as i,j as he,u,x as p,k as F,y as h,a,v as g,d as _,t as b,w}from"../chunks/index.98837b22.js";import{T as pt}from"../chunks/Tip.77304350.js";import{D as Me}from"../chunks/Docstring.6758ea23.js";import{C as ft}from"../chunks/CodeBlock.8d0c2e8a.js";import{E as ht}from"../chunks/ExampleCodeBlock.0c42463f.js";import{P as qt}from"../chunks/PipelineTag.7749150e.js";import{H as fe}from"../chunks/Heading.7e7e0c5b.js";import{E as Vt}from"../chunks/index.499f366c.js";function St(v){let n,y=`This model is in maintenance mode only, we don’t accept any new PRs changing its code.
If you run into any issues running this model, please reinstall the last version that supported this model: v4.40.2.
You can do so by running the following command: <code>pip install -U transformers==4.40.2</code>.`;return{c(){n=d("p"),n.innerHTML=y},l(l){n=c(l,"P",{"data-svelte-h":!0}),p(n)!=="svelte-1sq0hrb"&&(n.innerHTML=y)},m(l,m){a(l,n,m)},p:$e,d(l){l&&o(n)}}}function Rt(v){let n,y="Example:",l,m,T;return m=new ft({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME5hdENvbmZpZyUyQyUyME5hdE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyME5hdCUyMHNoaS1sYWJzJTJGbmF0LW1pbmktaW4xay0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwTmF0Q29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMHNoaS1sYWJzJTJGbmF0LW1pbmktaW4xay0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyME5hdE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> NatConfig, NatModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the shi-labs/nat-mini-in1k-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = NatModel(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(){n=d("p"),n.textContent=y,l=r(),f(m.$$.fragment)},l(s){n=c(s,"P",{"data-svelte-h":!0}),p(n)!=="svelte-11lpom8"&&(n.textContent=y),l=i(s),u(m.$$.fragment,s)},m(s,$){a(s,n,$),a(s,l,$),g(m,s,$),T=!0},p:$e,i(s){T||(_(m.$$.fragment,s),T=!0)},o(s){b(m.$$.fragment,s),T=!1},d(s){s&&(o(n),o(l)),w(m,s)}}}function Bt(v){let n,y=`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(){n=d("p"),n.innerHTML=y},l(l){n=c(l,"P",{"data-svelte-h":!0}),p(n)!=="svelte-fincs2"&&(n.innerHTML=y)},m(l,m){a(l,n,m)},p:$e,d(l){l&&o(n)}}}function Xt(v){let n,y="Example:",l,m,T;return m=new ft({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyME5hdE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJzaGktbGFicyUyRm5hdC1taW5pLWluMWstMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwTmF0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnNoaS1sYWJzJTJGbmF0LW1pbmktaW4xay0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, NatModel
<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/nat-mini-in1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = NatModel.from_pretrained(<span class="hljs-string">&quot;shi-labs/nat-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(){n=d("p"),n.textContent=y,l=r(),f(m.$$.fragment)},l(s){n=c(s,"P",{"data-svelte-h":!0}),p(n)!=="svelte-11lpom8"&&(n.textContent=y),l=i(s),u(m.$$.fragment,s)},m(s,$){a(s,n,$),a(s,l,$),g(m,s,$),T=!0},p:$e,i(s){T||(_(m.$$.fragment,s),T=!0)},o(s){b(m.$$.fragment,s),T=!1},d(s){s&&(o(n),o(l)),w(m,s)}}}function Yt(v){let n,y=`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(){n=d("p"),n.innerHTML=y},l(l){n=c(l,"P",{"data-svelte-h":!0}),p(n)!=="svelte-fincs2"&&(n.innerHTML=y)},m(l,m){a(l,n,m)},p:$e,d(l){l&&o(n)}}}function Qt(v){let n,y="Example:",l,m,T;return m=new ft({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyME5hdEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMnNoaS1sYWJzJTJGbmF0LW1pbmktaW4xay0yMjQlMjIpJTBBbW9kZWwlMjAlM0QlMjBOYXRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJzaGktbGFicyUyRm5hdC1taW5pLWluMWstMjI0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, NatForImageClassification
<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/nat-mini-in1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = NatForImageClassification.from_pretrained(<span class="hljs-string">&quot;shi-labs/nat-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])
tiger cat`,wrap:!1}}),{c(){n=d("p"),n.textContent=y,l=r(),f(m.$$.fragment)},l(s){n=c(s,"P",{"data-svelte-h":!0}),p(n)!=="svelte-11lpom8"&&(n.textContent=y),l=i(s),u(m.$$.fragment,s)},m(s,$){a(s,n,$),a(s,l,$),g(m,s,$),T=!0},p:$e,i(s){T||(_(m.$$.fragment,s),T=!0)},o(s){b(m.$$.fragment,s),T=!1},d(s){s&&(o(n),o(l)),w(m,s)}}}function Ot(v){let n,y,l,m,T,s,$,ut='<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/>',Ne,z,Ce,P,xe,q,gt=`NAT was proposed in <a href="https://arxiv.org/abs/2204.07143" rel="nofollow">Neighborhood Attention Transformer</a>
by Ali Hassani, Steven Walton, Jiachen Li, Shen Li, and Humphrey Shi.`,je,V,_t="It is a hierarchical vision transformer based on Neighborhood Attention, a sliding-window self attention pattern.",Je,S,bt="The abstract from the paper is the following:",Ie,R,wt=`<em>We present Neighborhood Attention (NA), the first efficient and scalable sliding-window attention mechanism for vision.
NA is a pixel-wise operation, localizing self attention (SA) to the nearest neighboring pixels, and therefore enjoys a
linear time and space complexity compared to the quadratic complexity of SA. The sliding-window pattern allows NA’s
receptive field to grow without needing extra pixel shifts, and preserves translational equivariance, unlike
Swin Transformer’s Window Self Attention (WSA). We develop NATTEN (Neighborhood Attention Extension), a Python package
with efficient C++ and CUDA kernels, which allows NA to run up to 40% faster than Swin’s WSA while using up to 25% less
memory. We further present Neighborhood Attention Transformer (NAT), a new hierarchical transformer design based on NA
that boosts image classification and downstream vision performance. Experimental results on NAT are competitive;
NAT-Tiny reaches 83.2% top-1 accuracy on ImageNet, 51.4% mAP on MS-COCO and 48.4% mIoU on ADE20K, which is 1.9%
ImageNet accuracy, 1.0% COCO mAP, and 2.6% ADE20K mIoU improvement over a Swin model with similar size.</em>`,Ue,Z,yt,We,B,Tt=`Neighborhood Attention compared to other attention patterns.
Taken from the <a href="https://arxiv.org/abs/2204.07143">original paper</a>.`,Fe,X,$t=`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>.`,ke,Y,ze,Q,vt=`<li>One can use the <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a> API to prepare images for the model.</li> <li>NAT 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>`,Ze,O,Mt="Notes:",He,D,Nt=`<li>NAT depends on <a href="https://github.com/SHI-Labs/NATTEN/" rel="nofollow">NATTEN</a>’s implementation of 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>`,Ee,K,Le,ee,Ct="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with NAT.",Ge,te,Ae,oe,xt='<li><a href="/docs/transformers/main/en/model_doc/nat#transformers.NatForImageClassification">NatForImageClassification</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>',Pe,ne,jt="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.",qe,ae,Ve,M,se,De,ue,Jt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/nat#transformers.NatModel">NatModel</a>. It is used to instantiate a Nat 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 Nat
<a href="https://huggingface.co/shi-labs/nat-mini-in1k-224" rel="nofollow">shi-labs/nat-mini-in1k-224</a> architecture.`,Ke,ge,It=`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.`,et,H,Se,re,Re,j,ie,tt,_e,Ut=`The bare Nat 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.`,ot,C,le,nt,be,Wt='The <a href="/docs/transformers/main/en/model_doc/nat#transformers.NatModel">NatModel</a> forward method, overrides the <code>__call__</code> special method.',at,E,st,L,Be,de,Xe,N,ce,rt,we,Ft=`Nat 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.`,it,ye,kt=`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.`,lt,x,me,dt,Te,zt='The <a href="/docs/transformers/main/en/model_doc/nat#transformers.NatForImageClassification">NatForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',ct,G,mt,A,Ye,pe,Qe,ve,Oe;return T=new fe({props:{title:"Neighborhood Attention Transformer",local:"neighborhood-attention-transformer",headingTag:"h1"}}),z=new pt({props:{warning:!0,$$slots:{default:[St]},$$scope:{ctx:v}}}),P=new fe({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Y=new fe({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),K=new fe({props:{title:"Resources",local:"resources",headingTag:"h2"}}),te=new qt({props:{pipeline:"image-classification"}}),ae=new fe({props:{title:"NatConfig",local:"transformers.NatConfig",headingTag:"h2"}}),se=new Me({props:{name:"class transformers.NatConfig",anchor:"transformers.NatConfig",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:"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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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.NatConfig.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/deprecated/nat/configuration_nat.py#L25"}}),H=new ht({props:{anchor:"transformers.NatConfig.example",$$slots:{default:[Rt]},$$scope:{ctx:v}}}),re=new fe({props:{title:"NatModel",local:"transformers.NatModel",headingTag:"h2"}}),ie=new Me({props:{name:"class transformers.NatModel",anchor:"transformers.NatModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.NatModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/nat#transformers.NatConfig">NatConfig</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/deprecated/nat/modeling_nat.py#L664"}}),le=new Me({props:{name:"forward",anchor:"transformers.NatModel.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.NatModel.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.NatModel.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.NatModel.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.NatModel.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/deprecated/nat/modeling_nat.py#L698",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.deprecated.nat.modeling_nat.NatModelOutput</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/nat#transformers.NatConfig"
>NatConfig</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.deprecated.nat.modeling_nat.NatModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),E=new pt({props:{$$slots:{default:[Bt]},$$scope:{ctx:v}}}),L=new ht({props:{anchor:"transformers.NatModel.forward.example",$$slots:{default:[Xt]},$$scope:{ctx:v}}}),de=new fe({props:{title:"NatForImageClassification",local:"transformers.NatForImageClassification",headingTag:"h2"}}),ce=new Me({props:{name:"class transformers.NatForImageClassification",anchor:"transformers.NatForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.NatForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/nat#transformers.NatConfig">NatConfig</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/deprecated/nat/modeling_nat.py#L753"}}),me=new Me({props:{name:"forward",anchor:"transformers.NatForImageClassification.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.NatForImageClassification.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.NatForImageClassification.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.NatForImageClassification.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.NatForImageClassification.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.NatForImageClassification.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/deprecated/nat/modeling_nat.py#L777",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.deprecated.nat.modeling_nat.NatImageClassifierOutput</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/nat#transformers.NatConfig"
>NatConfig</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.deprecated.nat.modeling_nat.NatImageClassifierOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),G=new pt({props:{$$slots:{default:[Yt]},$$scope:{ctx:v}}}),A=new ht({props:{anchor:"transformers.NatForImageClassification.forward.example",$$slots:{default:[Qt]},$$scope:{ctx:v}}}),pe=new Vt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/nat.md"}}),{c(){n=d("meta"),y=r(),l=d("p"),m=r(),f(T.$$.fragment),s=r(),$=d("div"),$.innerHTML=ut,Ne=r(),f(z.$$.fragment),Ce=r(),f(P.$$.fragment),xe=r(),q=d("p"),q.innerHTML=gt,je=r(),V=d("p"),V.textContent=_t,Je=r(),S=d("p"),S.textContent=bt,Ie=r(),R=d("p"),R.innerHTML=wt,Ue=r(),Z=d("img"),We=r(),B=d("small"),B.innerHTML=Tt,Fe=r(),X=d("p"),X.innerHTML=$t,ke=r(),f(Y.$$.fragment),ze=r(),Q=d("ul"),Q.innerHTML=vt,Ze=r(),O=d("p"),O.textContent=Mt,He=r(),D=d("ul"),D.innerHTML=Nt,Ee=r(),f(K.$$.fragment),Le=r(),ee=d("p"),ee.textContent=Ct,Ge=r(),f(te.$$.fragment),Ae=r(),oe=d("ul"),oe.innerHTML=xt,Pe=r(),ne=d("p"),ne.textContent=jt,qe=r(),f(ae.$$.fragment),Ve=r(),M=d("div"),f(se.$$.fragment),De=r(),ue=d("p"),ue.innerHTML=Jt,Ke=r(),ge=d("p"),ge.innerHTML=It,et=r(),f(H.$$.fragment),Se=r(),f(re.$$.fragment),Re=r(),j=d("div"),f(ie.$$.fragment),tt=r(),_e=d("p"),_e.innerHTML=Ut,ot=r(),C=d("div"),f(le.$$.fragment),nt=r(),be=d("p"),be.innerHTML=Wt,at=r(),f(E.$$.fragment),st=r(),f(L.$$.fragment),Be=r(),f(de.$$.fragment),Xe=r(),N=d("div"),f(ce.$$.fragment),rt=r(),we=d("p"),we.textContent=Ft,it=r(),ye=d("p"),ye.innerHTML=kt,lt=r(),x=d("div"),f(me.$$.fragment),dt=r(),Te=d("p"),Te.innerHTML=zt,ct=r(),f(G.$$.fragment),mt=r(),f(A.$$.fragment),Ye=r(),f(pe.$$.fragment),Qe=r(),ve=d("p"),this.h()},l(e){const t=Pt("svelte-u9bgzb",document.head);n=c(t,"META",{name:!0,content:!0}),t.forEach(o),y=i(e),l=c(e,"P",{}),he(l).forEach(o),m=i(e),u(T.$$.fragment,e),s=i(e),$=c(e,"DIV",{class:!0,"data-svelte-h":!0}),p($)!=="svelte-13t8s2t"&&($.innerHTML=ut),Ne=i(e),u(z.$$.fragment,e),Ce=i(e),u(P.$$.fragment,e),xe=i(e),q=c(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-1c1uj9k"&&(q.innerHTML=gt),je=i(e),V=c(e,"P",{"data-svelte-h":!0}),p(V)!=="svelte-1e8auh6"&&(V.textContent=_t),Je=i(e),S=c(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-vfdo9a"&&(S.textContent=bt),Ie=i(e),R=c(e,"P",{"data-svelte-h":!0}),p(R)!=="svelte-7imk69"&&(R.innerHTML=wt),Ue=i(e),Z=c(e,"IMG",{src:!0,alt:!0,width:!0}),We=i(e),B=c(e,"SMALL",{"data-svelte-h":!0}),p(B)!=="svelte-w8g6gd"&&(B.innerHTML=Tt),Fe=i(e),X=c(e,"P",{"data-svelte-h":!0}),p(X)!=="svelte-1emlw2j"&&(X.innerHTML=$t),ke=i(e),u(Y.$$.fragment,e),ze=i(e),Q=c(e,"UL",{"data-svelte-h":!0}),p(Q)!=="svelte-35yril"&&(Q.innerHTML=vt),Ze=i(e),O=c(e,"P",{"data-svelte-h":!0}),p(O)!=="svelte-1biq3pv"&&(O.textContent=Mt),He=i(e),D=c(e,"UL",{"data-svelte-h":!0}),p(D)!=="svelte-5cm23e"&&(D.innerHTML=Nt),Ee=i(e),u(K.$$.fragment,e),Le=i(e),ee=c(e,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-nwqm6q"&&(ee.textContent=Ct),Ge=i(e),u(te.$$.fragment,e),Ae=i(e),oe=c(e,"UL",{"data-svelte-h":!0}),p(oe)!=="svelte-48ib1o"&&(oe.innerHTML=xt),Pe=i(e),ne=c(e,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-1xesile"&&(ne.textContent=jt),qe=i(e),u(ae.$$.fragment,e),Ve=i(e),M=c(e,"DIV",{class:!0});var J=he(M);u(se.$$.fragment,J),De=i(J),ue=c(J,"P",{"data-svelte-h":!0}),p(ue)!=="svelte-17zfc82"&&(ue.innerHTML=Jt),Ke=i(J),ge=c(J,"P",{"data-svelte-h":!0}),p(ge)!=="svelte-o55m63"&&(ge.innerHTML=It),et=i(J),u(H.$$.fragment,J),J.forEach(o),Se=i(e),u(re.$$.fragment,e),Re=i(e),j=c(e,"DIV",{class:!0});var k=he(j);u(ie.$$.fragment,k),tt=i(k),_e=c(k,"P",{"data-svelte-h":!0}),p(_e)!=="svelte-dglxjv"&&(_e.innerHTML=Ut),ot=i(k),C=c(k,"DIV",{class:!0});var I=he(C);u(le.$$.fragment,I),nt=i(I),be=c(I,"P",{"data-svelte-h":!0}),p(be)!=="svelte-h6wpuc"&&(be.innerHTML=Wt),at=i(I),u(E.$$.fragment,I),st=i(I),u(L.$$.fragment,I),I.forEach(o),k.forEach(o),Be=i(e),u(de.$$.fragment,e),Xe=i(e),N=c(e,"DIV",{class:!0});var U=he(N);u(ce.$$.fragment,U),rt=i(U),we=c(U,"P",{"data-svelte-h":!0}),p(we)!=="svelte-100sr6y"&&(we.textContent=Ft),it=i(U),ye=c(U,"P",{"data-svelte-h":!0}),p(ye)!=="svelte-68lg8f"&&(ye.innerHTML=kt),lt=i(U),x=c(U,"DIV",{class:!0});var W=he(x);u(me.$$.fragment,W),dt=i(W),Te=c(W,"P",{"data-svelte-h":!0}),p(Te)!=="svelte-84wq1o"&&(Te.innerHTML=zt),ct=i(W),u(G.$$.fragment,W),mt=i(W),u(A.$$.fragment,W),W.forEach(o),U.forEach(o),Ye=i(e),u(pe.$$.fragment,e),Qe=i(e),ve=c(e,"P",{}),he(ve).forEach(o),this.h()},h(){F(n,"name","hf:doc:metadata"),F(n,"content",Dt),F($,"class","flex flex-wrap space-x-1"),Et(Z.src,yt="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/neighborhood-attention-pattern.jpg")||F(Z,"src",yt),F(Z,"alt","drawing"),F(Z,"width","600"),F(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(N,"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){h(document.head,n),a(e,y,t),a(e,l,t),a(e,m,t),g(T,e,t),a(e,s,t),a(e,$,t),a(e,Ne,t),g(z,e,t),a(e,Ce,t),g(P,e,t),a(e,xe,t),a(e,q,t),a(e,je,t),a(e,V,t),a(e,Je,t),a(e,S,t),a(e,Ie,t),a(e,R,t),a(e,Ue,t),a(e,Z,t),a(e,We,t),a(e,B,t),a(e,Fe,t),a(e,X,t),a(e,ke,t),g(Y,e,t),a(e,ze,t),a(e,Q,t),a(e,Ze,t),a(e,O,t),a(e,He,t),a(e,D,t),a(e,Ee,t),g(K,e,t),a(e,Le,t),a(e,ee,t),a(e,Ge,t),g(te,e,t),a(e,Ae,t),a(e,oe,t),a(e,Pe,t),a(e,ne,t),a(e,qe,t),g(ae,e,t),a(e,Ve,t),a(e,M,t),g(se,M,null),h(M,De),h(M,ue),h(M,Ke),h(M,ge),h(M,et),g(H,M,null),a(e,Se,t),g(re,e,t),a(e,Re,t),a(e,j,t),g(ie,j,null),h(j,tt),h(j,_e),h(j,ot),h(j,C),g(le,C,null),h(C,nt),h(C,be),h(C,at),g(E,C,null),h(C,st),g(L,C,null),a(e,Be,t),g(de,e,t),a(e,Xe,t),a(e,N,t),g(ce,N,null),h(N,rt),h(N,we),h(N,it),h(N,ye),h(N,lt),h(N,x),g(me,x,null),h(x,dt),h(x,Te),h(x,ct),g(G,x,null),h(x,mt),g(A,x,null),a(e,Ye,t),g(pe,e,t),a(e,Qe,t),a(e,ve,t),Oe=!0},p(e,[t]){const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),z.$set(J);const k={};t&2&&(k.$$scope={dirty:t,ctx:e}),H.$set(k);const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),E.$set(I);const U={};t&2&&(U.$$scope={dirty:t,ctx:e}),L.$set(U);const W={};t&2&&(W.$$scope={dirty:t,ctx:e}),G.$set(W);const Zt={};t&2&&(Zt.$$scope={dirty:t,ctx:e}),A.$set(Zt)},i(e){Oe||(_(T.$$.fragment,e),_(z.$$.fragment,e),_(P.$$.fragment,e),_(Y.$$.fragment,e),_(K.$$.fragment,e),_(te.$$.fragment,e),_(ae.$$.fragment,e),_(se.$$.fragment,e),_(H.$$.fragment,e),_(re.$$.fragment,e),_(ie.$$.fragment,e),_(le.$$.fragment,e),_(E.$$.fragment,e),_(L.$$.fragment,e),_(de.$$.fragment,e),_(ce.$$.fragment,e),_(me.$$.fragment,e),_(G.$$.fragment,e),_(A.$$.fragment,e),_(pe.$$.fragment,e),Oe=!0)},o(e){b(T.$$.fragment,e),b(z.$$.fragment,e),b(P.$$.fragment,e),b(Y.$$.fragment,e),b(K.$$.fragment,e),b(te.$$.fragment,e),b(ae.$$.fragment,e),b(se.$$.fragment,e),b(H.$$.fragment,e),b(re.$$.fragment,e),b(ie.$$.fragment,e),b(le.$$.fragment,e),b(E.$$.fragment,e),b(L.$$.fragment,e),b(de.$$.fragment,e),b(ce.$$.fragment,e),b(me.$$.fragment,e),b(G.$$.fragment,e),b(A.$$.fragment,e),b(pe.$$.fragment,e),Oe=!1},d(e){e&&(o(y),o(l),o(m),o(s),o($),o(Ne),o(Ce),o(xe),o(q),o(je),o(V),o(Je),o(S),o(Ie),o(R),o(Ue),o(Z),o(We),o(B),o(Fe),o(X),o(ke),o(ze),o(Q),o(Ze),o(O),o(He),o(D),o(Ee),o(Le),o(ee),o(Ge),o(Ae),o(oe),o(Pe),o(ne),o(qe),o(Ve),o(M),o(Se),o(Re),o(j),o(Be),o(Xe),o(N),o(Ye),o(Qe),o(ve)),o(n),w(T,e),w(z,e),w(P,e),w(Y,e),w(K,e),w(te,e),w(ae,e),w(se),w(H),w(re,e),w(ie),w(le),w(E),w(L),w(de,e),w(ce),w(me),w(G),w(A),w(pe,e)}}}const Dt='{"title":"Neighborhood Attention Transformer","local":"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":"NatConfig","local":"transformers.NatConfig","sections":[],"depth":2},{"title":"NatModel","local":"transformers.NatModel","sections":[],"depth":2},{"title":"NatForImageClassification","local":"transformers.NatForImageClassification","sections":[],"depth":2}],"depth":1}';function Kt(v){return Lt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class co extends Gt{constructor(n){super(),At(this,n,Kt,Ot,Ht,{})}}export{co as component};
