import{S as bs,i as ws,s as $s,e as o,k as m,w,t as r,M as ys,c as s,d as a,m as h,a as n,x as $,h as i,b as c,N as Vs,G as t,g as f,y,q as V,o as A,B as C,v as As,L as Eo}from"../../chunks/vendor-hf-doc-builder.js";import{T as vs}from"../../chunks/Tip-hf-doc-builder.js";import{D as bt}from"../../chunks/Docstring-hf-doc-builder.js";import{C as xo}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as tt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Co}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as Cs}from"../../chunks/PipelineTag-hf-doc-builder.js";function Es(T){let p,b,_,u,v;return u=new xo({props:{code:`from transformers import VanModel, VanConfig

# Initializing a VAN van-base style configuration
configuration = VanConfig()
# Initializing a model from the van-base style configuration
model = VanModel(configuration)
# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VanModel, VanConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a VAN van-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = VanConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the van-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VanModel(configuration)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){p=o("p"),b=r("Example:"),_=m(),w(u.$$.fragment)},l(l){p=s(l,"P",{});var g=n(p);b=i(g,"Example:"),g.forEach(a),_=h(l),$(u.$$.fragment,l)},m(l,g){f(l,p,g),t(p,b),f(l,_,g),y(u,l,g),v=!0},p:Eo,i(l){v||(V(u.$$.fragment,l),v=!0)},o(l){A(u.$$.fragment,l),v=!1},d(l){l&&a(p),l&&a(_),C(u,l)}}}function xs(T){let p,b,_,u,v;return{c(){p=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=o("code"),u=r("Module"),v=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){p=s(l,"P",{});var g=n(p);b=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(g,"CODE",{});var N=n(_);u=i(N,"Module"),N.forEach(a),v=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(a)},m(l,g){f(l,p,g),t(p,b),t(p,_),t(_,u),t(p,v)},d(l){l&&a(p)}}}function Ts(T){let p,b,_,u,v;return u=new xo({props:{code:`from transformers import AutoImageProcessor, VanModel
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

image_processor = AutoImageProcessor.from_pretrained("Visual-Attention-Network/van-base")
model = VanModel.from_pretrained("Visual-Attention-Network/van-base")

inputs = image_processor(image, return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, VanModel
<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;Visual-Attention-Network/van-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VanModel.from_pretrained(<span class="hljs-string">&quot;Visual-Attention-Network/van-base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">512</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`}}),{c(){p=o("p"),b=r("Example:"),_=m(),w(u.$$.fragment)},l(l){p=s(l,"P",{});var g=n(p);b=i(g,"Example:"),g.forEach(a),_=h(l),$(u.$$.fragment,l)},m(l,g){f(l,p,g),t(p,b),f(l,_,g),y(u,l,g),v=!0},p:Eo,i(l){v||(V(u.$$.fragment,l),v=!0)},o(l){A(u.$$.fragment,l),v=!1},d(l){l&&a(p),l&&a(_),C(u,l)}}}function ks(T){let p,b,_,u,v;return{c(){p=o("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=o("code"),u=r("Module"),v=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){p=s(l,"P",{});var g=n(p);b=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(g,"CODE",{});var N=n(_);u=i(N,"Module"),N.forEach(a),v=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(a)},m(l,g){f(l,p,g),t(p,b),t(p,_),t(_,u),t(p,v)},d(l){l&&a(p)}}}function Ps(T){let p,b,_,u,v;return u=new xo({props:{code:`from transformers import AutoImageProcessor, VanForImageClassification
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

image_processor = AutoImageProcessor.from_pretrained("Visual-Attention-Network/van-base")
model = VanForImageClassification.from_pretrained("Visual-Attention-Network/van-base")

inputs = image_processor(image, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# model predicts one of the 1000 ImageNet classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, VanForImageClassification
<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;Visual-Attention-Network/van-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VanForImageClassification.from_pretrained(<span class="hljs-string">&quot;Visual-Attention-Network/van-base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`}}),{c(){p=o("p"),b=r("Example:"),_=m(),w(u.$$.fragment)},l(l){p=s(l,"P",{});var g=n(p);b=i(g,"Example:"),g.forEach(a),_=h(l),$(u.$$.fragment,l)},m(l,g){f(l,p,g),t(p,b),f(l,_,g),y(u,l,g),v=!0},p:Eo,i(l){v||(V(u.$$.fragment,l),v=!0)},o(l){A(u.$$.fragment,l),v=!1},d(l){l&&a(p),l&&a(_),C(u,l)}}}function Ns(T){let p,b,_,u,v,l,g,N,Xt,wt,F,R,at,re,Yt,ot,ea,$t,U,ta,ie,aa,oa,yt,Fe,sa,Vt,qe,na,At,ze,le,ra,ce,ia,la,Ct,Le,ca,Et,De,de,da,st,fa,pa,xt,B,ma,fe,ha,ua,Tt,pe,To,kt,j,ga,me,_a,va,he,ba,wa,Pt,q,G,nt,ue,$a,rt,ya,Nt,Oe,Va,It,ge,jt,Se,M,He,Aa,Ca,_e,Ea,xa,ve,Ta,ka,Mt,We,Pa,Ft,z,K,it,be,Na,lt,Ia,qt,E,we,ja,L,Ma,Re,Fa,qa,$e,za,La,Da,D,Oa,Ue,Sa,Ha,Be,Wa,Ra,Ua,Z,zt,O,J,ct,ye,Ba,dt,Ga,Lt,I,Ve,Ka,Ae,Za,Ce,Ja,Qa,Xa,k,Ee,Ya,S,eo,Ge,to,ao,ft,oo,so,no,Q,ro,X,Dt,H,Y,pt,xe,io,mt,lo,Ot,x,Te,co,ht,fo,po,ke,mo,Pe,ho,uo,go,P,Ne,_o,W,vo,Ke,bo,wo,ut,$o,yo,Vo,ee,Ao,te,St;return l=new tt({}),re=new tt({}),ue=new tt({}),ge=new Cs({props:{pipeline:"image-classification"}}),be=new tt({}),we=new bt({props:{name:"class transformers.VanConfig",anchor:"transformers.VanConfig",parameters:[{name:"image_size",val:" = 224"},{name:"num_channels",val:" = 3"},{name:"patch_sizes",val:" = [7, 3, 3, 3]"},{name:"strides",val:" = [4, 2, 2, 2]"},{name:"hidden_sizes",val:" = [64, 128, 320, 512]"},{name:"depths",val:" = [3, 3, 12, 3]"},{name:"mlp_ratios",val:" = [8, 8, 4, 4]"},{name:"hidden_act",val:" = 'gelu'"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"layer_scale_init_value",val:" = 0.01"},{name:"drop_path_rate",val:" = 0.0"},{name:"dropout_rate",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VanConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.VanConfig.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.VanConfig.patch_sizes",description:`<strong>patch_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[7, 3, 3, 3]</code>) &#x2014;
Patch size to use in each stage&#x2019;s embedding layer.`,name:"patch_sizes"},{anchor:"transformers.VanConfig.strides",description:`<strong>strides</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 2, 2, 2]</code>) &#x2014;
Stride size to use in each stage&#x2019;s embedding layer to downsample the input.`,name:"strides"},{anchor:"transformers.VanConfig.hidden_sizes",description:`<strong>hidden_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[64, 128, 320, 512]</code>) &#x2014;
Dimensionality (hidden size) at each stage.`,name:"hidden_sizes"},{anchor:"transformers.VanConfig.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 3, 12, 3]</code>) &#x2014;
Depth (number of layers) for each stage.`,name:"depths"},{anchor:"transformers.VanConfig.mlp_ratios",description:`<strong>mlp_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[8, 8, 4, 4]</code>) &#x2014;
The expansion ratio for mlp layer at each stage.`,name:"mlp_ratios"},{anchor:"transformers.VanConfig.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 each layer. 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.VanConfig.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.VanConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.VanConfig.layer_scale_init_value",description:`<strong>layer_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-2) &#x2014;
The initial value for layer scaling.`,name:"layer_scale_init_value"},{anchor:"transformers.VanConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for stochastic depth.`,name:"drop_path_rate"},{anchor:"transformers.VanConfig.dropout_rate",description:`<strong>dropout_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for dropout.`,name:"dropout_rate"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/van/configuration_van.py#L30"}}),Z=new Co({props:{anchor:"transformers.VanConfig.example",$$slots:{default:[Es]},$$scope:{ctx:T}}}),ye=new tt({}),Ve=new bt({props:{name:"class transformers.VanModel",anchor:"transformers.VanModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.VanModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/van#transformers.VanConfig">VanConfig</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/van/modeling_van.py#L425"}}),Ee=new bt({props:{name:"forward",anchor:"transformers.VanModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor]"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.VanModel.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/poolformer#transformers.PoolFormerFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.VanModel.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 stages. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.VanModel.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/van/modeling_van.py#L435",returnDescription:`
<p>A <code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</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/van#transformers.VanConfig"
>VanConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) \u2014 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>) \u2014 Last layer hidden-state after a pooling operation on the spatial dimensions.</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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, num_channels, height, width)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Q=new vs({props:{$$slots:{default:[xs]},$$scope:{ctx:T}}}),X=new Co({props:{anchor:"transformers.VanModel.forward.example",$$slots:{default:[Ts]},$$scope:{ctx:T}}}),xe=new tt({}),Te=new bt({props:{name:"class transformers.VanForImageClassification",anchor:"transformers.VanForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.VanForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/van#transformers.VanConfig">VanConfig</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/van/modeling_van.py#L480"}}),Ne=new bt({props:{name:"forward",anchor:"transformers.VanForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.VanForImageClassification.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/poolformer#transformers.PoolFormerFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.VanForImageClassification.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 stages. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.VanForImageClassification.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.VanForImageClassification.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/van/modeling_van.py#L492",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/van#transformers.VanConfig"
>VanConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</li>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</li>
<li><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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each stage) of shape <code>(batch_size, num_channels, height, width)</code>. Hidden-states (also
called feature maps) of the model at the output of each stage.</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ee=new vs({props:{$$slots:{default:[ks]},$$scope:{ctx:T}}}),te=new Co({props:{anchor:"transformers.VanForImageClassification.forward.example",$$slots:{default:[Ps]},$$scope:{ctx:T}}}),{c(){p=o("meta"),b=m(),_=o("h1"),u=o("a"),v=o("span"),w(l.$$.fragment),g=m(),N=o("span"),Xt=r("VAN"),wt=m(),F=o("h2"),R=o("a"),at=o("span"),w(re.$$.fragment),Yt=m(),ot=o("span"),ea=r("Overview"),$t=m(),U=o("p"),ta=r("The VAN model was proposed in "),ie=o("a"),aa=r("Visual Attention Network"),oa=r(" by Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu."),yt=m(),Fe=o("p"),sa=r("This paper introduces a new attention layer based on convolution operations able to capture both local and distant relationships. This is done by combining normal and large kernel convolution layers. The latter uses a dilated convolution to capture distant correlations."),Vt=m(),qe=o("p"),na=r("The abstract from the paper is the following:"),At=m(),ze=o("p"),le=o("em"),ra=r("While originally designed for natural language processing tasks, the self-attention mechanism has recently taken various computer vision areas by storm. However, the 2D nature of images brings three challenges for applying self-attention in computer vision. (1) Treating images as 1D sequences neglects their 2D structures. (2) The quadratic complexity is too expensive for high-resolution images. (3) It only captures spatial adaptability but ignores channel adaptability. In this paper, we propose a novel large kernel attention (LKA) module to enable self-adaptive and long-range correlations in self-attention while avoiding the above issues. We further introduce a novel neural network based on LKA, namely Visual Attention Network (VAN). While extremely simple, VAN outperforms the state-of-the-art vision transformers and convolutional neural networks with a large margin in extensive experiments, including image classification, object detection, semantic segmentation, instance segmentation, etc. Code is available at "),ce=o("a"),ia=r("this https URL"),la=r("."),Ct=m(),Le=o("p"),ca=r("Tips:"),Et=m(),De=o("ul"),de=o("li"),da=r("VAN does not have an embedding layer, thus the "),st=o("code"),fa=r("hidden_states"),pa=r(" will have a length equal to the number of stages."),xt=m(),B=o("p"),ma=r("The figure below illustrates the architecture of a Visual Aattention Layer. Taken from the "),fe=o("a"),ha=r("original paper"),ua=r("."),Tt=m(),pe=o("img"),kt=m(),j=o("p"),ga=r("This model was contributed by "),me=o("a"),_a=r("Francesco"),va=r(". The original code can be found "),he=o("a"),ba=r("here"),wa=r("."),Pt=m(),q=o("h2"),G=o("a"),nt=o("span"),w(ue.$$.fragment),$a=m(),rt=o("span"),ya=r("Resources"),Nt=m(),Oe=o("p"),Va=r("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with VAN."),It=m(),w(ge.$$.fragment),jt=m(),Se=o("ul"),M=o("li"),He=o("a"),Aa=r("VanForImageClassification"),Ca=r(" is supported by this "),_e=o("a"),Ea=r("example script"),xa=r(" and "),ve=o("a"),Ta=r("notebook"),ka=r("."),Mt=m(),We=o("p"),Pa=r("If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Ft=m(),z=o("h2"),K=o("a"),it=o("span"),w(be.$$.fragment),Na=m(),lt=o("span"),Ia=r("VanConfig"),qt=m(),E=o("div"),w(we.$$.fragment),ja=m(),L=o("p"),Ma=r("This is the configuration class to store the configuration of a "),Re=o("a"),Fa=r("VanModel"),qa=r(`. It is used to instantiate a VAN 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 VAN
`),$e=o("a"),za=r("Visual-Attention-Network/van-base"),La=r(" architecture."),Da=m(),D=o("p"),Oa=r("Configuration objects inherit from "),Ue=o("a"),Sa=r("PretrainedConfig"),Ha=r(` and can be used to control the model outputs. Read the
documentation from `),Be=o("a"),Wa=r("PretrainedConfig"),Ra=r(" for more information."),Ua=m(),w(Z.$$.fragment),zt=m(),O=o("h2"),J=o("a"),ct=o("span"),w(ye.$$.fragment),Ba=m(),dt=o("span"),Ga=r("VanModel"),Lt=m(),I=o("div"),w(Ve.$$.fragment),Ka=m(),Ae=o("p"),Za=r(`The bare VAN model outputting raw features without any specific head on top. Note, VAN does not have an embedding layer.
This model is a PyTorch `),Ce=o("a"),Ja=r("torch.nn.Module"),Qa=r(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Xa=m(),k=o("div"),w(Ee.$$.fragment),Ya=m(),S=o("p"),eo=r("The "),Ge=o("a"),to=r("VanModel"),ao=r(" forward method, overrides the "),ft=o("code"),oo=r("__call__"),so=r(" special method."),no=m(),w(Q.$$.fragment),ro=m(),w(X.$$.fragment),Dt=m(),H=o("h2"),Y=o("a"),pt=o("span"),w(xe.$$.fragment),io=m(),mt=o("span"),lo=r("VanForImageClassification"),Ot=m(),x=o("div"),w(Te.$$.fragment),co=m(),ht=o("p"),fo=r(`VAN Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),po=m(),ke=o("p"),mo=r("This model is a PyTorch "),Pe=o("a"),ho=r("torch.nn.Module"),uo=r(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),go=m(),P=o("div"),w(Ne.$$.fragment),_o=m(),W=o("p"),vo=r("The "),Ke=o("a"),bo=r("VanForImageClassification"),wo=r(" forward method, overrides the "),ut=o("code"),$o=r("__call__"),yo=r(" special method."),Vo=m(),w(ee.$$.fragment),Ao=m(),w(te.$$.fragment),this.h()},l(e){const d=ys('[data-svelte="svelte-1phssyn"]',document.head);p=s(d,"META",{name:!0,content:!0}),d.forEach(a),b=h(e),_=s(e,"H1",{class:!0});var Ie=n(_);u=s(Ie,"A",{id:!0,class:!0,href:!0});var gt=n(u);v=s(gt,"SPAN",{});var _t=n(v);$(l.$$.fragment,_t),_t.forEach(a),gt.forEach(a),g=h(Ie),N=s(Ie,"SPAN",{});var vt=n(N);Xt=i(vt,"VAN"),vt.forEach(a),Ie.forEach(a),wt=h(e),F=s(e,"H2",{class:!0});var je=n(F);R=s(je,"A",{id:!0,class:!0,href:!0});var ko=n(R);at=s(ko,"SPAN",{});var Po=n(at);$(re.$$.fragment,Po),Po.forEach(a),ko.forEach(a),Yt=h(je),ot=s(je,"SPAN",{});var No=n(ot);ea=i(No,"Overview"),No.forEach(a),je.forEach(a),$t=h(e),U=s(e,"P",{});var Ht=n(U);ta=i(Ht,"The VAN model was proposed in "),ie=s(Ht,"A",{href:!0,rel:!0});var Io=n(ie);aa=i(Io,"Visual Attention Network"),Io.forEach(a),oa=i(Ht," by Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu."),Ht.forEach(a),yt=h(e),Fe=s(e,"P",{});var jo=n(Fe);sa=i(jo,"This paper introduces a new attention layer based on convolution operations able to capture both local and distant relationships. This is done by combining normal and large kernel convolution layers. The latter uses a dilated convolution to capture distant correlations."),jo.forEach(a),Vt=h(e),qe=s(e,"P",{});var Mo=n(qe);na=i(Mo,"The abstract from the paper is the following:"),Mo.forEach(a),At=h(e),ze=s(e,"P",{});var Fo=n(ze);le=s(Fo,"EM",{});var Wt=n(le);ra=i(Wt,"While originally designed for natural language processing tasks, the self-attention mechanism has recently taken various computer vision areas by storm. However, the 2D nature of images brings three challenges for applying self-attention in computer vision. (1) Treating images as 1D sequences neglects their 2D structures. (2) The quadratic complexity is too expensive for high-resolution images. (3) It only captures spatial adaptability but ignores channel adaptability. In this paper, we propose a novel large kernel attention (LKA) module to enable self-adaptive and long-range correlations in self-attention while avoiding the above issues. We further introduce a novel neural network based on LKA, namely Visual Attention Network (VAN). While extremely simple, VAN outperforms the state-of-the-art vision transformers and convolutional neural networks with a large margin in extensive experiments, including image classification, object detection, semantic segmentation, instance segmentation, etc. Code is available at "),ce=s(Wt,"A",{href:!0,rel:!0});var qo=n(ce);ia=i(qo,"this https URL"),qo.forEach(a),la=i(Wt,"."),Wt.forEach(a),Fo.forEach(a),Ct=h(e),Le=s(e,"P",{});var zo=n(Le);ca=i(zo,"Tips:"),zo.forEach(a),Et=h(e),De=s(e,"UL",{});var Lo=n(De);de=s(Lo,"LI",{});var Rt=n(de);da=i(Rt,"VAN does not have an embedding layer, thus the "),st=s(Rt,"CODE",{});var Do=n(st);fa=i(Do,"hidden_states"),Do.forEach(a),pa=i(Rt," will have a length equal to the number of stages."),Rt.forEach(a),Lo.forEach(a),xt=h(e),B=s(e,"P",{});var Ut=n(B);ma=i(Ut,"The figure below illustrates the architecture of a Visual Aattention Layer. Taken from the "),fe=s(Ut,"A",{href:!0,rel:!0});var Oo=n(fe);ha=i(Oo,"original paper"),Oo.forEach(a),ua=i(Ut,"."),Ut.forEach(a),Tt=h(e),pe=s(e,"IMG",{width:!0,src:!0}),kt=h(e),j=s(e,"P",{});var Ze=n(j);ga=i(Ze,"This model was contributed by "),me=s(Ze,"A",{href:!0,rel:!0});var So=n(me);_a=i(So,"Francesco"),So.forEach(a),va=i(Ze,". The original code can be found "),he=s(Ze,"A",{href:!0,rel:!0});var Ho=n(he);ba=i(Ho,"here"),Ho.forEach(a),wa=i(Ze,"."),Ze.forEach(a),Pt=h(e),q=s(e,"H2",{class:!0});var Bt=n(q);G=s(Bt,"A",{id:!0,class:!0,href:!0});var Wo=n(G);nt=s(Wo,"SPAN",{});var Ro=n(nt);$(ue.$$.fragment,Ro),Ro.forEach(a),Wo.forEach(a),$a=h(Bt),rt=s(Bt,"SPAN",{});var Uo=n(rt);ya=i(Uo,"Resources"),Uo.forEach(a),Bt.forEach(a),Nt=h(e),Oe=s(e,"P",{});var Bo=n(Oe);Va=i(Bo,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with VAN."),Bo.forEach(a),It=h(e),$(ge.$$.fragment,e),jt=h(e),Se=s(e,"UL",{});var Go=n(Se);M=s(Go,"LI",{});var Me=n(M);He=s(Me,"A",{href:!0});var Ko=n(He);Aa=i(Ko,"VanForImageClassification"),Ko.forEach(a),Ca=i(Me," is supported by this "),_e=s(Me,"A",{href:!0,rel:!0});var Zo=n(_e);Ea=i(Zo,"example script"),Zo.forEach(a),xa=i(Me," and "),ve=s(Me,"A",{href:!0,rel:!0});var Jo=n(ve);Ta=i(Jo,"notebook"),Jo.forEach(a),ka=i(Me,"."),Me.forEach(a),Go.forEach(a),Mt=h(e),We=s(e,"P",{});var Qo=n(We);Pa=i(Qo,"If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Qo.forEach(a),Ft=h(e),z=s(e,"H2",{class:!0});var Gt=n(z);K=s(Gt,"A",{id:!0,class:!0,href:!0});var Xo=n(K);it=s(Xo,"SPAN",{});var Yo=n(it);$(be.$$.fragment,Yo),Yo.forEach(a),Xo.forEach(a),Na=h(Gt),lt=s(Gt,"SPAN",{});var es=n(lt);Ia=i(es,"VanConfig"),es.forEach(a),Gt.forEach(a),qt=h(e),E=s(e,"DIV",{class:!0});var ae=n(E);$(we.$$.fragment,ae),ja=h(ae),L=s(ae,"P",{});var Je=n(L);Ma=i(Je,"This is the configuration class to store the configuration of a "),Re=s(Je,"A",{href:!0});var ts=n(Re);Fa=i(ts,"VanModel"),ts.forEach(a),qa=i(Je,`. It is used to instantiate a VAN 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 VAN
`),$e=s(Je,"A",{href:!0,rel:!0});var as=n($e);za=i(as,"Visual-Attention-Network/van-base"),as.forEach(a),La=i(Je," architecture."),Je.forEach(a),Da=h(ae),D=s(ae,"P",{});var Qe=n(D);Oa=i(Qe,"Configuration objects inherit from "),Ue=s(Qe,"A",{href:!0});var os=n(Ue);Sa=i(os,"PretrainedConfig"),os.forEach(a),Ha=i(Qe,` and can be used to control the model outputs. Read the
documentation from `),Be=s(Qe,"A",{href:!0});var ss=n(Be);Wa=i(ss,"PretrainedConfig"),ss.forEach(a),Ra=i(Qe," for more information."),Qe.forEach(a),Ua=h(ae),$(Z.$$.fragment,ae),ae.forEach(a),zt=h(e),O=s(e,"H2",{class:!0});var Kt=n(O);J=s(Kt,"A",{id:!0,class:!0,href:!0});var ns=n(J);ct=s(ns,"SPAN",{});var rs=n(ct);$(ye.$$.fragment,rs),rs.forEach(a),ns.forEach(a),Ba=h(Kt),dt=s(Kt,"SPAN",{});var is=n(dt);Ga=i(is,"VanModel"),is.forEach(a),Kt.forEach(a),Lt=h(e),I=s(e,"DIV",{class:!0});var Xe=n(I);$(Ve.$$.fragment,Xe),Ka=h(Xe),Ae=s(Xe,"P",{});var Zt=n(Ae);Za=i(Zt,`The bare VAN model outputting raw features without any specific head on top. Note, VAN does not have an embedding layer.
This model is a PyTorch `),Ce=s(Zt,"A",{href:!0,rel:!0});var ls=n(Ce);Ja=i(ls,"torch.nn.Module"),ls.forEach(a),Qa=i(Zt,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Zt.forEach(a),Xa=h(Xe),k=s(Xe,"DIV",{class:!0});var oe=n(k);$(Ee.$$.fragment,oe),Ya=h(oe),S=s(oe,"P",{});var Ye=n(S);eo=i(Ye,"The "),Ge=s(Ye,"A",{href:!0});var cs=n(Ge);to=i(cs,"VanModel"),cs.forEach(a),ao=i(Ye," forward method, overrides the "),ft=s(Ye,"CODE",{});var ds=n(ft);oo=i(ds,"__call__"),ds.forEach(a),so=i(Ye," special method."),Ye.forEach(a),no=h(oe),$(Q.$$.fragment,oe),ro=h(oe),$(X.$$.fragment,oe),oe.forEach(a),Xe.forEach(a),Dt=h(e),H=s(e,"H2",{class:!0});var Jt=n(H);Y=s(Jt,"A",{id:!0,class:!0,href:!0});var fs=n(Y);pt=s(fs,"SPAN",{});var ps=n(pt);$(xe.$$.fragment,ps),ps.forEach(a),fs.forEach(a),io=h(Jt),mt=s(Jt,"SPAN",{});var ms=n(mt);lo=i(ms,"VanForImageClassification"),ms.forEach(a),Jt.forEach(a),Ot=h(e),x=s(e,"DIV",{class:!0});var se=n(x);$(Te.$$.fragment,se),co=h(se),ht=s(se,"P",{});var hs=n(ht);fo=i(hs,`VAN Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),hs.forEach(a),po=h(se),ke=s(se,"P",{});var Qt=n(ke);mo=i(Qt,"This model is a PyTorch "),Pe=s(Qt,"A",{href:!0,rel:!0});var us=n(Pe);ho=i(us,"torch.nn.Module"),us.forEach(a),uo=i(Qt,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Qt.forEach(a),go=h(se),P=s(se,"DIV",{class:!0});var ne=n(P);$(Ne.$$.fragment,ne),_o=h(ne),W=s(ne,"P",{});var et=n(W);vo=i(et,"The "),Ke=s(et,"A",{href:!0});var gs=n(Ke);bo=i(gs,"VanForImageClassification"),gs.forEach(a),wo=i(et," forward method, overrides the "),ut=s(et,"CODE",{});var _s=n(ut);$o=i(_s,"__call__"),_s.forEach(a),yo=i(et," special method."),et.forEach(a),Vo=h(ne),$(ee.$$.fragment,ne),Ao=h(ne),$(te.$$.fragment,ne),ne.forEach(a),se.forEach(a),this.h()},h(){c(p,"name","hf:doc:metadata"),c(p,"content",JSON.stringify(Is)),c(u,"id","van"),c(u,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(u,"href","#van"),c(_,"class","relative group"),c(R,"id","overview"),c(R,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(R,"href","#overview"),c(F,"class","relative group"),c(ie,"href","https://arxiv.org/abs/2202.09741"),c(ie,"rel","nofollow"),c(ce,"href","https://github.com/Visual-Attention-Network/VAN-Classification"),c(ce,"rel","nofollow"),c(fe,"href","https://arxiv.org/abs/2202.09741"),c(fe,"rel","nofollow"),c(pe,"width","600"),Vs(pe.src,To="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/van_architecture.png")||c(pe,"src",To),c(me,"href","https://huggingface.co/Francesco"),c(me,"rel","nofollow"),c(he,"href","https://github.com/Visual-Attention-Network/VAN-Classification"),c(he,"rel","nofollow"),c(G,"id","resources"),c(G,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(G,"href","#resources"),c(q,"class","relative group"),c(He,"href","/docs/transformers/main/en/model_doc/van#transformers.VanForImageClassification"),c(_e,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification"),c(_e,"rel","nofollow"),c(ve,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb"),c(ve,"rel","nofollow"),c(K,"id","transformers.VanConfig"),c(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(K,"href","#transformers.VanConfig"),c(z,"class","relative group"),c(Re,"href","/docs/transformers/main/en/model_doc/van#transformers.VanModel"),c($e,"href","https://huggingface.co/Visual-Attention-Network/van-base"),c($e,"rel","nofollow"),c(Ue,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),c(Be,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),c(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(J,"id","transformers.VanModel"),c(J,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(J,"href","#transformers.VanModel"),c(O,"class","relative group"),c(Ce,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ce,"rel","nofollow"),c(Ge,"href","/docs/transformers/main/en/model_doc/van#transformers.VanModel"),c(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Y,"id","transformers.VanForImageClassification"),c(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Y,"href","#transformers.VanForImageClassification"),c(H,"class","relative group"),c(Pe,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Pe,"rel","nofollow"),c(Ke,"href","/docs/transformers/main/en/model_doc/van#transformers.VanForImageClassification"),c(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,d){t(document.head,p),f(e,b,d),f(e,_,d),t(_,u),t(u,v),y(l,v,null),t(_,g),t(_,N),t(N,Xt),f(e,wt,d),f(e,F,d),t(F,R),t(R,at),y(re,at,null),t(F,Yt),t(F,ot),t(ot,ea),f(e,$t,d),f(e,U,d),t(U,ta),t(U,ie),t(ie,aa),t(U,oa),f(e,yt,d),f(e,Fe,d),t(Fe,sa),f(e,Vt,d),f(e,qe,d),t(qe,na),f(e,At,d),f(e,ze,d),t(ze,le),t(le,ra),t(le,ce),t(ce,ia),t(le,la),f(e,Ct,d),f(e,Le,d),t(Le,ca),f(e,Et,d),f(e,De,d),t(De,de),t(de,da),t(de,st),t(st,fa),t(de,pa),f(e,xt,d),f(e,B,d),t(B,ma),t(B,fe),t(fe,ha),t(B,ua),f(e,Tt,d),f(e,pe,d),f(e,kt,d),f(e,j,d),t(j,ga),t(j,me),t(me,_a),t(j,va),t(j,he),t(he,ba),t(j,wa),f(e,Pt,d),f(e,q,d),t(q,G),t(G,nt),y(ue,nt,null),t(q,$a),t(q,rt),t(rt,ya),f(e,Nt,d),f(e,Oe,d),t(Oe,Va),f(e,It,d),y(ge,e,d),f(e,jt,d),f(e,Se,d),t(Se,M),t(M,He),t(He,Aa),t(M,Ca),t(M,_e),t(_e,Ea),t(M,xa),t(M,ve),t(ve,Ta),t(M,ka),f(e,Mt,d),f(e,We,d),t(We,Pa),f(e,Ft,d),f(e,z,d),t(z,K),t(K,it),y(be,it,null),t(z,Na),t(z,lt),t(lt,Ia),f(e,qt,d),f(e,E,d),y(we,E,null),t(E,ja),t(E,L),t(L,Ma),t(L,Re),t(Re,Fa),t(L,qa),t(L,$e),t($e,za),t(L,La),t(E,Da),t(E,D),t(D,Oa),t(D,Ue),t(Ue,Sa),t(D,Ha),t(D,Be),t(Be,Wa),t(D,Ra),t(E,Ua),y(Z,E,null),f(e,zt,d),f(e,O,d),t(O,J),t(J,ct),y(ye,ct,null),t(O,Ba),t(O,dt),t(dt,Ga),f(e,Lt,d),f(e,I,d),y(Ve,I,null),t(I,Ka),t(I,Ae),t(Ae,Za),t(Ae,Ce),t(Ce,Ja),t(Ae,Qa),t(I,Xa),t(I,k),y(Ee,k,null),t(k,Ya),t(k,S),t(S,eo),t(S,Ge),t(Ge,to),t(S,ao),t(S,ft),t(ft,oo),t(S,so),t(k,no),y(Q,k,null),t(k,ro),y(X,k,null),f(e,Dt,d),f(e,H,d),t(H,Y),t(Y,pt),y(xe,pt,null),t(H,io),t(H,mt),t(mt,lo),f(e,Ot,d),f(e,x,d),y(Te,x,null),t(x,co),t(x,ht),t(ht,fo),t(x,po),t(x,ke),t(ke,mo),t(ke,Pe),t(Pe,ho),t(ke,uo),t(x,go),t(x,P),y(Ne,P,null),t(P,_o),t(P,W),t(W,vo),t(W,Ke),t(Ke,bo),t(W,wo),t(W,ut),t(ut,$o),t(W,yo),t(P,Vo),y(ee,P,null),t(P,Ao),y(te,P,null),St=!0},p(e,[d]){const Ie={};d&2&&(Ie.$$scope={dirty:d,ctx:e}),Z.$set(Ie);const gt={};d&2&&(gt.$$scope={dirty:d,ctx:e}),Q.$set(gt);const _t={};d&2&&(_t.$$scope={dirty:d,ctx:e}),X.$set(_t);const vt={};d&2&&(vt.$$scope={dirty:d,ctx:e}),ee.$set(vt);const je={};d&2&&(je.$$scope={dirty:d,ctx:e}),te.$set(je)},i(e){St||(V(l.$$.fragment,e),V(re.$$.fragment,e),V(ue.$$.fragment,e),V(ge.$$.fragment,e),V(be.$$.fragment,e),V(we.$$.fragment,e),V(Z.$$.fragment,e),V(ye.$$.fragment,e),V(Ve.$$.fragment,e),V(Ee.$$.fragment,e),V(Q.$$.fragment,e),V(X.$$.fragment,e),V(xe.$$.fragment,e),V(Te.$$.fragment,e),V(Ne.$$.fragment,e),V(ee.$$.fragment,e),V(te.$$.fragment,e),St=!0)},o(e){A(l.$$.fragment,e),A(re.$$.fragment,e),A(ue.$$.fragment,e),A(ge.$$.fragment,e),A(be.$$.fragment,e),A(we.$$.fragment,e),A(Z.$$.fragment,e),A(ye.$$.fragment,e),A(Ve.$$.fragment,e),A(Ee.$$.fragment,e),A(Q.$$.fragment,e),A(X.$$.fragment,e),A(xe.$$.fragment,e),A(Te.$$.fragment,e),A(Ne.$$.fragment,e),A(ee.$$.fragment,e),A(te.$$.fragment,e),St=!1},d(e){a(p),e&&a(b),e&&a(_),C(l),e&&a(wt),e&&a(F),C(re),e&&a($t),e&&a(U),e&&a(yt),e&&a(Fe),e&&a(Vt),e&&a(qe),e&&a(At),e&&a(ze),e&&a(Ct),e&&a(Le),e&&a(Et),e&&a(De),e&&a(xt),e&&a(B),e&&a(Tt),e&&a(pe),e&&a(kt),e&&a(j),e&&a(Pt),e&&a(q),C(ue),e&&a(Nt),e&&a(Oe),e&&a(It),C(ge,e),e&&a(jt),e&&a(Se),e&&a(Mt),e&&a(We),e&&a(Ft),e&&a(z),C(be),e&&a(qt),e&&a(E),C(we),C(Z),e&&a(zt),e&&a(O),C(ye),e&&a(Lt),e&&a(I),C(Ve),C(Ee),C(Q),C(X),e&&a(Dt),e&&a(H),C(xe),e&&a(Ot),e&&a(x),C(Te),C(Ne),C(ee),C(te)}}}const Is={local:"van",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.VanConfig",title:"VanConfig"},{local:"transformers.VanModel",title:"VanModel"},{local:"transformers.VanForImageClassification",title:"VanForImageClassification"}],title:"VAN"};function js(T){return As(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ss extends bs{constructor(p){super();ws(this,p,js,Ns,$s,{})}}export{Ss as default,Is as metadata};
