import{S as pa,i as ha,s as ma,e as n,k as h,w as b,t as i,M as ua,c as a,d as o,m,a as s,x as w,h as l,b as c,N as ga,G as t,g as f,y as x,q as $,o as N,B as y,v as va,L as Cn}from"../../chunks/vendor-hf-doc-builder.js";import{T as fa}from"../../chunks/Tip-hf-doc-builder.js";import{D as _t}from"../../chunks/Docstring-hf-doc-builder.js";import{C as bn}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ye}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as _n}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as _a}from"../../chunks/PipelineTag-hf-doc-builder.js";function Ca(E){let p,C,v,u,_;return u=new bn({props:{code:`from transformers import ConvNeXTV2Config, ConvNextV2Model

# Initializing a ConvNeXTV2 convnextv2-tiny-1k-224 style configuration
configuration = ConvNeXTV2Config()

# Initializing a model (with random weights) from the convnextv2-tiny-1k-224 style configuration
model = ConvNextV2Model(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> ConvNeXTV2Config, ConvNextV2Model

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ConvNeXTV2 convnextv2-tiny-1k-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ConvNeXTV2Config()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the convnextv2-tiny-1k-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvNextV2Model(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=n("p"),C=i("Example:"),v=h(),b(u.$$.fragment)},l(r){p=a(r,"P",{});var g=s(p);C=l(g,"Example:"),g.forEach(o),v=m(r),w(u.$$.fragment,r)},m(r,g){f(r,p,g),t(p,C),f(r,v,g),x(u,r,g),_=!0},p:Cn,i(r){_||($(u.$$.fragment,r),_=!0)},o(r){N(u.$$.fragment,r),_=!1},d(r){r&&o(p),r&&o(v),y(u,r)}}}function ba(E){let p,C,v,u,_;return{c(){p=n("p"),C=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=n("code"),u=i("Module"),_=i(`
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(r){p=a(r,"P",{});var g=s(p);C=l(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a(g,"CODE",{});var P=s(v);u=l(P,"Module"),P.forEach(o),_=l(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(o)},m(r,g){f(r,p,g),t(p,C),t(p,v),t(v,u),t(p,_)},d(r){r&&o(p)}}}function wa(E){let p,C,v,u,_;return u=new bn({props:{code:`from transformers import AutoImageProcessor, ConvNextV2Model
import torch
from datasets import load_dataset

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

image_processor = AutoImageProcessor.from_pretrained("facebook/convnextv2-tiny-1k-224")
model = ConvNextV2Model.from_pretrained("facebook/convnextv2-tiny-1k-224")

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, ConvNextV2Model
<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;facebook/convnextv2-tiny-1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvNextV2Model.from_pretrained(<span class="hljs-string">&quot;facebook/convnextv2-tiny-1k-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">768</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`}}),{c(){p=n("p"),C=i("Example:"),v=h(),b(u.$$.fragment)},l(r){p=a(r,"P",{});var g=s(p);C=l(g,"Example:"),g.forEach(o),v=m(r),w(u.$$.fragment,r)},m(r,g){f(r,p,g),t(p,C),f(r,v,g),x(u,r,g),_=!0},p:Cn,i(r){_||($(u.$$.fragment,r),_=!0)},o(r){N(u.$$.fragment,r),_=!1},d(r){r&&o(p),r&&o(v),y(u,r)}}}function xa(E){let p,C,v,u,_;return{c(){p=n("p"),C=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=n("code"),u=i("Module"),_=i(`
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(r){p=a(r,"P",{});var g=s(p);C=l(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a(g,"CODE",{});var P=s(v);u=l(P,"Module"),P.forEach(o),_=l(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(o)},m(r,g){f(r,p,g),t(p,C),t(p,v),t(v,u),t(p,_)},d(r){r&&o(p)}}}function $a(E){let p,C,v,u,_;return u=new bn({props:{code:`from transformers import AutoImageProcessor, ConvNextV2ForImageClassification
import torch
from datasets import load_dataset

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

image_processor = AutoImageProcessor.from_pretrained("facebook/convnextv2-tiny-1k-224")
model = ConvNextV2ForImageClassification.from_pretrained("facebook/convnextv2-tiny-1k-224")

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, ConvNextV2ForImageClassification
<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;facebook/convnextv2-tiny-1k-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvNextV2ForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/convnextv2-tiny-1k-224&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`}}),{c(){p=n("p"),C=i("Example:"),v=h(),b(u.$$.fragment)},l(r){p=a(r,"P",{});var g=s(p);C=l(g,"Example:"),g.forEach(o),v=m(r),w(u.$$.fragment,r)},m(r,g){f(r,p,g),t(p,C),f(r,v,g),x(u,r,g),_=!0},p:Cn,i(r){_||($(u.$$.fragment,r),_=!0)},o(r){N(u.$$.fragment,r),_=!1},d(r){r&&o(p),r&&o(v),y(u,r)}}}function Na(E){let p,C,v,u,_,r,g,P,Gt,Ct,F,R,et,ie,Bt,tt,Kt,bt,A,Zt,le,Jt,Qt,Pe,Yt,eo,wt,je,to,xt,Ae,ot,oo,$t,Me,no,Nt,qe,nt,ao,yt,U,wn,Vt,G,so,Fe,ro,io,kt,M,lo,ce,co,fo,de,po,ho,Et,z,B,at,fe,mo,st,uo,Tt,ze,go,It,pe,Pt,Xe,q,Se,vo,_o,he,Co,bo,me,wo,xo,jt,De,$o,At,X,K,rt,ue,No,it,yo,Mt,V,ge,Vo,S,ko,Oe,Eo,To,ve,Io,Po,jo,D,Ao,Le,Mo,qo,He,Fo,zo,Xo,Z,qt,O,J,lt,_e,So,ct,Do,Ft,j,Ce,Oo,be,Lo,we,Ho,Wo,Ro,T,xe,Uo,L,Go,We,Bo,Ko,dt,Zo,Jo,Qo,Q,Yo,Y,zt,H,ee,ft,$e,en,pt,tn,Xt,k,Ne,on,ht,nn,an,ye,sn,Ve,rn,ln,cn,I,ke,dn,W,fn,Re,pn,hn,mt,mn,un,gn,te,vn,oe,St;return r=new Ye({}),ie=new Ye({}),fe=new Ye({}),pe=new _a({props:{pipeline:"image-classification"}}),ue=new Ye({}),ge=new _t({props:{name:"class transformers.ConvNextV2Config",anchor:"transformers.ConvNextV2Config",parameters:[{name:"num_channels",val:" = 3"},{name:"patch_size",val:" = 4"},{name:"num_stages",val:" = 4"},{name:"hidden_sizes",val:" = None"},{name:"depths",val:" = None"},{name:"hidden_act",val:" = 'gelu'"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"drop_path_rate",val:" = 0.0"},{name:"image_size",val:" = 224"},{name:"out_features",val:" = None"},{name:"out_indices",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvNextV2Config.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.ConvNextV2Config.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, optional, defaults to 4) &#x2014;
Patch size to use in the patch embedding layer.`,name:"patch_size"},{anchor:"transformers.ConvNextV2Config.num_stages",description:`<strong>num_stages</strong> (<code>int</code>, optional, defaults to 4) &#x2014;
The number of stages in the model.`,name:"num_stages"},{anchor:"transformers.ConvNextV2Config.hidden_sizes",description:`<strong>hidden_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[96, 192, 384, 768]</code>) &#x2014;
Dimensionality (hidden size) at each stage.`,name:"hidden_sizes"},{anchor:"transformers.ConvNextV2Config.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 3, 9, 3]</code>) &#x2014;
Depth (number of blocks) for each stage.`,name:"depths"},{anchor:"transformers.ConvNextV2Config.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 block. 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.ConvNextV2Config.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.ConvNextV2Config.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.ConvNextV2Config.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The drop rate for stochastic depth.`,name:"drop_path_rate"},{anchor:"transformers.ConvNextV2Config.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.`,name:"out_features"},{anchor:"transformers.ConvNextV2Config.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.`,name:"out_indices"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convnextv2/configuration_convnextv2.py#L30"}}),Z=new _n({props:{anchor:"transformers.ConvNextV2Config.example",$$slots:{default:[Ca]},$$scope:{ctx:E}}}),_e=new Ye({}),Ce=new _t({props:{name:"class transformers.ConvNextV2Model",anchor:"transformers.ConvNextV2Model",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvNextV2Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/convnextv2#transformers.ConvNextV2Config">ConvNextV2Config</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.29.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.29.0/src/transformers/models/convnextv2/modeling_convnextv2.py#L354"}}),xe=new _t({props:{name:"forward",anchor:"transformers.ConvNextV2Model.forward",parameters:[{name:"pixel_values",val:": FloatTensor = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ConvNextV2Model.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.29.0/en/model_doc/convnext#transformers.ConvNextImageProcessor">ConvNextImageProcessor</a>. See
<a href="/docs/transformers/v4.29.0/en/model_doc/dpt#transformers.DPTFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ConvNextV2Model.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.ConvNextV2Model.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.29.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.29.0/src/transformers/models/convnextv2/modeling_convnextv2.py#L368",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.29.0/en/model_doc/convnextv2#transformers.ConvNextV2Config"
>ConvNextV2Config</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 fa({props:{$$slots:{default:[ba]},$$scope:{ctx:E}}}),Y=new _n({props:{anchor:"transformers.ConvNextV2Model.forward.example",$$slots:{default:[wa]},$$scope:{ctx:E}}}),$e=new Ye({}),Ne=new _t({props:{name:"class transformers.ConvNextV2ForImageClassification",anchor:"transformers.ConvNextV2ForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvNextV2ForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/convnextv2#transformers.ConvNextV2Config">ConvNextV2Config</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.29.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.29.0/src/transformers/models/convnextv2/modeling_convnextv2.py#L421"}}),ke=new _t({props:{name:"forward",anchor:"transformers.ConvNextV2ForImageClassification.forward",parameters:[{name:"pixel_values",val:": 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.ConvNextV2ForImageClassification.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.29.0/en/model_doc/convnext#transformers.ConvNextImageProcessor">ConvNextImageProcessor</a>. See
<a href="/docs/transformers/v4.29.0/en/model_doc/dpt#transformers.DPTFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ConvNextV2ForImageClassification.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.ConvNextV2ForImageClassification.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.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ConvNextV2ForImageClassification.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.29.0/src/transformers/models/convnextv2/modeling_convnextv2.py#L436",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/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.29.0/en/model_doc/convnextv2#transformers.ConvNextV2Config"
>ConvNextV2Config</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.29.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),te=new fa({props:{$$slots:{default:[xa]},$$scope:{ctx:E}}}),oe=new _n({props:{anchor:"transformers.ConvNextV2ForImageClassification.forward.example",$$slots:{default:[$a]},$$scope:{ctx:E}}}),{c(){p=n("meta"),C=h(),v=n("h1"),u=n("a"),_=n("span"),b(r.$$.fragment),g=h(),P=n("span"),Gt=i("ConvNeXt V2"),Ct=h(),F=n("h2"),R=n("a"),et=n("span"),b(ie.$$.fragment),Bt=h(),tt=n("span"),Kt=i("Overview"),bt=h(),A=n("p"),Zt=i("The ConvNeXt V2 model was proposed in "),le=n("a"),Jt=i("ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders"),Qt=i(` by Sanghyun Woo, Shoubhik Debnath, Ronghang Hu, Xinlei Chen, Zhuang Liu, In So Kweon, Saining Xie.
ConvNeXt V2 is a pure convolutional model (ConvNet), inspired by the design of Vision Transformers, and a successor of `),Pe=n("a"),Yt=i("ConvNeXT"),eo=i("."),wt=h(),je=n("p"),to=i("The abstract from the paper is the following:"),xt=h(),Ae=n("p"),ot=n("em"),oo=i("Driven by improved architectures and better representation learning frameworks, the field of visual recognition has enjoyed rapid modernization and performance boost in the early 2020s. For example, modern ConvNets, represented by ConvNeXt, have demonstrated strong performance in various scenarios. While these models were originally designed for supervised learning with ImageNet labels, they can also potentially benefit from self-supervised learning techniques such as masked  autoencoders (MAE). However, we found that simply combining these two approaches leads to subpar performance. In this paper, we propose a fully convolutional masked autoencoder framework and a new Global Response Normalization (GRN) layer that can be added to the ConvNeXt architecture to enhance inter-channel feature competition. This co-design of self-supervised learning techniques and architectural improvement results in a new model family called ConvNeXt V2, which significantly improves the performance of pure ConvNets on various recognition benchmarks, including ImageNet classification, COCO detection, and ADE20K segmentation. We also provide pre-trained ConvNeXt V2 models of various sizes, ranging from an efficient 3.7M-parameter Atto model with 76.7% top-1 accuracy on ImageNet, to a 650M Huge model that achieves a state-of-the-art 88.9% accuracy using only public training data."),$t=h(),Me=n("p"),no=i("Tips:"),Nt=h(),qe=n("ul"),nt=n("li"),ao=i("See the code examples below each model regarding usage."),yt=h(),U=n("img"),Vt=h(),G=n("small"),so=i("ConvNeXt V2 architecture. Taken from the "),Fe=n("a"),ro=i("original paper"),io=i("."),kt=h(),M=n("p"),lo=i("This model was contributed by "),ce=n("a"),co=i("adirik"),fo=i(". The original code can be found "),de=n("a"),po=i("here"),ho=i("."),Et=h(),z=n("h2"),B=n("a"),at=n("span"),b(fe.$$.fragment),mo=h(),st=n("span"),uo=i("Resources"),Tt=h(),ze=n("p"),go=i("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with ConvNeXt V2."),It=h(),b(pe.$$.fragment),Pt=h(),Xe=n("ul"),q=n("li"),Se=n("a"),vo=i("ConvNextV2ForImageClassification"),_o=i(" is supported by this "),he=n("a"),Co=i("example script"),bo=i(" and "),me=n("a"),wo=i("notebook"),xo=i("."),jt=h(),De=n("p"),$o=i("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."),At=h(),X=n("h2"),K=n("a"),rt=n("span"),b(ue.$$.fragment),No=h(),it=n("span"),yo=i("ConvNextV2Config"),Mt=h(),V=n("div"),b(ge.$$.fragment),Vo=h(),S=n("p"),ko=i("This is the configuration class to store the configuration of a "),Oe=n("a"),Eo=i("ConvNextV2Model"),To=i(`. It is used to instantiate an
ConvNeXTV2 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 ConvNeXTV2
`),ve=n("a"),Io=i("facebook/convnextv2-tiny-1k-224"),Po=i(" architecture."),jo=h(),D=n("p"),Ao=i("Configuration objects inherit from "),Le=n("a"),Mo=i("PretrainedConfig"),qo=i(` and can be used to control the model outputs. Read the
documentation from `),He=n("a"),Fo=i("PretrainedConfig"),zo=i(" for more information."),Xo=h(),b(Z.$$.fragment),qt=h(),O=n("h2"),J=n("a"),lt=n("span"),b(_e.$$.fragment),So=h(),ct=n("span"),Do=i("ConvNextV2Model"),Ft=h(),j=n("div"),b(Ce.$$.fragment),Oo=h(),be=n("p"),Lo=i(`The bare ConvNextV2 model outputting raw features without any specific head on top.
This model is a PyTorch `),we=n("a"),Ho=i("torch.nn.Module"),Wo=i(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ro=h(),T=n("div"),b(xe.$$.fragment),Uo=h(),L=n("p"),Go=i("The "),We=n("a"),Bo=i("ConvNextV2Model"),Ko=i(" forward method, overrides the "),dt=n("code"),Zo=i("__call__"),Jo=i(" special method."),Qo=h(),b(Q.$$.fragment),Yo=h(),b(Y.$$.fragment),zt=h(),H=n("h2"),ee=n("a"),ft=n("span"),b($e.$$.fragment),en=h(),pt=n("span"),tn=i("ConvNextV2ForImageClassification"),Xt=h(),k=n("div"),b(Ne.$$.fragment),on=h(),ht=n("p"),nn=i(`ConvNextV2 Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),an=h(),ye=n("p"),sn=i("This model is a PyTorch "),Ve=n("a"),rn=i("torch.nn.Module"),ln=i(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),cn=h(),I=n("div"),b(ke.$$.fragment),dn=h(),W=n("p"),fn=i("The "),Re=n("a"),pn=i("ConvNextV2ForImageClassification"),hn=i(" forward method, overrides the "),mt=n("code"),mn=i("__call__"),un=i(" special method."),gn=h(),b(te.$$.fragment),vn=h(),b(oe.$$.fragment),this.h()},l(e){const d=ua('[data-svelte="svelte-1phssyn"]',document.head);p=a(d,"META",{name:!0,content:!0}),d.forEach(o),C=m(e),v=a(e,"H1",{class:!0});var Ee=s(v);u=a(Ee,"A",{id:!0,class:!0,href:!0});var ut=s(u);_=a(ut,"SPAN",{});var gt=s(_);w(r.$$.fragment,gt),gt.forEach(o),ut.forEach(o),g=m(Ee),P=a(Ee,"SPAN",{});var vt=s(P);Gt=l(vt,"ConvNeXt V2"),vt.forEach(o),Ee.forEach(o),Ct=m(e),F=a(e,"H2",{class:!0});var Te=s(F);R=a(Te,"A",{id:!0,class:!0,href:!0});var xn=s(R);et=a(xn,"SPAN",{});var $n=s(et);w(ie.$$.fragment,$n),$n.forEach(o),xn.forEach(o),Bt=m(Te),tt=a(Te,"SPAN",{});var Nn=s(tt);Kt=l(Nn,"Overview"),Nn.forEach(o),Te.forEach(o),bt=m(e),A=a(e,"P",{});var Ue=s(A);Zt=l(Ue,"The ConvNeXt V2 model was proposed in "),le=a(Ue,"A",{href:!0,rel:!0});var yn=s(le);Jt=l(yn,"ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders"),yn.forEach(o),Qt=l(Ue,` by Sanghyun Woo, Shoubhik Debnath, Ronghang Hu, Xinlei Chen, Zhuang Liu, In So Kweon, Saining Xie.
ConvNeXt V2 is a pure convolutional model (ConvNet), inspired by the design of Vision Transformers, and a successor of `),Pe=a(Ue,"A",{href:!0});var Vn=s(Pe);Yt=l(Vn,"ConvNeXT"),Vn.forEach(o),eo=l(Ue,"."),Ue.forEach(o),wt=m(e),je=a(e,"P",{});var kn=s(je);to=l(kn,"The abstract from the paper is the following:"),kn.forEach(o),xt=m(e),Ae=a(e,"P",{});var En=s(Ae);ot=a(En,"EM",{});var Tn=s(ot);oo=l(Tn,"Driven by improved architectures and better representation learning frameworks, the field of visual recognition has enjoyed rapid modernization and performance boost in the early 2020s. For example, modern ConvNets, represented by ConvNeXt, have demonstrated strong performance in various scenarios. While these models were originally designed for supervised learning with ImageNet labels, they can also potentially benefit from self-supervised learning techniques such as masked  autoencoders (MAE). However, we found that simply combining these two approaches leads to subpar performance. In this paper, we propose a fully convolutional masked autoencoder framework and a new Global Response Normalization (GRN) layer that can be added to the ConvNeXt architecture to enhance inter-channel feature competition. This co-design of self-supervised learning techniques and architectural improvement results in a new model family called ConvNeXt V2, which significantly improves the performance of pure ConvNets on various recognition benchmarks, including ImageNet classification, COCO detection, and ADE20K segmentation. We also provide pre-trained ConvNeXt V2 models of various sizes, ranging from an efficient 3.7M-parameter Atto model with 76.7% top-1 accuracy on ImageNet, to a 650M Huge model that achieves a state-of-the-art 88.9% accuracy using only public training data."),Tn.forEach(o),En.forEach(o),$t=m(e),Me=a(e,"P",{});var In=s(Me);no=l(In,"Tips:"),In.forEach(o),Nt=m(e),qe=a(e,"UL",{});var Pn=s(qe);nt=a(Pn,"LI",{});var jn=s(nt);ao=l(jn,"See the code examples below each model regarding usage."),jn.forEach(o),Pn.forEach(o),yt=m(e),U=a(e,"IMG",{src:!0,alt:!0,width:!0}),Vt=m(e),G=a(e,"SMALL",{});var Dt=s(G);so=l(Dt,"ConvNeXt V2 architecture. Taken from the "),Fe=a(Dt,"A",{href:!0});var An=s(Fe);ro=l(An,"original paper"),An.forEach(o),io=l(Dt,"."),Dt.forEach(o),kt=m(e),M=a(e,"P",{});var Ge=s(M);lo=l(Ge,"This model was contributed by "),ce=a(Ge,"A",{href:!0,rel:!0});var Mn=s(ce);co=l(Mn,"adirik"),Mn.forEach(o),fo=l(Ge,". The original code can be found "),de=a(Ge,"A",{href:!0,rel:!0});var qn=s(de);po=l(qn,"here"),qn.forEach(o),ho=l(Ge,"."),Ge.forEach(o),Et=m(e),z=a(e,"H2",{class:!0});var Ot=s(z);B=a(Ot,"A",{id:!0,class:!0,href:!0});var Fn=s(B);at=a(Fn,"SPAN",{});var zn=s(at);w(fe.$$.fragment,zn),zn.forEach(o),Fn.forEach(o),mo=m(Ot),st=a(Ot,"SPAN",{});var Xn=s(st);uo=l(Xn,"Resources"),Xn.forEach(o),Ot.forEach(o),Tt=m(e),ze=a(e,"P",{});var Sn=s(ze);go=l(Sn,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with ConvNeXt V2."),Sn.forEach(o),It=m(e),w(pe.$$.fragment,e),Pt=m(e),Xe=a(e,"UL",{});var Dn=s(Xe);q=a(Dn,"LI",{});var Ie=s(q);Se=a(Ie,"A",{href:!0});var On=s(Se);vo=l(On,"ConvNextV2ForImageClassification"),On.forEach(o),_o=l(Ie," is supported by this "),he=a(Ie,"A",{href:!0,rel:!0});var Ln=s(he);Co=l(Ln,"example script"),Ln.forEach(o),bo=l(Ie," and "),me=a(Ie,"A",{href:!0,rel:!0});var Hn=s(me);wo=l(Hn,"notebook"),Hn.forEach(o),xo=l(Ie,"."),Ie.forEach(o),Dn.forEach(o),jt=m(e),De=a(e,"P",{});var Wn=s(De);$o=l(Wn,"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."),Wn.forEach(o),At=m(e),X=a(e,"H2",{class:!0});var Lt=s(X);K=a(Lt,"A",{id:!0,class:!0,href:!0});var Rn=s(K);rt=a(Rn,"SPAN",{});var Un=s(rt);w(ue.$$.fragment,Un),Un.forEach(o),Rn.forEach(o),No=m(Lt),it=a(Lt,"SPAN",{});var Gn=s(it);yo=l(Gn,"ConvNextV2Config"),Gn.forEach(o),Lt.forEach(o),Mt=m(e),V=a(e,"DIV",{class:!0});var ne=s(V);w(ge.$$.fragment,ne),Vo=m(ne),S=a(ne,"P",{});var Be=s(S);ko=l(Be,"This is the configuration class to store the configuration of a "),Oe=a(Be,"A",{href:!0});var Bn=s(Oe);Eo=l(Bn,"ConvNextV2Model"),Bn.forEach(o),To=l(Be,`. It is used to instantiate an
ConvNeXTV2 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 ConvNeXTV2
`),ve=a(Be,"A",{href:!0,rel:!0});var Kn=s(ve);Io=l(Kn,"facebook/convnextv2-tiny-1k-224"),Kn.forEach(o),Po=l(Be," architecture."),Be.forEach(o),jo=m(ne),D=a(ne,"P",{});var Ke=s(D);Ao=l(Ke,"Configuration objects inherit from "),Le=a(Ke,"A",{href:!0});var Zn=s(Le);Mo=l(Zn,"PretrainedConfig"),Zn.forEach(o),qo=l(Ke,` and can be used to control the model outputs. Read the
documentation from `),He=a(Ke,"A",{href:!0});var Jn=s(He);Fo=l(Jn,"PretrainedConfig"),Jn.forEach(o),zo=l(Ke," for more information."),Ke.forEach(o),Xo=m(ne),w(Z.$$.fragment,ne),ne.forEach(o),qt=m(e),O=a(e,"H2",{class:!0});var Ht=s(O);J=a(Ht,"A",{id:!0,class:!0,href:!0});var Qn=s(J);lt=a(Qn,"SPAN",{});var Yn=s(lt);w(_e.$$.fragment,Yn),Yn.forEach(o),Qn.forEach(o),So=m(Ht),ct=a(Ht,"SPAN",{});var ea=s(ct);Do=l(ea,"ConvNextV2Model"),ea.forEach(o),Ht.forEach(o),Ft=m(e),j=a(e,"DIV",{class:!0});var Ze=s(j);w(Ce.$$.fragment,Ze),Oo=m(Ze),be=a(Ze,"P",{});var Wt=s(be);Lo=l(Wt,`The bare ConvNextV2 model outputting raw features without any specific head on top.
This model is a PyTorch `),we=a(Wt,"A",{href:!0,rel:!0});var ta=s(we);Ho=l(ta,"torch.nn.Module"),ta.forEach(o),Wo=l(Wt,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Wt.forEach(o),Ro=m(Ze),T=a(Ze,"DIV",{class:!0});var ae=s(T);w(xe.$$.fragment,ae),Uo=m(ae),L=a(ae,"P",{});var Je=s(L);Go=l(Je,"The "),We=a(Je,"A",{href:!0});var oa=s(We);Bo=l(oa,"ConvNextV2Model"),oa.forEach(o),Ko=l(Je," forward method, overrides the "),dt=a(Je,"CODE",{});var na=s(dt);Zo=l(na,"__call__"),na.forEach(o),Jo=l(Je," special method."),Je.forEach(o),Qo=m(ae),w(Q.$$.fragment,ae),Yo=m(ae),w(Y.$$.fragment,ae),ae.forEach(o),Ze.forEach(o),zt=m(e),H=a(e,"H2",{class:!0});var Rt=s(H);ee=a(Rt,"A",{id:!0,class:!0,href:!0});var aa=s(ee);ft=a(aa,"SPAN",{});var sa=s(ft);w($e.$$.fragment,sa),sa.forEach(o),aa.forEach(o),en=m(Rt),pt=a(Rt,"SPAN",{});var ra=s(pt);tn=l(ra,"ConvNextV2ForImageClassification"),ra.forEach(o),Rt.forEach(o),Xt=m(e),k=a(e,"DIV",{class:!0});var se=s(k);w(Ne.$$.fragment,se),on=m(se),ht=a(se,"P",{});var ia=s(ht);nn=l(ia,`ConvNextV2 Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),ia.forEach(o),an=m(se),ye=a(se,"P",{});var Ut=s(ye);sn=l(Ut,"This model is a PyTorch "),Ve=a(Ut,"A",{href:!0,rel:!0});var la=s(Ve);rn=l(la,"torch.nn.Module"),la.forEach(o),ln=l(Ut,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ut.forEach(o),cn=m(se),I=a(se,"DIV",{class:!0});var re=s(I);w(ke.$$.fragment,re),dn=m(re),W=a(re,"P",{});var Qe=s(W);fn=l(Qe,"The "),Re=a(Qe,"A",{href:!0});var ca=s(Re);pn=l(ca,"ConvNextV2ForImageClassification"),ca.forEach(o),hn=l(Qe," forward method, overrides the "),mt=a(Qe,"CODE",{});var da=s(mt);mn=l(da,"__call__"),da.forEach(o),un=l(Qe," special method."),Qe.forEach(o),gn=m(re),w(te.$$.fragment,re),vn=m(re),w(oe.$$.fragment,re),re.forEach(o),se.forEach(o),this.h()},h(){c(p,"name","hf:doc:metadata"),c(p,"content",JSON.stringify(ya)),c(u,"id","convnext-v2"),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","#convnext-v2"),c(v,"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/2301.00808"),c(le,"rel","nofollow"),c(Pe,"href","convnext"),ga(U.src,wn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/convnextv2_architecture.png")||c(U,"src",wn),c(U,"alt","drawing"),c(U,"width","600"),c(Fe,"href","https://arxiv.org/abs/2301.00808"),c(ce,"href","https://huggingface.co/adirik"),c(ce,"rel","nofollow"),c(de,"href","https://github.com/facebookresearch/ConvNeXt-V2"),c(de,"rel","nofollow"),c(B,"id","resources"),c(B,"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(B,"href","#resources"),c(z,"class","relative group"),c(Se,"href","/docs/transformers/v4.29.0/en/model_doc/convnextv2#transformers.ConvNextV2ForImageClassification"),c(he,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification"),c(he,"rel","nofollow"),c(me,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb"),c(me,"rel","nofollow"),c(K,"id","transformers.ConvNextV2Config"),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.ConvNextV2Config"),c(X,"class","relative group"),c(Oe,"href","/docs/transformers/v4.29.0/en/model_doc/convnextv2#transformers.ConvNextV2Model"),c(ve,"href","https://huggingface.co/facebook/convnextv2-tiny-1k-224"),c(ve,"rel","nofollow"),c(Le,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(He,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(V,"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.ConvNextV2Model"),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.ConvNextV2Model"),c(O,"class","relative group"),c(we,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(we,"rel","nofollow"),c(We,"href","/docs/transformers/v4.29.0/en/model_doc/convnextv2#transformers.ConvNextV2Model"),c(T,"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,"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.ConvNextV2ForImageClassification"),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.ConvNextV2ForImageClassification"),c(H,"class","relative group"),c(Ve,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ve,"rel","nofollow"),c(Re,"href","/docs/transformers/v4.29.0/en/model_doc/convnextv2#transformers.ConvNextV2ForImageClassification"),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(k,"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,C,d),f(e,v,d),t(v,u),t(u,_),x(r,_,null),t(v,g),t(v,P),t(P,Gt),f(e,Ct,d),f(e,F,d),t(F,R),t(R,et),x(ie,et,null),t(F,Bt),t(F,tt),t(tt,Kt),f(e,bt,d),f(e,A,d),t(A,Zt),t(A,le),t(le,Jt),t(A,Qt),t(A,Pe),t(Pe,Yt),t(A,eo),f(e,wt,d),f(e,je,d),t(je,to),f(e,xt,d),f(e,Ae,d),t(Ae,ot),t(ot,oo),f(e,$t,d),f(e,Me,d),t(Me,no),f(e,Nt,d),f(e,qe,d),t(qe,nt),t(nt,ao),f(e,yt,d),f(e,U,d),f(e,Vt,d),f(e,G,d),t(G,so),t(G,Fe),t(Fe,ro),t(G,io),f(e,kt,d),f(e,M,d),t(M,lo),t(M,ce),t(ce,co),t(M,fo),t(M,de),t(de,po),t(M,ho),f(e,Et,d),f(e,z,d),t(z,B),t(B,at),x(fe,at,null),t(z,mo),t(z,st),t(st,uo),f(e,Tt,d),f(e,ze,d),t(ze,go),f(e,It,d),x(pe,e,d),f(e,Pt,d),f(e,Xe,d),t(Xe,q),t(q,Se),t(Se,vo),t(q,_o),t(q,he),t(he,Co),t(q,bo),t(q,me),t(me,wo),t(q,xo),f(e,jt,d),f(e,De,d),t(De,$o),f(e,At,d),f(e,X,d),t(X,K),t(K,rt),x(ue,rt,null),t(X,No),t(X,it),t(it,yo),f(e,Mt,d),f(e,V,d),x(ge,V,null),t(V,Vo),t(V,S),t(S,ko),t(S,Oe),t(Oe,Eo),t(S,To),t(S,ve),t(ve,Io),t(S,Po),t(V,jo),t(V,D),t(D,Ao),t(D,Le),t(Le,Mo),t(D,qo),t(D,He),t(He,Fo),t(D,zo),t(V,Xo),x(Z,V,null),f(e,qt,d),f(e,O,d),t(O,J),t(J,lt),x(_e,lt,null),t(O,So),t(O,ct),t(ct,Do),f(e,Ft,d),f(e,j,d),x(Ce,j,null),t(j,Oo),t(j,be),t(be,Lo),t(be,we),t(we,Ho),t(be,Wo),t(j,Ro),t(j,T),x(xe,T,null),t(T,Uo),t(T,L),t(L,Go),t(L,We),t(We,Bo),t(L,Ko),t(L,dt),t(dt,Zo),t(L,Jo),t(T,Qo),x(Q,T,null),t(T,Yo),x(Y,T,null),f(e,zt,d),f(e,H,d),t(H,ee),t(ee,ft),x($e,ft,null),t(H,en),t(H,pt),t(pt,tn),f(e,Xt,d),f(e,k,d),x(Ne,k,null),t(k,on),t(k,ht),t(ht,nn),t(k,an),t(k,ye),t(ye,sn),t(ye,Ve),t(Ve,rn),t(ye,ln),t(k,cn),t(k,I),x(ke,I,null),t(I,dn),t(I,W),t(W,fn),t(W,Re),t(Re,pn),t(W,hn),t(W,mt),t(mt,mn),t(W,un),t(I,gn),x(te,I,null),t(I,vn),x(oe,I,null),St=!0},p(e,[d]){const Ee={};d&2&&(Ee.$$scope={dirty:d,ctx:e}),Z.$set(Ee);const ut={};d&2&&(ut.$$scope={dirty:d,ctx:e}),Q.$set(ut);const gt={};d&2&&(gt.$$scope={dirty:d,ctx:e}),Y.$set(gt);const vt={};d&2&&(vt.$$scope={dirty:d,ctx:e}),te.$set(vt);const Te={};d&2&&(Te.$$scope={dirty:d,ctx:e}),oe.$set(Te)},i(e){St||($(r.$$.fragment,e),$(ie.$$.fragment,e),$(fe.$$.fragment,e),$(pe.$$.fragment,e),$(ue.$$.fragment,e),$(ge.$$.fragment,e),$(Z.$$.fragment,e),$(_e.$$.fragment,e),$(Ce.$$.fragment,e),$(xe.$$.fragment,e),$(Q.$$.fragment,e),$(Y.$$.fragment,e),$($e.$$.fragment,e),$(Ne.$$.fragment,e),$(ke.$$.fragment,e),$(te.$$.fragment,e),$(oe.$$.fragment,e),St=!0)},o(e){N(r.$$.fragment,e),N(ie.$$.fragment,e),N(fe.$$.fragment,e),N(pe.$$.fragment,e),N(ue.$$.fragment,e),N(ge.$$.fragment,e),N(Z.$$.fragment,e),N(_e.$$.fragment,e),N(Ce.$$.fragment,e),N(xe.$$.fragment,e),N(Q.$$.fragment,e),N(Y.$$.fragment,e),N($e.$$.fragment,e),N(Ne.$$.fragment,e),N(ke.$$.fragment,e),N(te.$$.fragment,e),N(oe.$$.fragment,e),St=!1},d(e){o(p),e&&o(C),e&&o(v),y(r),e&&o(Ct),e&&o(F),y(ie),e&&o(bt),e&&o(A),e&&o(wt),e&&o(je),e&&o(xt),e&&o(Ae),e&&o($t),e&&o(Me),e&&o(Nt),e&&o(qe),e&&o(yt),e&&o(U),e&&o(Vt),e&&o(G),e&&o(kt),e&&o(M),e&&o(Et),e&&o(z),y(fe),e&&o(Tt),e&&o(ze),e&&o(It),y(pe,e),e&&o(Pt),e&&o(Xe),e&&o(jt),e&&o(De),e&&o(At),e&&o(X),y(ue),e&&o(Mt),e&&o(V),y(ge),y(Z),e&&o(qt),e&&o(O),y(_e),e&&o(Ft),e&&o(j),y(Ce),y(xe),y(Q),y(Y),e&&o(zt),e&&o(H),y($e),e&&o(Xt),e&&o(k),y(Ne),y(ke),y(te),y(oe)}}}const ya={local:"convnext-v2",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.ConvNextV2Config",title:"ConvNextV2Config"},{local:"transformers.ConvNextV2Model",title:"ConvNextV2Model"},{local:"transformers.ConvNextV2ForImageClassification",title:"ConvNextV2ForImageClassification"}],title:"ConvNeXt V2"};function Va(E){return va(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ma extends pa{constructor(p){super();ha(this,p,Va,Na,ma,{})}}export{Ma as default,ya as metadata};
