import{s as Wt,f as Ut,o as Ft,n as ye}from"../chunks/scheduler.25b97de1.js";import{S as kt,i as zt,g as l,s as r,r as u,A as Zt,h as d,f as o,c as i,j as me,u as g,x as h,k as F,y as p,a as n,v as _,d as b,t as w,w as T}from"../chunks/index.d9030fc9.js";import{T as Jt}from"../chunks/Tip.baa67368.js";import{D as ve}from"../chunks/Docstring.ffac8efa.js";import{C as dt}from"../chunks/CodeBlock.e6cd0d95.js";import{E as lt}from"../chunks/ExampleCodeBlock.22dfe688.js";import{P as Et}from"../chunks/PipelineTag.5f100392.js";import{H as pe,E as Ht}from"../chunks/EditOnGithub.91d95064.js";function Gt(N){let a,v="Example:",c,m,f;return m=new dt({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(){a=l("p"),a.textContent=v,c=r(),u(m.$$.fragment)},l(s){a=d(s,"P",{"data-svelte-h":!0}),h(a)!=="svelte-11lpom8"&&(a.textContent=v),c=i(s),g(m.$$.fragment,s)},m(s,y){n(s,a,y),n(s,c,y),_(m,s,y),f=!0},p:ye,i(s){f||(b(m.$$.fragment,s),f=!0)},o(s){w(m.$$.fragment,s),f=!1},d(s){s&&(o(a),o(c)),T(m,s)}}}function At(N){let a,v=`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=v},l(c){a=d(c,"P",{"data-svelte-h":!0}),h(a)!=="svelte-fincs2"&&(a.innerHTML=v)},m(c,m){n(c,a,m)},p:ye,d(c){c&&o(a)}}}function Lt(N){let a,v="Example:",c,m,f;return m=new dt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyME5hdE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJzaGktbGFicyUyRm5hdC1taW5pLWluMWstMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwTmF0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnNoaS1sYWJzJTJGbmF0LW1pbmktaW4xay0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",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>)
<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(){a=l("p"),a.textContent=v,c=r(),u(m.$$.fragment)},l(s){a=d(s,"P",{"data-svelte-h":!0}),h(a)!=="svelte-11lpom8"&&(a.textContent=v),c=i(s),g(m.$$.fragment,s)},m(s,y){n(s,a,y),n(s,c,y),_(m,s,y),f=!0},p:ye,i(s){f||(b(m.$$.fragment,s),f=!0)},o(s){w(m.$$.fragment,s),f=!1},d(s){s&&(o(a),o(c)),T(m,s)}}}function qt(N){let a,v=`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=v},l(c){a=d(c,"P",{"data-svelte-h":!0}),h(a)!=="svelte-fincs2"&&(a.innerHTML=v)},m(c,m){n(c,a,m)},p:ye,d(c){c&&o(a)}}}function Pt(N){let a,v="Example:",c,m,f;return m=new dt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyME5hdEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMnNoaS1sYWJzJTJGbmF0LW1pbmktaW4xay0yMjQlMjIpJTBBbW9kZWwlMjAlM0QlMjBOYXRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJzaGktbGFicyUyRm5hdC1taW5pLWluMWstMjI0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",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>)
<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(){a=l("p"),a.textContent=v,c=r(),u(m.$$.fragment)},l(s){a=d(s,"P",{"data-svelte-h":!0}),h(a)!=="svelte-11lpom8"&&(a.textContent=v),c=i(s),g(m.$$.fragment,s)},m(s,y){n(s,a,y),n(s,c,y),_(m,s,y),f=!0},p:ye,i(s){f||(b(m.$$.fragment,s),f=!0)},o(s){w(m.$$.fragment,s),f=!1},d(s){s&&(o(a),o(c)),T(m,s)}}}function St(N){let a,v,c,m,f,s,y,$e,L,ct=`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.`,Me,q,mt="It is a hierarchical vision transformer based on Neighborhood Attention, a sliding-window self attention pattern.",Ne,P,pt="The abstract from the paper is the following:",Ce,S,ht=`<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>`,xe,z,ft,je,V,ut=`Neighborhood Attention compared to other attention patterns.
Taken from the <a href="https://arxiv.org/abs/2204.07143">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>.`,Je,R,We,Y,_t=`<li>One can use the <a href="/docs/transformers/v4.41.0/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>`,Ue,X,bt="Notes:",Fe,Q,wt=`<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>`,ke,O,ze,D,Tt="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with NAT.",Ze,K,Ee,ee,vt='<li><a href="/docs/transformers/v4.41.0/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>',He,te,yt="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.",Ge,oe,Ae,$,ne,Ye,he,$t=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.41.0/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.`,Xe,fe,Mt=`Configuration objects inherit from <a href="/docs/transformers/v4.41.0/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.41.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Qe,Z,Le,ae,qe,j,se,Oe,ue,Nt=`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.`,De,C,re,Ke,ge,Ct='The <a href="/docs/transformers/v4.41.0/en/model_doc/nat#transformers.NatModel">NatModel</a> forward method, overrides the <code>__call__</code> special method.',et,E,tt,H,Pe,ie,Se,M,le,ot,_e,xt=`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.`,nt,be,jt=`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/v4.41.0/en/model_doc/nat#transformers.NatForImageClassification">NatForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',rt,G,it,A,Ve,ce,Be,Te,Re;return f=new pe({props:{title:"Neighborhood Attention Transformer",local:"neighborhood-attention-transformer",headingTag:"h1"}}),y=new pe({props:{title:"Overview",local:"overview",headingTag:"h2"}}),R=new pe({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),O=new pe({props:{title:"Resources",local:"resources",headingTag:"h2"}}),K=new Et({props:{pipeline:"image-classification"}}),oe=new pe({props:{title:"NatConfig",local:"transformers.NatConfig",headingTag:"h2"}}),ne=new ve({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/v4.41.0/src/transformers/models/nat/configuration_nat.py#L25"}}),Z=new lt({props:{anchor:"transformers.NatConfig.example",$$slots:{default:[Gt]},$$scope:{ctx:N}}}),ae=new pe({props:{title:"NatModel",local:"transformers.NatModel",headingTag:"h2"}}),se=new ve({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/v4.41.0/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/v4.41.0/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.41.0/src/transformers/models/nat/modeling_nat.py#L667"}}),re=new ve({props:{name:"forward",anchor:"transformers.NatModel.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.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/v4.41.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.41.0/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__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/v4.41.0/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.41.0/src/transformers/models/nat/modeling_nat.py#L701",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.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/v4.41.0/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.nat.modeling_nat.NatModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),E=new Jt({props:{$$slots:{default:[At]},$$scope:{ctx:N}}}),H=new lt({props:{anchor:"transformers.NatModel.forward.example",$$slots:{default:[Lt]},$$scope:{ctx:N}}}),ie=new pe({props:{title:"NatForImageClassification",local:"transformers.NatForImageClassification",headingTag:"h2"}}),le=new ve({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/v4.41.0/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/v4.41.0/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.41.0/src/transformers/models/nat/modeling_nat.py#L756"}}),de=new ve({props:{name:"forward",anchor:"transformers.NatForImageClassification.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.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/v4.41.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.41.0/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__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/v4.41.0/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/v4.41.0/src/transformers/models/nat/modeling_nat.py#L780",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.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/v4.41.0/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.nat.modeling_nat.NatImageClassifierOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),G=new Jt({props:{$$slots:{default:[qt]},$$scope:{ctx:N}}}),A=new lt({props:{anchor:"transformers.NatForImageClassification.forward.example",$$slots:{default:[Pt]},$$scope:{ctx:N}}}),ce=new Ht({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/nat.md"}}),{c(){a=l("meta"),v=r(),c=l("p"),m=r(),u(f.$$.fragment),s=r(),u(y.$$.fragment),$e=r(),L=l("p"),L.innerHTML=ct,Me=r(),q=l("p"),q.textContent=mt,Ne=r(),P=l("p"),P.textContent=pt,Ce=r(),S=l("p"),S.innerHTML=ht,xe=r(),z=l("img"),je=r(),V=l("small"),V.innerHTML=ut,Ie=r(),B=l("p"),B.innerHTML=gt,Je=r(),u(R.$$.fragment),We=r(),Y=l("ul"),Y.innerHTML=_t,Ue=r(),X=l("p"),X.textContent=bt,Fe=r(),Q=l("ul"),Q.innerHTML=wt,ke=r(),u(O.$$.fragment),ze=r(),D=l("p"),D.textContent=Tt,Ze=r(),u(K.$$.fragment),Ee=r(),ee=l("ul"),ee.innerHTML=vt,He=r(),te=l("p"),te.textContent=yt,Ge=r(),u(oe.$$.fragment),Ae=r(),$=l("div"),u(ne.$$.fragment),Ye=r(),he=l("p"),he.innerHTML=$t,Xe=r(),fe=l("p"),fe.innerHTML=Mt,Qe=r(),u(Z.$$.fragment),Le=r(),u(ae.$$.fragment),qe=r(),j=l("div"),u(se.$$.fragment),Oe=r(),ue=l("p"),ue.innerHTML=Nt,De=r(),C=l("div"),u(re.$$.fragment),Ke=r(),ge=l("p"),ge.innerHTML=Ct,et=r(),u(E.$$.fragment),tt=r(),u(H.$$.fragment),Pe=r(),u(ie.$$.fragment),Se=r(),M=l("div"),u(le.$$.fragment),ot=r(),_e=l("p"),_e.textContent=xt,nt=r(),be=l("p"),be.innerHTML=jt,at=r(),x=l("div"),u(de.$$.fragment),st=r(),we=l("p"),we.innerHTML=It,rt=r(),u(G.$$.fragment),it=r(),u(A.$$.fragment),Ve=r(),u(ce.$$.fragment),Be=r(),Te=l("p"),this.h()},l(e){const t=Zt("svelte-u9bgzb",document.head);a=d(t,"META",{name:!0,content:!0}),t.forEach(o),v=i(e),c=d(e,"P",{}),me(c).forEach(o),m=i(e),g(f.$$.fragment,e),s=i(e),g(y.$$.fragment,e),$e=i(e),L=d(e,"P",{"data-svelte-h":!0}),h(L)!=="svelte-1c1uj9k"&&(L.innerHTML=ct),Me=i(e),q=d(e,"P",{"data-svelte-h":!0}),h(q)!=="svelte-1e8auh6"&&(q.textContent=mt),Ne=i(e),P=d(e,"P",{"data-svelte-h":!0}),h(P)!=="svelte-vfdo9a"&&(P.textContent=pt),Ce=i(e),S=d(e,"P",{"data-svelte-h":!0}),h(S)!=="svelte-7imk69"&&(S.innerHTML=ht),xe=i(e),z=d(e,"IMG",{src:!0,alt:!0,width:!0}),je=i(e),V=d(e,"SMALL",{"data-svelte-h":!0}),h(V)!=="svelte-w8g6gd"&&(V.innerHTML=ut),Ie=i(e),B=d(e,"P",{"data-svelte-h":!0}),h(B)!=="svelte-1emlw2j"&&(B.innerHTML=gt),Je=i(e),g(R.$$.fragment,e),We=i(e),Y=d(e,"UL",{"data-svelte-h":!0}),h(Y)!=="svelte-1sr6kt1"&&(Y.innerHTML=_t),Ue=i(e),X=d(e,"P",{"data-svelte-h":!0}),h(X)!=="svelte-1biq3pv"&&(X.textContent=bt),Fe=i(e),Q=d(e,"UL",{"data-svelte-h":!0}),h(Q)!=="svelte-5cm23e"&&(Q.innerHTML=wt),ke=i(e),g(O.$$.fragment,e),ze=i(e),D=d(e,"P",{"data-svelte-h":!0}),h(D)!=="svelte-nwqm6q"&&(D.textContent=Tt),Ze=i(e),g(K.$$.fragment,e),Ee=i(e),ee=d(e,"UL",{"data-svelte-h":!0}),h(ee)!=="svelte-10c0w6u"&&(ee.innerHTML=vt),He=i(e),te=d(e,"P",{"data-svelte-h":!0}),h(te)!=="svelte-1xesile"&&(te.textContent=yt),Ge=i(e),g(oe.$$.fragment,e),Ae=i(e),$=d(e,"DIV",{class:!0});var I=me($);g(ne.$$.fragment,I),Ye=i(I),he=d(I,"P",{"data-svelte-h":!0}),h(he)!=="svelte-5hyw44"&&(he.innerHTML=$t),Xe=i(I),fe=d(I,"P",{"data-svelte-h":!0}),h(fe)!=="svelte-1j16s4x"&&(fe.innerHTML=Mt),Qe=i(I),g(Z.$$.fragment,I),I.forEach(o),Le=i(e),g(ae.$$.fragment,e),qe=i(e),j=d(e,"DIV",{class:!0});var k=me(j);g(se.$$.fragment,k),Oe=i(k),ue=d(k,"P",{"data-svelte-h":!0}),h(ue)!=="svelte-dglxjv"&&(ue.innerHTML=Nt),De=i(k),C=d(k,"DIV",{class:!0});var J=me(C);g(re.$$.fragment,J),Ke=i(J),ge=d(J,"P",{"data-svelte-h":!0}),h(ge)!=="svelte-11f87fg"&&(ge.innerHTML=Ct),et=i(J),g(E.$$.fragment,J),tt=i(J),g(H.$$.fragment,J),J.forEach(o),k.forEach(o),Pe=i(e),g(ie.$$.fragment,e),Se=i(e),M=d(e,"DIV",{class:!0});var W=me(M);g(le.$$.fragment,W),ot=i(W),_e=d(W,"P",{"data-svelte-h":!0}),h(_e)!=="svelte-100sr6y"&&(_e.textContent=xt),nt=i(W),be=d(W,"P",{"data-svelte-h":!0}),h(be)!=="svelte-68lg8f"&&(be.innerHTML=jt),at=i(W),x=d(W,"DIV",{class:!0});var U=me(x);g(de.$$.fragment,U),st=i(U),we=d(U,"P",{"data-svelte-h":!0}),h(we)!=="svelte-7lgq2s"&&(we.innerHTML=It),rt=i(U),g(G.$$.fragment,U),it=i(U),g(A.$$.fragment,U),U.forEach(o),W.forEach(o),Ve=i(e),g(ce.$$.fragment,e),Be=i(e),Te=d(e,"P",{}),me(Te).forEach(o),this.h()},h(){F(a,"name","hf:doc:metadata"),F(a,"content",Vt),Ut(z.src,ft="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/neighborhood-attention-pattern.jpg")||F(z,"src",ft),F(z,"alt","drawing"),F(z,"width","600"),F($,"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(M,"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),n(e,v,t),n(e,c,t),n(e,m,t),_(f,e,t),n(e,s,t),_(y,e,t),n(e,$e,t),n(e,L,t),n(e,Me,t),n(e,q,t),n(e,Ne,t),n(e,P,t),n(e,Ce,t),n(e,S,t),n(e,xe,t),n(e,z,t),n(e,je,t),n(e,V,t),n(e,Ie,t),n(e,B,t),n(e,Je,t),_(R,e,t),n(e,We,t),n(e,Y,t),n(e,Ue,t),n(e,X,t),n(e,Fe,t),n(e,Q,t),n(e,ke,t),_(O,e,t),n(e,ze,t),n(e,D,t),n(e,Ze,t),_(K,e,t),n(e,Ee,t),n(e,ee,t),n(e,He,t),n(e,te,t),n(e,Ge,t),_(oe,e,t),n(e,Ae,t),n(e,$,t),_(ne,$,null),p($,Ye),p($,he),p($,Xe),p($,fe),p($,Qe),_(Z,$,null),n(e,Le,t),_(ae,e,t),n(e,qe,t),n(e,j,t),_(se,j,null),p(j,Oe),p(j,ue),p(j,De),p(j,C),_(re,C,null),p(C,Ke),p(C,ge),p(C,et),_(E,C,null),p(C,tt),_(H,C,null),n(e,Pe,t),_(ie,e,t),n(e,Se,t),n(e,M,t),_(le,M,null),p(M,ot),p(M,_e),p(M,nt),p(M,be),p(M,at),p(M,x),_(de,x,null),p(x,st),p(x,we),p(x,rt),_(G,x,null),p(x,it),_(A,x,null),n(e,Ve,t),_(ce,e,t),n(e,Be,t),n(e,Te,t),Re=!0},p(e,[t]){const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),Z.$set(I);const k={};t&2&&(k.$$scope={dirty:t,ctx:e}),E.$set(k);const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),H.$set(J);const W={};t&2&&(W.$$scope={dirty:t,ctx:e}),G.$set(W);const U={};t&2&&(U.$$scope={dirty:t,ctx:e}),A.$set(U)},i(e){Re||(b(f.$$.fragment,e),b(y.$$.fragment,e),b(R.$$.fragment,e),b(O.$$.fragment,e),b(K.$$.fragment,e),b(oe.$$.fragment,e),b(ne.$$.fragment,e),b(Z.$$.fragment,e),b(ae.$$.fragment,e),b(se.$$.fragment,e),b(re.$$.fragment,e),b(E.$$.fragment,e),b(H.$$.fragment,e),b(ie.$$.fragment,e),b(le.$$.fragment,e),b(de.$$.fragment,e),b(G.$$.fragment,e),b(A.$$.fragment,e),b(ce.$$.fragment,e),Re=!0)},o(e){w(f.$$.fragment,e),w(y.$$.fragment,e),w(R.$$.fragment,e),w(O.$$.fragment,e),w(K.$$.fragment,e),w(oe.$$.fragment,e),w(ne.$$.fragment,e),w(Z.$$.fragment,e),w(ae.$$.fragment,e),w(se.$$.fragment,e),w(re.$$.fragment,e),w(E.$$.fragment,e),w(H.$$.fragment,e),w(ie.$$.fragment,e),w(le.$$.fragment,e),w(de.$$.fragment,e),w(G.$$.fragment,e),w(A.$$.fragment,e),w(ce.$$.fragment,e),Re=!1},d(e){e&&(o(v),o(c),o(m),o(s),o($e),o(L),o(Me),o(q),o(Ne),o(P),o(Ce),o(S),o(xe),o(z),o(je),o(V),o(Ie),o(B),o(Je),o(We),o(Y),o(Ue),o(X),o(Fe),o(Q),o(ke),o(ze),o(D),o(Ze),o(Ee),o(ee),o(He),o(te),o(Ge),o(Ae),o($),o(Le),o(qe),o(j),o(Pe),o(Se),o(M),o(Ve),o(Be),o(Te)),o(a),T(f,e),T(y,e),T(R,e),T(O,e),T(K,e),T(oe,e),T(ne),T(Z),T(ae,e),T(se),T(re),T(E),T(H),T(ie,e),T(le),T(de),T(G),T(A),T(ce,e)}}}const Vt='{"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 Bt(N){return Ft(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class to extends kt{constructor(a){super(),zt(this,a,Bt,St,Wt,{})}}export{to as component};
