import{S as Cs,i as xs,s as Ts,e as o,k as h,w,t as r,M as ks,c as s,d as a,m,a as n,x as $,h as i,b as c,N as Ps,G as t,g as f,y,q as V,o as A,B as E,v as Is,L as jo}from"../../chunks/vendor-hf-doc-builder.js";import{T as Es}from"../../chunks/Tip-hf-doc-builder.js";import{D as $t}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Mo}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ot}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as No}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as Ns}from"../../chunks/PipelineTag-hf-doc-builder.js";function js(T){let p,b,_,u,v;return u=new Mo({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:"),_=h(),w(u.$$.fragment)},l(l){p=s(l,"P",{});var g=n(p);b=i(g,"Example:"),g.forEach(a),_=m(l),$(u.$$.fragment,l)},m(l,g){f(l,p,g),t(p,b),f(l,_,g),y(u,l,g),v=!0},p:jo,i(l){v||(V(u.$$.fragment,l),v=!0)},o(l){A(u.$$.fragment,l),v=!1},d(l){l&&a(p),l&&a(_),E(u,l)}}}function Ms(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 I=n(_);u=i(I,"Module"),I.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 Fs(T){let p,b,_,u,v;return u=new Mo({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:"),_=h(),w(u.$$.fragment)},l(l){p=s(l,"P",{});var g=n(p);b=i(g,"Example:"),g.forEach(a),_=m(l),$(u.$$.fragment,l)},m(l,g){f(l,p,g),t(p,b),f(l,_,g),y(u,l,g),v=!0},p:jo,i(l){v||(V(u.$$.fragment,l),v=!0)},o(l){A(u.$$.fragment,l),v=!1},d(l){l&&a(p),l&&a(_),E(u,l)}}}function qs(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 I=n(_);u=i(I,"Module"),I.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 zs(T){let p,b,_,u,v;return u=new Mo({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:"),_=h(),w(u.$$.fragment)},l(l){p=s(l,"P",{});var g=n(p);b=i(g,"Example:"),g.forEach(a),_=m(l),$(u.$$.fragment,l)},m(l,g){f(l,p,g),t(p,b),f(l,_,g),y(u,l,g),v=!0},p:jo,i(l){v||(V(u.$$.fragment,l),v=!0)},o(l){A(u.$$.fragment,l),v=!1},d(l){l&&a(p),l&&a(_),E(u,l)}}}function Ls(T){let p,b,_,u,v,l,g,I,ta,yt,F,R,st,ie,aa,nt,oa,Vt,U,sa,le,na,ra,At,qe,ia,Et,ze,la,Ct,Le,ce,ca,de,da,fa,xt,Se,pa,Tt,De,fe,ha,rt,ma,ua,kt,B,ga,pe,_a,va,Pt,he,Fo,It,j,ba,me,wa,$a,ue,ya,Va,Nt,q,G,it,ge,Aa,lt,Ea,jt,Oe,Ca,Mt,_e,Ft,K,M,He,xa,Ta,ve,ka,Pa,be,Ia,Na,ja,We,Ma,Re,Fa,qt,Ue,qa,zt,z,Z,ct,we,za,dt,La,Lt,C,$e,Sa,L,Da,Be,Oa,Ha,ye,Wa,Ra,Ua,S,Ba,Ge,Ga,Ka,Ke,Za,Ja,Qa,J,St,D,Q,ft,Ve,Xa,pt,Ya,Dt,N,Ae,eo,Ee,to,Ce,ao,oo,so,k,xe,no,O,ro,Ze,io,lo,ht,co,fo,po,X,ho,Y,Ot,H,ee,mt,Te,mo,ut,uo,Ht,x,ke,go,gt,_o,vo,Pe,bo,Ie,wo,$o,yo,P,Ne,Vo,W,Ao,Je,Eo,Co,_t,xo,To,ko,te,Po,ae,Wt;return l=new ot({}),ie=new ot({}),ge=new ot({}),_e=new Ns({props:{pipeline:"image-classification"}}),we=new ot({}),$e=new $t({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/v4.27.1/src/transformers/models/van/configuration_van.py#L30"}}),J=new No({props:{anchor:"transformers.VanConfig.example",$$slots:{default:[js]},$$scope:{ctx:T}}}),Ve=new ot({}),Ae=new $t({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/v4.27.1/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/v4.27.1/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.27.1/src/transformers/models/van/modeling_van.py#L425"}}),xe=new $t({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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__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/v4.27.1/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.27.1/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/v4.27.1/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>
`}}),X=new Es({props:{$$slots:{default:[Ms]},$$scope:{ctx:T}}}),Y=new No({props:{anchor:"transformers.VanModel.forward.example",$$slots:{default:[Fs]},$$scope:{ctx:T}}}),Te=new ot({}),ke=new $t({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/v4.27.1/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/v4.27.1/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.27.1/src/transformers/models/van/modeling_van.py#L480"}}),Ne=new $t({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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__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/v4.27.1/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/v4.27.1/src/transformers/models/van/modeling_van.py#L492",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),te=new Es({props:{$$slots:{default:[qs]},$$scope:{ctx:T}}}),ae=new No({props:{anchor:"transformers.VanForImageClassification.forward.example",$$slots:{default:[zs]},$$scope:{ctx:T}}}),{c(){p=o("meta"),b=h(),_=o("h1"),u=o("a"),v=o("span"),w(l.$$.fragment),g=h(),I=o("span"),ta=r("VAN"),yt=h(),F=o("h2"),R=o("a"),st=o("span"),w(ie.$$.fragment),aa=h(),nt=o("span"),oa=r("Overview"),Vt=h(),U=o("p"),sa=r("The VAN model was proposed in "),le=o("a"),na=r("Visual Attention Network"),ra=r(" by Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu."),At=h(),qe=o("p"),ia=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."),Et=h(),ze=o("p"),la=r("The abstract from the paper is the following:"),Ct=h(),Le=o("p"),ce=o("em"),ca=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 "),de=o("a"),da=r("this https URL"),fa=r("."),xt=h(),Se=o("p"),pa=r("Tips:"),Tt=h(),De=o("ul"),fe=o("li"),ha=r("VAN does not have an embedding layer, thus the "),rt=o("code"),ma=r("hidden_states"),ua=r(" will have a length equal to the number of stages."),kt=h(),B=o("p"),ga=r("The figure below illustrates the architecture of a Visual Aattention Layer. Taken from the "),pe=o("a"),_a=r("original paper"),va=r("."),Pt=h(),he=o("img"),It=h(),j=o("p"),ba=r("This model was contributed by "),me=o("a"),wa=r("Francesco"),$a=r(". The original code can be found "),ue=o("a"),ya=r("here"),Va=r("."),Nt=h(),q=o("h2"),G=o("a"),it=o("span"),w(ge.$$.fragment),Aa=h(),lt=o("span"),Ea=r("Resources"),jt=h(),Oe=o("p"),Ca=r("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with VAN."),Mt=h(),w(_e.$$.fragment),Ft=h(),K=o("ul"),M=o("li"),He=o("a"),xa=r("VanForImageClassification"),Ta=r(" is supported by this "),ve=o("a"),ka=r("example script"),Pa=r(" and "),be=o("a"),Ia=r("notebook"),Na=r("."),ja=h(),We=o("li"),Ma=r("See also: "),Re=o("a"),Fa=r("Image classification task guide"),qt=h(),Ue=o("p"),qa=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."),zt=h(),z=o("h2"),Z=o("a"),ct=o("span"),w(we.$$.fragment),za=h(),dt=o("span"),La=r("VanConfig"),Lt=h(),C=o("div"),w($e.$$.fragment),Sa=h(),L=o("p"),Da=r("This is the configuration class to store the configuration of a "),Be=o("a"),Oa=r("VanModel"),Ha=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
`),ye=o("a"),Wa=r("Visual-Attention-Network/van-base"),Ra=r(" architecture."),Ua=h(),S=o("p"),Ba=r("Configuration objects inherit from "),Ge=o("a"),Ga=r("PretrainedConfig"),Ka=r(` and can be used to control the model outputs. Read the
documentation from `),Ke=o("a"),Za=r("PretrainedConfig"),Ja=r(" for more information."),Qa=h(),w(J.$$.fragment),St=h(),D=o("h2"),Q=o("a"),ft=o("span"),w(Ve.$$.fragment),Xa=h(),pt=o("span"),Ya=r("VanModel"),Dt=h(),N=o("div"),w(Ae.$$.fragment),eo=h(),Ee=o("p"),to=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"),ao=r("torch.nn.Module"),oo=r(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),so=h(),k=o("div"),w(xe.$$.fragment),no=h(),O=o("p"),ro=r("The "),Ze=o("a"),io=r("VanModel"),lo=r(" forward method, overrides the "),ht=o("code"),co=r("__call__"),fo=r(" special method."),po=h(),w(X.$$.fragment),ho=h(),w(Y.$$.fragment),Ot=h(),H=o("h2"),ee=o("a"),mt=o("span"),w(Te.$$.fragment),mo=h(),ut=o("span"),uo=r("VanForImageClassification"),Ht=h(),x=o("div"),w(ke.$$.fragment),go=h(),gt=o("p"),_o=r(`VAN Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),vo=h(),Pe=o("p"),bo=r("This model is a PyTorch "),Ie=o("a"),wo=r("torch.nn.Module"),$o=r(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),yo=h(),P=o("div"),w(Ne.$$.fragment),Vo=h(),W=o("p"),Ao=r("The "),Je=o("a"),Eo=r("VanForImageClassification"),Co=r(" forward method, overrides the "),_t=o("code"),xo=r("__call__"),To=r(" special method."),ko=h(),w(te.$$.fragment),Po=h(),w(ae.$$.fragment),this.h()},l(e){const d=ks('[data-svelte="svelte-1phssyn"]',document.head);p=s(d,"META",{name:!0,content:!0}),d.forEach(a),b=m(e),_=s(e,"H1",{class:!0});var je=n(_);u=s(je,"A",{id:!0,class:!0,href:!0});var vt=n(u);v=s(vt,"SPAN",{});var bt=n(v);$(l.$$.fragment,bt),bt.forEach(a),vt.forEach(a),g=m(je),I=s(je,"SPAN",{});var wt=n(I);ta=i(wt,"VAN"),wt.forEach(a),je.forEach(a),yt=m(e),F=s(e,"H2",{class:!0});var Me=n(F);R=s(Me,"A",{id:!0,class:!0,href:!0});var qo=n(R);st=s(qo,"SPAN",{});var zo=n(st);$(ie.$$.fragment,zo),zo.forEach(a),qo.forEach(a),aa=m(Me),nt=s(Me,"SPAN",{});var Lo=n(nt);oa=i(Lo,"Overview"),Lo.forEach(a),Me.forEach(a),Vt=m(e),U=s(e,"P",{});var Rt=n(U);sa=i(Rt,"The VAN model was proposed in "),le=s(Rt,"A",{href:!0,rel:!0});var So=n(le);na=i(So,"Visual Attention Network"),So.forEach(a),ra=i(Rt," by Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu."),Rt.forEach(a),At=m(e),qe=s(e,"P",{});var Do=n(qe);ia=i(Do,"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."),Do.forEach(a),Et=m(e),ze=s(e,"P",{});var Oo=n(ze);la=i(Oo,"The abstract from the paper is the following:"),Oo.forEach(a),Ct=m(e),Le=s(e,"P",{});var Ho=n(Le);ce=s(Ho,"EM",{});var Ut=n(ce);ca=i(Ut,"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 "),de=s(Ut,"A",{href:!0,rel:!0});var Wo=n(de);da=i(Wo,"this https URL"),Wo.forEach(a),fa=i(Ut,"."),Ut.forEach(a),Ho.forEach(a),xt=m(e),Se=s(e,"P",{});var Ro=n(Se);pa=i(Ro,"Tips:"),Ro.forEach(a),Tt=m(e),De=s(e,"UL",{});var Uo=n(De);fe=s(Uo,"LI",{});var Bt=n(fe);ha=i(Bt,"VAN does not have an embedding layer, thus the "),rt=s(Bt,"CODE",{});var Bo=n(rt);ma=i(Bo,"hidden_states"),Bo.forEach(a),ua=i(Bt," will have a length equal to the number of stages."),Bt.forEach(a),Uo.forEach(a),kt=m(e),B=s(e,"P",{});var Gt=n(B);ga=i(Gt,"The figure below illustrates the architecture of a Visual Aattention Layer. Taken from the "),pe=s(Gt,"A",{href:!0,rel:!0});var Go=n(pe);_a=i(Go,"original paper"),Go.forEach(a),va=i(Gt,"."),Gt.forEach(a),Pt=m(e),he=s(e,"IMG",{width:!0,src:!0}),It=m(e),j=s(e,"P",{});var Qe=n(j);ba=i(Qe,"This model was contributed by "),me=s(Qe,"A",{href:!0,rel:!0});var Ko=n(me);wa=i(Ko,"Francesco"),Ko.forEach(a),$a=i(Qe,". The original code can be found "),ue=s(Qe,"A",{href:!0,rel:!0});var Zo=n(ue);ya=i(Zo,"here"),Zo.forEach(a),Va=i(Qe,"."),Qe.forEach(a),Nt=m(e),q=s(e,"H2",{class:!0});var Kt=n(q);G=s(Kt,"A",{id:!0,class:!0,href:!0});var Jo=n(G);it=s(Jo,"SPAN",{});var Qo=n(it);$(ge.$$.fragment,Qo),Qo.forEach(a),Jo.forEach(a),Aa=m(Kt),lt=s(Kt,"SPAN",{});var Xo=n(lt);Ea=i(Xo,"Resources"),Xo.forEach(a),Kt.forEach(a),jt=m(e),Oe=s(e,"P",{});var Yo=n(Oe);Ca=i(Yo,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with VAN."),Yo.forEach(a),Mt=m(e),$(_e.$$.fragment,e),Ft=m(e),K=s(e,"UL",{});var Zt=n(K);M=s(Zt,"LI",{});var Fe=n(M);He=s(Fe,"A",{href:!0});var es=n(He);xa=i(es,"VanForImageClassification"),es.forEach(a),Ta=i(Fe," is supported by this "),ve=s(Fe,"A",{href:!0,rel:!0});var ts=n(ve);ka=i(ts,"example script"),ts.forEach(a),Pa=i(Fe," and "),be=s(Fe,"A",{href:!0,rel:!0});var as=n(be);Ia=i(as,"notebook"),as.forEach(a),Na=i(Fe,"."),Fe.forEach(a),ja=m(Zt),We=s(Zt,"LI",{});var Io=n(We);Ma=i(Io,"See also: "),Re=s(Io,"A",{href:!0});var os=n(Re);Fa=i(os,"Image classification task guide"),os.forEach(a),Io.forEach(a),Zt.forEach(a),qt=m(e),Ue=s(e,"P",{});var ss=n(Ue);qa=i(ss,"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."),ss.forEach(a),zt=m(e),z=s(e,"H2",{class:!0});var Jt=n(z);Z=s(Jt,"A",{id:!0,class:!0,href:!0});var ns=n(Z);ct=s(ns,"SPAN",{});var rs=n(ct);$(we.$$.fragment,rs),rs.forEach(a),ns.forEach(a),za=m(Jt),dt=s(Jt,"SPAN",{});var is=n(dt);La=i(is,"VanConfig"),is.forEach(a),Jt.forEach(a),Lt=m(e),C=s(e,"DIV",{class:!0});var oe=n(C);$($e.$$.fragment,oe),Sa=m(oe),L=s(oe,"P",{});var Xe=n(L);Da=i(Xe,"This is the configuration class to store the configuration of a "),Be=s(Xe,"A",{href:!0});var ls=n(Be);Oa=i(ls,"VanModel"),ls.forEach(a),Ha=i(Xe,`. 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
`),ye=s(Xe,"A",{href:!0,rel:!0});var cs=n(ye);Wa=i(cs,"Visual-Attention-Network/van-base"),cs.forEach(a),Ra=i(Xe," architecture."),Xe.forEach(a),Ua=m(oe),S=s(oe,"P",{});var Ye=n(S);Ba=i(Ye,"Configuration objects inherit from "),Ge=s(Ye,"A",{href:!0});var ds=n(Ge);Ga=i(ds,"PretrainedConfig"),ds.forEach(a),Ka=i(Ye,` and can be used to control the model outputs. Read the
documentation from `),Ke=s(Ye,"A",{href:!0});var fs=n(Ke);Za=i(fs,"PretrainedConfig"),fs.forEach(a),Ja=i(Ye," for more information."),Ye.forEach(a),Qa=m(oe),$(J.$$.fragment,oe),oe.forEach(a),St=m(e),D=s(e,"H2",{class:!0});var Qt=n(D);Q=s(Qt,"A",{id:!0,class:!0,href:!0});var ps=n(Q);ft=s(ps,"SPAN",{});var hs=n(ft);$(Ve.$$.fragment,hs),hs.forEach(a),ps.forEach(a),Xa=m(Qt),pt=s(Qt,"SPAN",{});var ms=n(pt);Ya=i(ms,"VanModel"),ms.forEach(a),Qt.forEach(a),Dt=m(e),N=s(e,"DIV",{class:!0});var et=n(N);$(Ae.$$.fragment,et),eo=m(et),Ee=s(et,"P",{});var Xt=n(Ee);to=i(Xt,`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(Xt,"A",{href:!0,rel:!0});var us=n(Ce);ao=i(us,"torch.nn.Module"),us.forEach(a),oo=i(Xt,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Xt.forEach(a),so=m(et),k=s(et,"DIV",{class:!0});var se=n(k);$(xe.$$.fragment,se),no=m(se),O=s(se,"P",{});var tt=n(O);ro=i(tt,"The "),Ze=s(tt,"A",{href:!0});var gs=n(Ze);io=i(gs,"VanModel"),gs.forEach(a),lo=i(tt," forward method, overrides the "),ht=s(tt,"CODE",{});var _s=n(ht);co=i(_s,"__call__"),_s.forEach(a),fo=i(tt," special method."),tt.forEach(a),po=m(se),$(X.$$.fragment,se),ho=m(se),$(Y.$$.fragment,se),se.forEach(a),et.forEach(a),Ot=m(e),H=s(e,"H2",{class:!0});var Yt=n(H);ee=s(Yt,"A",{id:!0,class:!0,href:!0});var vs=n(ee);mt=s(vs,"SPAN",{});var bs=n(mt);$(Te.$$.fragment,bs),bs.forEach(a),vs.forEach(a),mo=m(Yt),ut=s(Yt,"SPAN",{});var ws=n(ut);uo=i(ws,"VanForImageClassification"),ws.forEach(a),Yt.forEach(a),Ht=m(e),x=s(e,"DIV",{class:!0});var ne=n(x);$(ke.$$.fragment,ne),go=m(ne),gt=s(ne,"P",{});var $s=n(gt);_o=i($s,`VAN Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),$s.forEach(a),vo=m(ne),Pe=s(ne,"P",{});var ea=n(Pe);bo=i(ea,"This model is a PyTorch "),Ie=s(ea,"A",{href:!0,rel:!0});var ys=n(Ie);wo=i(ys,"torch.nn.Module"),ys.forEach(a),$o=i(ea,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ea.forEach(a),yo=m(ne),P=s(ne,"DIV",{class:!0});var re=n(P);$(Ne.$$.fragment,re),Vo=m(re),W=s(re,"P",{});var at=n(W);Ao=i(at,"The "),Je=s(at,"A",{href:!0});var Vs=n(Je);Eo=i(Vs,"VanForImageClassification"),Vs.forEach(a),Co=i(at," forward method, overrides the "),_t=s(at,"CODE",{});var As=n(_t);xo=i(As,"__call__"),As.forEach(a),To=i(at," special method."),at.forEach(a),ko=m(re),$(te.$$.fragment,re),Po=m(re),$(ae.$$.fragment,re),re.forEach(a),ne.forEach(a),this.h()},h(){c(p,"name","hf:doc:metadata"),c(p,"content",JSON.stringify(Ss)),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(le,"href","https://arxiv.org/abs/2202.09741"),c(le,"rel","nofollow"),c(de,"href","https://github.com/Visual-Attention-Network/VAN-Classification"),c(de,"rel","nofollow"),c(pe,"href","https://arxiv.org/abs/2202.09741"),c(pe,"rel","nofollow"),c(he,"width","600"),Ps(he.src,Fo="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/van_architecture.png")||c(he,"src",Fo),c(me,"href","https://huggingface.co/Francesco"),c(me,"rel","nofollow"),c(ue,"href","https://github.com/Visual-Attention-Network/VAN-Classification"),c(ue,"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/v4.27.1/en/model_doc/van#transformers.VanForImageClassification"),c(ve,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification"),c(ve,"rel","nofollow"),c(be,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb"),c(be,"rel","nofollow"),c(Re,"href","./tasks/image_classification"),c(Z,"id","transformers.VanConfig"),c(Z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Z,"href","#transformers.VanConfig"),c(z,"class","relative group"),c(Be,"href","/docs/transformers/v4.27.1/en/model_doc/van#transformers.VanModel"),c(ye,"href","https://huggingface.co/Visual-Attention-Network/van-base"),c(ye,"rel","nofollow"),c(Ge,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(Ke,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Q,"id","transformers.VanModel"),c(Q,"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(Q,"href","#transformers.VanModel"),c(D,"class","relative group"),c(Ce,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ce,"rel","nofollow"),c(Ze,"href","/docs/transformers/v4.27.1/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(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ee,"id","transformers.VanForImageClassification"),c(ee,"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(ee,"href","#transformers.VanForImageClassification"),c(H,"class","relative group"),c(Ie,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ie,"rel","nofollow"),c(Je,"href","/docs/transformers/v4.27.1/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(_,I),t(I,ta),f(e,yt,d),f(e,F,d),t(F,R),t(R,st),y(ie,st,null),t(F,aa),t(F,nt),t(nt,oa),f(e,Vt,d),f(e,U,d),t(U,sa),t(U,le),t(le,na),t(U,ra),f(e,At,d),f(e,qe,d),t(qe,ia),f(e,Et,d),f(e,ze,d),t(ze,la),f(e,Ct,d),f(e,Le,d),t(Le,ce),t(ce,ca),t(ce,de),t(de,da),t(ce,fa),f(e,xt,d),f(e,Se,d),t(Se,pa),f(e,Tt,d),f(e,De,d),t(De,fe),t(fe,ha),t(fe,rt),t(rt,ma),t(fe,ua),f(e,kt,d),f(e,B,d),t(B,ga),t(B,pe),t(pe,_a),t(B,va),f(e,Pt,d),f(e,he,d),f(e,It,d),f(e,j,d),t(j,ba),t(j,me),t(me,wa),t(j,$a),t(j,ue),t(ue,ya),t(j,Va),f(e,Nt,d),f(e,q,d),t(q,G),t(G,it),y(ge,it,null),t(q,Aa),t(q,lt),t(lt,Ea),f(e,jt,d),f(e,Oe,d),t(Oe,Ca),f(e,Mt,d),y(_e,e,d),f(e,Ft,d),f(e,K,d),t(K,M),t(M,He),t(He,xa),t(M,Ta),t(M,ve),t(ve,ka),t(M,Pa),t(M,be),t(be,Ia),t(M,Na),t(K,ja),t(K,We),t(We,Ma),t(We,Re),t(Re,Fa),f(e,qt,d),f(e,Ue,d),t(Ue,qa),f(e,zt,d),f(e,z,d),t(z,Z),t(Z,ct),y(we,ct,null),t(z,za),t(z,dt),t(dt,La),f(e,Lt,d),f(e,C,d),y($e,C,null),t(C,Sa),t(C,L),t(L,Da),t(L,Be),t(Be,Oa),t(L,Ha),t(L,ye),t(ye,Wa),t(L,Ra),t(C,Ua),t(C,S),t(S,Ba),t(S,Ge),t(Ge,Ga),t(S,Ka),t(S,Ke),t(Ke,Za),t(S,Ja),t(C,Qa),y(J,C,null),f(e,St,d),f(e,D,d),t(D,Q),t(Q,ft),y(Ve,ft,null),t(D,Xa),t(D,pt),t(pt,Ya),f(e,Dt,d),f(e,N,d),y(Ae,N,null),t(N,eo),t(N,Ee),t(Ee,to),t(Ee,Ce),t(Ce,ao),t(Ee,oo),t(N,so),t(N,k),y(xe,k,null),t(k,no),t(k,O),t(O,ro),t(O,Ze),t(Ze,io),t(O,lo),t(O,ht),t(ht,co),t(O,fo),t(k,po),y(X,k,null),t(k,ho),y(Y,k,null),f(e,Ot,d),f(e,H,d),t(H,ee),t(ee,mt),y(Te,mt,null),t(H,mo),t(H,ut),t(ut,uo),f(e,Ht,d),f(e,x,d),y(ke,x,null),t(x,go),t(x,gt),t(gt,_o),t(x,vo),t(x,Pe),t(Pe,bo),t(Pe,Ie),t(Ie,wo),t(Pe,$o),t(x,yo),t(x,P),y(Ne,P,null),t(P,Vo),t(P,W),t(W,Ao),t(W,Je),t(Je,Eo),t(W,Co),t(W,_t),t(_t,xo),t(W,To),t(P,ko),y(te,P,null),t(P,Po),y(ae,P,null),Wt=!0},p(e,[d]){const je={};d&2&&(je.$$scope={dirty:d,ctx:e}),J.$set(je);const vt={};d&2&&(vt.$$scope={dirty:d,ctx:e}),X.$set(vt);const bt={};d&2&&(bt.$$scope={dirty:d,ctx:e}),Y.$set(bt);const wt={};d&2&&(wt.$$scope={dirty:d,ctx:e}),te.$set(wt);const Me={};d&2&&(Me.$$scope={dirty:d,ctx:e}),ae.$set(Me)},i(e){Wt||(V(l.$$.fragment,e),V(ie.$$.fragment,e),V(ge.$$.fragment,e),V(_e.$$.fragment,e),V(we.$$.fragment,e),V($e.$$.fragment,e),V(J.$$.fragment,e),V(Ve.$$.fragment,e),V(Ae.$$.fragment,e),V(xe.$$.fragment,e),V(X.$$.fragment,e),V(Y.$$.fragment,e),V(Te.$$.fragment,e),V(ke.$$.fragment,e),V(Ne.$$.fragment,e),V(te.$$.fragment,e),V(ae.$$.fragment,e),Wt=!0)},o(e){A(l.$$.fragment,e),A(ie.$$.fragment,e),A(ge.$$.fragment,e),A(_e.$$.fragment,e),A(we.$$.fragment,e),A($e.$$.fragment,e),A(J.$$.fragment,e),A(Ve.$$.fragment,e),A(Ae.$$.fragment,e),A(xe.$$.fragment,e),A(X.$$.fragment,e),A(Y.$$.fragment,e),A(Te.$$.fragment,e),A(ke.$$.fragment,e),A(Ne.$$.fragment,e),A(te.$$.fragment,e),A(ae.$$.fragment,e),Wt=!1},d(e){a(p),e&&a(b),e&&a(_),E(l),e&&a(yt),e&&a(F),E(ie),e&&a(Vt),e&&a(U),e&&a(At),e&&a(qe),e&&a(Et),e&&a(ze),e&&a(Ct),e&&a(Le),e&&a(xt),e&&a(Se),e&&a(Tt),e&&a(De),e&&a(kt),e&&a(B),e&&a(Pt),e&&a(he),e&&a(It),e&&a(j),e&&a(Nt),e&&a(q),E(ge),e&&a(jt),e&&a(Oe),e&&a(Mt),E(_e,e),e&&a(Ft),e&&a(K),e&&a(qt),e&&a(Ue),e&&a(zt),e&&a(z),E(we),e&&a(Lt),e&&a(C),E($e),E(J),e&&a(St),e&&a(D),E(Ve),e&&a(Dt),e&&a(N),E(Ae),E(xe),E(X),E(Y),e&&a(Ot),e&&a(H),E(Te),e&&a(Ht),e&&a(x),E(ke),E(Ne),E(te),E(ae)}}}const Ss={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 Ds(T){return Is(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ks extends Cs{constructor(p){super();xs(this,p,Ds,Ls,Ts,{})}}export{Ks as default,Ss as metadata};
