import{S as ma,i as ha,s as pa,e as n,k as h,w as y,t as l,M as ua,c as a,d as o,m as p,a as s,x as w,h as i,b as c,N as ga,G as t,g as f,y as C,q as N,o as x,B as $,v as va,L as bn}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 yn}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ke}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 ba(V){let m,b,v,u,_;return u=new yn({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENvbnZOZVhUVjJDb25maWclMkMlMjBDb252TmV4dFYyTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ29udk5lWFRWMiUyMGNvbnZuZXh0djItdGlueS0xay0yMjQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ29udk5lWFRWMkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBjb252bmV4dHYyLXRpbnktMWstMjI0JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBDb252TmV4dFYyTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",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(){m=n("p"),b=l("Example:"),v=h(),y(u.$$.fragment)},l(r){m=a(r,"P",{});var g=s(m);b=i(g,"Example:"),g.forEach(o),v=p(r),w(u.$$.fragment,r)},m(r,g){f(r,m,g),t(m,b),f(r,v,g),C(u,r,g),_=!0},p:bn,i(r){_||(N(u.$$.fragment,r),_=!0)},o(r){x(u.$$.fragment,r),_=!1},d(r){r&&o(m),r&&o(v),$(u,r)}}}function ya(V){let m,b,v,u,_;return{c(){m=n("p"),b=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=n("code"),u=l("Module"),_=l(`
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){m=a(r,"P",{});var g=s(m);b=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a(g,"CODE",{});var I=s(v);u=i(I,"Module"),I.forEach(o),_=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(o)},m(r,g){f(r,m,g),t(m,b),t(m,v),t(v,u),t(m,_)},d(r){r&&o(m)}}}function wa(V){let m,b,v,u,_;return u=new yn({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMENvbnZOZXh0VjJNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZjb252bmV4dHYyLXRpbnktMWstMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwQ29udk5leHRWMk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmNvbnZuZXh0djItdGlueS0xay0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",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(){m=n("p"),b=l("Example:"),v=h(),y(u.$$.fragment)},l(r){m=a(r,"P",{});var g=s(m);b=i(g,"Example:"),g.forEach(o),v=p(r),w(u.$$.fragment,r)},m(r,g){f(r,m,g),t(m,b),f(r,v,g),C(u,r,g),_=!0},p:bn,i(r){_||(N(u.$$.fragment,r),_=!0)},o(r){x(u.$$.fragment,r),_=!1},d(r){r&&o(m),r&&o(v),$(u,r)}}}function Ca(V){let m,b,v,u,_;return{c(){m=n("p"),b=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=n("code"),u=l("Module"),_=l(`
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){m=a(r,"P",{});var g=s(m);b=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a(g,"CODE",{});var I=s(v);u=i(I,"Module"),I.forEach(o),_=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(o)},m(r,g){f(r,m,g),t(m,b),t(m,v),t(v,u),t(m,_)},d(r){r&&o(m)}}}function Na(V){let m,b,v,u,_;return u=new yn({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMENvbnZOZXh0VjJGb3JJbWFnZUNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmNvbnZuZXh0djItdGlueS0xay0yMjQlMjIpJTBBbW9kZWwlMjAlM0QlMjBDb252TmV4dFYyRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZjb252bmV4dHYyLXRpbnktMWstMjI0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjAxMDAwJTIwSW1hZ2VOZXQlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",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(){m=n("p"),b=l("Example:"),v=h(),y(u.$$.fragment)},l(r){m=a(r,"P",{});var g=s(m);b=i(g,"Example:"),g.forEach(o),v=p(r),w(u.$$.fragment,r)},m(r,g){f(r,m,g),t(m,b),f(r,v,g),C(u,r,g),_=!0},p:bn,i(r){_||(N(u.$$.fragment,r),_=!0)},o(r){x(u.$$.fragment,r),_=!1},d(r){r&&o(m),r&&o(v),$(u,r)}}}function xa(V){let m,b,v,u,_,r,g,I,Yt,bt,F,S,et,le,Ht,tt,Qt,yt,J,Lt,ie,Dt,Ot,Ie,Kt,eo,wt,ke,to,Ct,Je,ot,oo,Nt,We,no,xt,Ze,nt,ao,$t,q,wn,Mt,Y,so,Fe,ro,lo,Tt,W,io,ce,co,fo,de,mo,ho,Vt,U,H,at,fe,po,st,uo,Et,Ue,go,jt,me,It,Xe,Z,Ge,vo,_o,he,bo,yo,pe,wo,Co,kt,Pe,No,Jt,X,Q,rt,ue,xo,lt,$o,Wt,M,ge,Mo,G,To,Be,Vo,Eo,ve,jo,Io,ko,P,Jo,ze,Wo,Zo,Re,Fo,Uo,Xo,L,Zt,B,D,it,_e,Go,ct,Po,Ft,k,be,Bo,ye,zo,we,Ro,Ao,So,E,Ce,qo,z,Yo,Ae,Ho,Qo,dt,Lo,Do,Oo,O,Ko,K,Ut,R,ee,ft,Ne,en,mt,tn,Xt,T,xe,on,ht,nn,an,$e,sn,Me,rn,ln,cn,j,Te,dn,A,fn,Se,mn,hn,pt,pn,un,gn,te,vn,oe,Gt;return r=new Ke({}),le=new Ke({}),fe=new Ke({}),me=new _a({props:{pipeline:"image-classification"}}),ue=new Ke({}),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/main/src/transformers/models/convnextv2/configuration_convnextv2.py#L30"}}),L=new _n({props:{anchor:"transformers.ConvNextV2Config.example",$$slots:{default:[ba]},$$scope:{ctx:V}}}),_e=new Ke({}),be=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/main/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/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/convnextv2/modeling_convnextv2.py#L354"}}),Ce=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/main/en/model_doc/convnext#transformers.ConvNextImageProcessor">ConvNextImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitFeatureExtractor.__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/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/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/main/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>
`}}),O=new fa({props:{$$slots:{default:[ya]},$$scope:{ctx:V}}}),K=new _n({props:{anchor:"transformers.ConvNextV2Model.forward.example",$$slots:{default:[wa]},$$scope:{ctx:V}}}),Ne=new Ke({}),xe=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/main/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/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/convnextv2/modeling_convnextv2.py#L421"}}),Te=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/main/en/model_doc/convnext#transformers.ConvNextImageProcessor">ConvNextImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/levit#transformers.LevitFeatureExtractor.__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/main/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/main/src/transformers/models/convnextv2/modeling_convnextv2.py#L436",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/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/main/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:[Ca]},$$scope:{ctx:V}}}),oe=new _n({props:{anchor:"transformers.ConvNextV2ForImageClassification.forward.example",$$slots:{default:[Na]},$$scope:{ctx:V}}}),{c(){m=n("meta"),b=h(),v=n("h1"),u=n("a"),_=n("span"),y(r.$$.fragment),g=h(),I=n("span"),Yt=l("ConvNeXt V2"),bt=h(),F=n("h2"),S=n("a"),et=n("span"),y(le.$$.fragment),Ht=h(),tt=n("span"),Qt=l("Overview"),yt=h(),J=n("p"),Lt=l("The ConvNeXt V2 model was proposed in "),ie=n("a"),Dt=l("ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders"),Ot=l(` 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 `),Ie=n("a"),Kt=l("ConvNeXT"),eo=l("."),wt=h(),ke=n("p"),to=l("The abstract from the paper is the following:"),Ct=h(),Je=n("p"),ot=n("em"),oo=l("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."),Nt=h(),We=n("p"),no=l("Tips:"),xt=h(),Ze=n("ul"),nt=n("li"),ao=l("See the code examples below each model regarding usage."),$t=h(),q=n("img"),Mt=h(),Y=n("small"),so=l("ConvNeXt V2 architecture. Taken from the "),Fe=n("a"),ro=l("original paper"),lo=l("."),Tt=h(),W=n("p"),io=l("This model was contributed by "),ce=n("a"),co=l("adirik"),fo=l(". The original code can be found "),de=n("a"),mo=l("here"),ho=l("."),Vt=h(),U=n("h2"),H=n("a"),at=n("span"),y(fe.$$.fragment),po=h(),st=n("span"),uo=l("Resources"),Et=h(),Ue=n("p"),go=l("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with ConvNeXt V2."),jt=h(),y(me.$$.fragment),It=h(),Xe=n("ul"),Z=n("li"),Ge=n("a"),vo=l("ConvNextV2ForImageClassification"),_o=l(" is supported by this "),he=n("a"),bo=l("example script"),yo=l(" and "),pe=n("a"),wo=l("notebook"),Co=l("."),kt=h(),Pe=n("p"),No=l("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."),Jt=h(),X=n("h2"),Q=n("a"),rt=n("span"),y(ue.$$.fragment),xo=h(),lt=n("span"),$o=l("ConvNextV2Config"),Wt=h(),M=n("div"),y(ge.$$.fragment),Mo=h(),G=n("p"),To=l("This is the configuration class to store the configuration of a "),Be=n("a"),Vo=l("ConvNextV2Model"),Eo=l(`. 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"),jo=l("facebook/convnextv2-tiny-1k-224"),Io=l(" architecture."),ko=h(),P=n("p"),Jo=l("Configuration objects inherit from "),ze=n("a"),Wo=l("PretrainedConfig"),Zo=l(` and can be used to control the model outputs. Read the
documentation from `),Re=n("a"),Fo=l("PretrainedConfig"),Uo=l(" for more information."),Xo=h(),y(L.$$.fragment),Zt=h(),B=n("h2"),D=n("a"),it=n("span"),y(_e.$$.fragment),Go=h(),ct=n("span"),Po=l("ConvNextV2Model"),Ft=h(),k=n("div"),y(be.$$.fragment),Bo=h(),ye=n("p"),zo=l(`The bare ConvNextV2 model outputting raw features without any specific head on top.
This model is a PyTorch `),we=n("a"),Ro=l("torch.nn.Module"),Ao=l(` 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(),E=n("div"),y(Ce.$$.fragment),qo=h(),z=n("p"),Yo=l("The "),Ae=n("a"),Ho=l("ConvNextV2Model"),Qo=l(" forward method, overrides the "),dt=n("code"),Lo=l("__call__"),Do=l(" special method."),Oo=h(),y(O.$$.fragment),Ko=h(),y(K.$$.fragment),Ut=h(),R=n("h2"),ee=n("a"),ft=n("span"),y(Ne.$$.fragment),en=h(),mt=n("span"),tn=l("ConvNextV2ForImageClassification"),Xt=h(),T=n("div"),y(xe.$$.fragment),on=h(),ht=n("p"),nn=l(`ConvNextV2 Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),an=h(),$e=n("p"),sn=l("This model is a PyTorch "),Me=n("a"),rn=l("torch.nn.Module"),ln=l(` 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(),j=n("div"),y(Te.$$.fragment),dn=h(),A=n("p"),fn=l("The "),Se=n("a"),mn=l("ConvNextV2ForImageClassification"),hn=l(" forward method, overrides the "),pt=n("code"),pn=l("__call__"),un=l(" special method."),gn=h(),y(te.$$.fragment),vn=h(),y(oe.$$.fragment),this.h()},l(e){const d=ua('[data-svelte="svelte-1phssyn"]',document.head);m=a(d,"META",{name:!0,content:!0}),d.forEach(o),b=p(e),v=a(e,"H1",{class:!0});var Ve=s(v);u=a(Ve,"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=p(Ve),I=a(Ve,"SPAN",{});var vt=s(I);Yt=i(vt,"ConvNeXt V2"),vt.forEach(o),Ve.forEach(o),bt=p(e),F=a(e,"H2",{class:!0});var Ee=s(F);S=a(Ee,"A",{id:!0,class:!0,href:!0});var Cn=s(S);et=a(Cn,"SPAN",{});var Nn=s(et);w(le.$$.fragment,Nn),Nn.forEach(o),Cn.forEach(o),Ht=p(Ee),tt=a(Ee,"SPAN",{});var xn=s(tt);Qt=i(xn,"Overview"),xn.forEach(o),Ee.forEach(o),yt=p(e),J=a(e,"P",{});var qe=s(J);Lt=i(qe,"The ConvNeXt V2 model was proposed in "),ie=a(qe,"A",{href:!0,rel:!0});var $n=s(ie);Dt=i($n,"ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders"),$n.forEach(o),Ot=i(qe,` 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 `),Ie=a(qe,"A",{href:!0});var Mn=s(Ie);Kt=i(Mn,"ConvNeXT"),Mn.forEach(o),eo=i(qe,"."),qe.forEach(o),wt=p(e),ke=a(e,"P",{});var Tn=s(ke);to=i(Tn,"The abstract from the paper is the following:"),Tn.forEach(o),Ct=p(e),Je=a(e,"P",{});var Vn=s(Je);ot=a(Vn,"EM",{});var En=s(ot);oo=i(En,"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."),En.forEach(o),Vn.forEach(o),Nt=p(e),We=a(e,"P",{});var jn=s(We);no=i(jn,"Tips:"),jn.forEach(o),xt=p(e),Ze=a(e,"UL",{});var In=s(Ze);nt=a(In,"LI",{});var kn=s(nt);ao=i(kn,"See the code examples below each model regarding usage."),kn.forEach(o),In.forEach(o),$t=p(e),q=a(e,"IMG",{src:!0,alt:!0,width:!0}),Mt=p(e),Y=a(e,"SMALL",{});var Pt=s(Y);so=i(Pt,"ConvNeXt V2 architecture. Taken from the "),Fe=a(Pt,"A",{href:!0});var Jn=s(Fe);ro=i(Jn,"original paper"),Jn.forEach(o),lo=i(Pt,"."),Pt.forEach(o),Tt=p(e),W=a(e,"P",{});var Ye=s(W);io=i(Ye,"This model was contributed by "),ce=a(Ye,"A",{href:!0,rel:!0});var Wn=s(ce);co=i(Wn,"adirik"),Wn.forEach(o),fo=i(Ye,". The original code can be found "),de=a(Ye,"A",{href:!0,rel:!0});var Zn=s(de);mo=i(Zn,"here"),Zn.forEach(o),ho=i(Ye,"."),Ye.forEach(o),Vt=p(e),U=a(e,"H2",{class:!0});var Bt=s(U);H=a(Bt,"A",{id:!0,class:!0,href:!0});var Fn=s(H);at=a(Fn,"SPAN",{});var Un=s(at);w(fe.$$.fragment,Un),Un.forEach(o),Fn.forEach(o),po=p(Bt),st=a(Bt,"SPAN",{});var Xn=s(st);uo=i(Xn,"Resources"),Xn.forEach(o),Bt.forEach(o),Et=p(e),Ue=a(e,"P",{});var Gn=s(Ue);go=i(Gn,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with ConvNeXt V2."),Gn.forEach(o),jt=p(e),w(me.$$.fragment,e),It=p(e),Xe=a(e,"UL",{});var Pn=s(Xe);Z=a(Pn,"LI",{});var je=s(Z);Ge=a(je,"A",{href:!0});var Bn=s(Ge);vo=i(Bn,"ConvNextV2ForImageClassification"),Bn.forEach(o),_o=i(je," is supported by this "),he=a(je,"A",{href:!0,rel:!0});var zn=s(he);bo=i(zn,"example script"),zn.forEach(o),yo=i(je," and "),pe=a(je,"A",{href:!0,rel:!0});var Rn=s(pe);wo=i(Rn,"notebook"),Rn.forEach(o),Co=i(je,"."),je.forEach(o),Pn.forEach(o),kt=p(e),Pe=a(e,"P",{});var An=s(Pe);No=i(An,"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."),An.forEach(o),Jt=p(e),X=a(e,"H2",{class:!0});var zt=s(X);Q=a(zt,"A",{id:!0,class:!0,href:!0});var Sn=s(Q);rt=a(Sn,"SPAN",{});var qn=s(rt);w(ue.$$.fragment,qn),qn.forEach(o),Sn.forEach(o),xo=p(zt),lt=a(zt,"SPAN",{});var Yn=s(lt);$o=i(Yn,"ConvNextV2Config"),Yn.forEach(o),zt.forEach(o),Wt=p(e),M=a(e,"DIV",{class:!0});var ne=s(M);w(ge.$$.fragment,ne),Mo=p(ne),G=a(ne,"P",{});var He=s(G);To=i(He,"This is the configuration class to store the configuration of a "),Be=a(He,"A",{href:!0});var Hn=s(Be);Vo=i(Hn,"ConvNextV2Model"),Hn.forEach(o),Eo=i(He,`. 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(He,"A",{href:!0,rel:!0});var Qn=s(ve);jo=i(Qn,"facebook/convnextv2-tiny-1k-224"),Qn.forEach(o),Io=i(He," architecture."),He.forEach(o),ko=p(ne),P=a(ne,"P",{});var Qe=s(P);Jo=i(Qe,"Configuration objects inherit from "),ze=a(Qe,"A",{href:!0});var Ln=s(ze);Wo=i(Ln,"PretrainedConfig"),Ln.forEach(o),Zo=i(Qe,` and can be used to control the model outputs. Read the
documentation from `),Re=a(Qe,"A",{href:!0});var Dn=s(Re);Fo=i(Dn,"PretrainedConfig"),Dn.forEach(o),Uo=i(Qe," for more information."),Qe.forEach(o),Xo=p(ne),w(L.$$.fragment,ne),ne.forEach(o),Zt=p(e),B=a(e,"H2",{class:!0});var Rt=s(B);D=a(Rt,"A",{id:!0,class:!0,href:!0});var On=s(D);it=a(On,"SPAN",{});var Kn=s(it);w(_e.$$.fragment,Kn),Kn.forEach(o),On.forEach(o),Go=p(Rt),ct=a(Rt,"SPAN",{});var ea=s(ct);Po=i(ea,"ConvNextV2Model"),ea.forEach(o),Rt.forEach(o),Ft=p(e),k=a(e,"DIV",{class:!0});var Le=s(k);w(be.$$.fragment,Le),Bo=p(Le),ye=a(Le,"P",{});var At=s(ye);zo=i(At,`The bare ConvNextV2 model outputting raw features without any specific head on top.
This model is a PyTorch `),we=a(At,"A",{href:!0,rel:!0});var ta=s(we);Ro=i(ta,"torch.nn.Module"),ta.forEach(o),Ao=i(At,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),At.forEach(o),So=p(Le),E=a(Le,"DIV",{class:!0});var ae=s(E);w(Ce.$$.fragment,ae),qo=p(ae),z=a(ae,"P",{});var De=s(z);Yo=i(De,"The "),Ae=a(De,"A",{href:!0});var oa=s(Ae);Ho=i(oa,"ConvNextV2Model"),oa.forEach(o),Qo=i(De," forward method, overrides the "),dt=a(De,"CODE",{});var na=s(dt);Lo=i(na,"__call__"),na.forEach(o),Do=i(De," special method."),De.forEach(o),Oo=p(ae),w(O.$$.fragment,ae),Ko=p(ae),w(K.$$.fragment,ae),ae.forEach(o),Le.forEach(o),Ut=p(e),R=a(e,"H2",{class:!0});var St=s(R);ee=a(St,"A",{id:!0,class:!0,href:!0});var aa=s(ee);ft=a(aa,"SPAN",{});var sa=s(ft);w(Ne.$$.fragment,sa),sa.forEach(o),aa.forEach(o),en=p(St),mt=a(St,"SPAN",{});var ra=s(mt);tn=i(ra,"ConvNextV2ForImageClassification"),ra.forEach(o),St.forEach(o),Xt=p(e),T=a(e,"DIV",{class:!0});var se=s(T);w(xe.$$.fragment,se),on=p(se),ht=a(se,"P",{});var la=s(ht);nn=i(la,`ConvNextV2 Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),la.forEach(o),an=p(se),$e=a(se,"P",{});var qt=s($e);sn=i(qt,"This model is a PyTorch "),Me=a(qt,"A",{href:!0,rel:!0});var ia=s(Me);rn=i(ia,"torch.nn.Module"),ia.forEach(o),ln=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(o),cn=p(se),j=a(se,"DIV",{class:!0});var re=s(j);w(Te.$$.fragment,re),dn=p(re),A=a(re,"P",{});var Oe=s(A);fn=i(Oe,"The "),Se=a(Oe,"A",{href:!0});var ca=s(Se);mn=i(ca,"ConvNextV2ForImageClassification"),ca.forEach(o),hn=i(Oe," forward method, overrides the "),pt=a(Oe,"CODE",{});var da=s(pt);pn=i(da,"__call__"),da.forEach(o),un=i(Oe," special method."),Oe.forEach(o),gn=p(re),w(te.$$.fragment,re),vn=p(re),w(oe.$$.fragment,re),re.forEach(o),se.forEach(o),this.h()},h(){c(m,"name","hf:doc:metadata"),c(m,"content",JSON.stringify($a)),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(S,"id","overview"),c(S,"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(S,"href","#overview"),c(F,"class","relative group"),c(ie,"href","https://arxiv.org/abs/2301.00808"),c(ie,"rel","nofollow"),c(Ie,"href","convnext"),ga(q.src,wn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/convnextv2_architecture.png")||c(q,"src",wn),c(q,"alt","drawing"),c(q,"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(H,"id","resources"),c(H,"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(H,"href","#resources"),c(U,"class","relative group"),c(Ge,"href","/docs/transformers/main/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(pe,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb"),c(pe,"rel","nofollow"),c(Q,"id","transformers.ConvNextV2Config"),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.ConvNextV2Config"),c(X,"class","relative group"),c(Be,"href","/docs/transformers/main/en/model_doc/convnextv2#transformers.ConvNextV2Model"),c(ve,"href","https://huggingface.co/facebook/convnextv2-tiny-1k-224"),c(ve,"rel","nofollow"),c(ze,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),c(Re,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),c(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(D,"id","transformers.ConvNextV2Model"),c(D,"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(D,"href","#transformers.ConvNextV2Model"),c(B,"class","relative group"),c(we,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(we,"rel","nofollow"),c(Ae,"href","/docs/transformers/main/en/model_doc/convnextv2#transformers.ConvNextV2Model"),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(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(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(R,"class","relative group"),c(Me,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Me,"rel","nofollow"),c(Se,"href","/docs/transformers/main/en/model_doc/convnextv2#transformers.ConvNextV2ForImageClassification"),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(T,"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,m),f(e,b,d),f(e,v,d),t(v,u),t(u,_),C(r,_,null),t(v,g),t(v,I),t(I,Yt),f(e,bt,d),f(e,F,d),t(F,S),t(S,et),C(le,et,null),t(F,Ht),t(F,tt),t(tt,Qt),f(e,yt,d),f(e,J,d),t(J,Lt),t(J,ie),t(ie,Dt),t(J,Ot),t(J,Ie),t(Ie,Kt),t(J,eo),f(e,wt,d),f(e,ke,d),t(ke,to),f(e,Ct,d),f(e,Je,d),t(Je,ot),t(ot,oo),f(e,Nt,d),f(e,We,d),t(We,no),f(e,xt,d),f(e,Ze,d),t(Ze,nt),t(nt,ao),f(e,$t,d),f(e,q,d),f(e,Mt,d),f(e,Y,d),t(Y,so),t(Y,Fe),t(Fe,ro),t(Y,lo),f(e,Tt,d),f(e,W,d),t(W,io),t(W,ce),t(ce,co),t(W,fo),t(W,de),t(de,mo),t(W,ho),f(e,Vt,d),f(e,U,d),t(U,H),t(H,at),C(fe,at,null),t(U,po),t(U,st),t(st,uo),f(e,Et,d),f(e,Ue,d),t(Ue,go),f(e,jt,d),C(me,e,d),f(e,It,d),f(e,Xe,d),t(Xe,Z),t(Z,Ge),t(Ge,vo),t(Z,_o),t(Z,he),t(he,bo),t(Z,yo),t(Z,pe),t(pe,wo),t(Z,Co),f(e,kt,d),f(e,Pe,d),t(Pe,No),f(e,Jt,d),f(e,X,d),t(X,Q),t(Q,rt),C(ue,rt,null),t(X,xo),t(X,lt),t(lt,$o),f(e,Wt,d),f(e,M,d),C(ge,M,null),t(M,Mo),t(M,G),t(G,To),t(G,Be),t(Be,Vo),t(G,Eo),t(G,ve),t(ve,jo),t(G,Io),t(M,ko),t(M,P),t(P,Jo),t(P,ze),t(ze,Wo),t(P,Zo),t(P,Re),t(Re,Fo),t(P,Uo),t(M,Xo),C(L,M,null),f(e,Zt,d),f(e,B,d),t(B,D),t(D,it),C(_e,it,null),t(B,Go),t(B,ct),t(ct,Po),f(e,Ft,d),f(e,k,d),C(be,k,null),t(k,Bo),t(k,ye),t(ye,zo),t(ye,we),t(we,Ro),t(ye,Ao),t(k,So),t(k,E),C(Ce,E,null),t(E,qo),t(E,z),t(z,Yo),t(z,Ae),t(Ae,Ho),t(z,Qo),t(z,dt),t(dt,Lo),t(z,Do),t(E,Oo),C(O,E,null),t(E,Ko),C(K,E,null),f(e,Ut,d),f(e,R,d),t(R,ee),t(ee,ft),C(Ne,ft,null),t(R,en),t(R,mt),t(mt,tn),f(e,Xt,d),f(e,T,d),C(xe,T,null),t(T,on),t(T,ht),t(ht,nn),t(T,an),t(T,$e),t($e,sn),t($e,Me),t(Me,rn),t($e,ln),t(T,cn),t(T,j),C(Te,j,null),t(j,dn),t(j,A),t(A,fn),t(A,Se),t(Se,mn),t(A,hn),t(A,pt),t(pt,pn),t(A,un),t(j,gn),C(te,j,null),t(j,vn),C(oe,j,null),Gt=!0},p(e,[d]){const Ve={};d&2&&(Ve.$$scope={dirty:d,ctx:e}),L.$set(Ve);const ut={};d&2&&(ut.$$scope={dirty:d,ctx:e}),O.$set(ut);const gt={};d&2&&(gt.$$scope={dirty:d,ctx:e}),K.$set(gt);const vt={};d&2&&(vt.$$scope={dirty:d,ctx:e}),te.$set(vt);const Ee={};d&2&&(Ee.$$scope={dirty:d,ctx:e}),oe.$set(Ee)},i(e){Gt||(N(r.$$.fragment,e),N(le.$$.fragment,e),N(fe.$$.fragment,e),N(me.$$.fragment,e),N(ue.$$.fragment,e),N(ge.$$.fragment,e),N(L.$$.fragment,e),N(_e.$$.fragment,e),N(be.$$.fragment,e),N(Ce.$$.fragment,e),N(O.$$.fragment,e),N(K.$$.fragment,e),N(Ne.$$.fragment,e),N(xe.$$.fragment,e),N(Te.$$.fragment,e),N(te.$$.fragment,e),N(oe.$$.fragment,e),Gt=!0)},o(e){x(r.$$.fragment,e),x(le.$$.fragment,e),x(fe.$$.fragment,e),x(me.$$.fragment,e),x(ue.$$.fragment,e),x(ge.$$.fragment,e),x(L.$$.fragment,e),x(_e.$$.fragment,e),x(be.$$.fragment,e),x(Ce.$$.fragment,e),x(O.$$.fragment,e),x(K.$$.fragment,e),x(Ne.$$.fragment,e),x(xe.$$.fragment,e),x(Te.$$.fragment,e),x(te.$$.fragment,e),x(oe.$$.fragment,e),Gt=!1},d(e){o(m),e&&o(b),e&&o(v),$(r),e&&o(bt),e&&o(F),$(le),e&&o(yt),e&&o(J),e&&o(wt),e&&o(ke),e&&o(Ct),e&&o(Je),e&&o(Nt),e&&o(We),e&&o(xt),e&&o(Ze),e&&o($t),e&&o(q),e&&o(Mt),e&&o(Y),e&&o(Tt),e&&o(W),e&&o(Vt),e&&o(U),$(fe),e&&o(Et),e&&o(Ue),e&&o(jt),$(me,e),e&&o(It),e&&o(Xe),e&&o(kt),e&&o(Pe),e&&o(Jt),e&&o(X),$(ue),e&&o(Wt),e&&o(M),$(ge),$(L),e&&o(Zt),e&&o(B),$(_e),e&&o(Ft),e&&o(k),$(be),$(Ce),$(O),$(K),e&&o(Ut),e&&o(R),$(Ne),e&&o(Xt),e&&o(T),$(xe),$(Te),$(te),$(oe)}}}const $a={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 Ma(V){return va(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Wa extends ma{constructor(m){super();ha(this,m,Ma,xa,pa,{})}}export{Wa as default,$a as metadata};
