import{S as hr,i as mr,s as ur,e as a,k as f,w as C,t as n,M as gr,c as r,d as t,m as h,a as i,x as b,h as s,b as p,N as _r,G as e,g as m,y as $,q as T,o as N,B as E,v as vr,L as an}from"../../chunks/vendor-hf-doc-builder.js";import{T as Mo}from"../../chunks/Tip-hf-doc-builder.js";import{D as Qe}from"../../chunks/Docstring-hf-doc-builder.js";import{C as rn}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Dt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as sn}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function xr(M){let d,w,g,u,x;return u=new rn({props:{code:`from transformers import ConvNextConfig, ConvNextModel

# Initializing a ConvNext convnext-tiny-224 style configuration
configuration = ConvNextConfig()

# Initializing a model (with random weights) from the convnext-tiny-224 style configuration
model = ConvNextModel(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> ConvNextConfig, ConvNextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ConvNext convnext-tiny-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ConvNextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the convnext-tiny-224 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvNextModel(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(){d=a("p"),w=n("Example:"),g=f(),C(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);w=s(c,"Example:"),c.forEach(t),g=h(l),b(u.$$.fragment,l)},m(l,c){m(l,d,c),e(d,w),m(l,g,c),$(u,l,c),x=!0},p:an,i(l){x||(T(u.$$.fragment,l),x=!0)},o(l){N(u.$$.fragment,l),x=!1},d(l){l&&t(d),l&&t(g),E(u,l)}}}function wr(M){let d,w,g,u,x;return{c(){d=a("p"),w=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),u=n("Module"),x=n(`
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){d=r(l,"P",{});var c=i(d);w=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(c,"CODE",{});var I=i(g);u=s(I,"Module"),I.forEach(t),x=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){m(l,d,c),e(d,w),e(d,g),e(g,u),e(d,x)},d(l){l&&t(d)}}}function yr(M){let d,w,g,u,x;return u=new rn({props:{code:`from transformers import ConvNextFeatureExtractor, ConvNextModel
import torch
from datasets import load_dataset

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

feature_extractor = ConvNextFeatureExtractor.from_pretrained("facebook/convnext-tiny-224")
model = ConvNextModel.from_pretrained("facebook/convnext-tiny-224")

inputs = feature_extractor(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> ConvNextFeatureExtractor, ConvNextModel
<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>feature_extractor = ConvNextFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/convnext-tiny-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvNextModel.from_pretrained(<span class="hljs-string">&quot;facebook/convnext-tiny-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(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(){d=a("p"),w=n("Example:"),g=f(),C(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);w=s(c,"Example:"),c.forEach(t),g=h(l),b(u.$$.fragment,l)},m(l,c){m(l,d,c),e(d,w),m(l,g,c),$(u,l,c),x=!0},p:an,i(l){x||(T(u.$$.fragment,l),x=!0)},o(l){N(u.$$.fragment,l),x=!1},d(l){l&&t(d),l&&t(g),E(u,l)}}}function Cr(M){let d,w,g,u,x;return{c(){d=a("p"),w=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),u=n("Module"),x=n(`
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){d=r(l,"P",{});var c=i(d);w=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(c,"CODE",{});var I=i(g);u=s(I,"Module"),I.forEach(t),x=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){m(l,d,c),e(d,w),e(d,g),e(g,u),e(d,x)},d(l){l&&t(d)}}}function br(M){let d,w,g,u,x;return u=new rn({props:{code:`from transformers import ConvNextFeatureExtractor, ConvNextForImageClassification
import torch
from datasets import load_dataset

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

feature_extractor = ConvNextFeatureExtractor.from_pretrained("facebook/convnext-tiny-224")
model = ConvNextForImageClassification.from_pretrained("facebook/convnext-tiny-224")

inputs = feature_extractor(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> ConvNextFeatureExtractor, ConvNextForImageClassification
<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>feature_extractor = ConvNextFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/convnext-tiny-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvNextForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/convnext-tiny-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(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(){d=a("p"),w=n("Example:"),g=f(),C(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);w=s(c,"Example:"),c.forEach(t),g=h(l),b(u.$$.fragment,l)},m(l,c){m(l,d,c),e(d,w),m(l,g,c),$(u,l,c),x=!0},p:an,i(l){x||(T(u.$$.fragment,l),x=!0)},o(l){N(u.$$.fragment,l),x=!1},d(l){l&&t(d),l&&t(g),E(u,l)}}}function $r(M){let d,w,g,u,x,l,c,I,Pe,we,z,Y,te,y,Ae,B,qe,ye,L,ze,oe,ne,Oe,Ce,W,De,be,X,ue,Le,fe,j,O,$e,U,ge,Se,J,Q,Ze,q,ee,se,he,Re,ae,Te,P,H,re,ie,Ke,V,D,We,A,Xe,Ue;return{c(){d=a("p"),w=n("TensorFlow models and layers in "),g=a("code"),u=n("transformers"),x=n(" accept two formats as input:"),l=f(),c=a("ul"),I=a("li"),Pe=n("having all inputs as keyword arguments (like PyTorch models), or"),we=f(),z=a("li"),Y=n("having all inputs as a list, tuple or dict in the first positional argument."),te=f(),y=a("p"),Ae=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=a("code"),qe=n("model.fit()"),ye=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=a("code"),ze=n("model.fit()"),oe=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),ne=a("code"),Oe=n("fit()"),Ce=n(" and "),W=a("code"),De=n("predict()"),be=n(`, such as when creating your own layers or models with
the Keras `),X=a("code"),ue=n("Functional"),Le=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),fe=f(),j=a("ul"),O=a("li"),$e=n("a single Tensor with "),U=a("code"),ge=n("pixel_values"),Se=n(" only and nothing else: "),J=a("code"),Q=n("model(pixel_values)"),Ze=f(),q=a("li"),ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),se=a("code"),he=n("model([pixel_values, attention_mask])"),Re=n(" or "),ae=a("code"),Te=n("model([pixel_values, attention_mask, token_type_ids])"),P=f(),H=a("li"),re=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ie=a("code"),Ke=n('model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),V=f(),D=a("p"),We=n(`Note that when creating models and layers with
`),A=a("a"),Xe=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){d=r(v,"P",{});var k=i(d);w=s(k,"TensorFlow models and layers in "),g=r(k,"CODE",{});var et=i(g);u=s(et,"transformers"),et.forEach(t),x=s(k," accept two formats as input:"),k.forEach(t),l=h(v),c=r(v,"UL",{});var G=i(c);I=r(G,"LI",{});var tt=i(I);Pe=s(tt,"having all inputs as keyword arguments (like PyTorch models), or"),tt.forEach(t),we=h(G),z=r(G,"LI",{});var ot=i(z);Y=s(ot,"having all inputs as a list, tuple or dict in the first positional argument."),ot.forEach(t),G.forEach(t),te=h(v),y=r(v,"P",{});var F=i(y);Ae=s(F,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=r(F,"CODE",{});var le=i(B);qe=s(le,"model.fit()"),le.forEach(t),ye=s(F,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=r(F,"CODE",{});var me=i(L);ze=s(me,"model.fit()"),me.forEach(t),oe=s(F,` supports! If, however, you want to use the second
format outside of Keras methods like `),ne=r(F,"CODE",{});var Be=i(ne);Oe=s(Be,"fit()"),Be.forEach(t),Ce=s(F," and "),W=r(F,"CODE",{});var _e=i(W);De=s(_e,"predict()"),_e.forEach(t),be=s(F,`, such as when creating your own layers or models with
the Keras `),X=r(F,"CODE",{});var nt=i(X);ue=s(nt,"Functional"),nt.forEach(t),Le=s(F,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),F.forEach(t),fe=h(v),j=r(v,"UL",{});var S=i(j);O=r(S,"LI",{});var de=i(O);$e=s(de,"a single Tensor with "),U=r(de,"CODE",{});var Ye=i(U);ge=s(Ye,"pixel_values"),Ye.forEach(t),Se=s(de," only and nothing else: "),J=r(de,"CODE",{});var R=i(J);Q=s(R,"model(pixel_values)"),R.forEach(t),de.forEach(t),Ze=h(S),q=r(S,"LI",{});var K=i(q);ee=s(K,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),se=r(K,"CODE",{});var st=i(se);he=s(st,"model([pixel_values, attention_mask])"),st.forEach(t),Re=s(K," or "),ae=r(K,"CODE",{});var ce=i(ae);Te=s(ce,"model([pixel_values, attention_mask, token_type_ids])"),ce.forEach(t),K.forEach(t),P=h(S),H=r(S,"LI",{});var He=i(H);re=s(He,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ie=r(He,"CODE",{});var Ne=i(ie);Ke=s(Ne,'model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),Ne.forEach(t),He.forEach(t),S.forEach(t),V=h(v),D=r(v,"P",{});var ve=i(D);We=s(ve,`Note that when creating models and layers with
`),A=r(ve,"A",{href:!0,rel:!0});var at=i(A);Xe=s(at,"subclassing"),at.forEach(t),Ue=s(ve,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ve.forEach(t),this.h()},h(){p(A,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),p(A,"rel","nofollow")},m(v,k){m(v,d,k),e(d,w),e(d,g),e(g,u),e(d,x),m(v,l,k),m(v,c,k),e(c,I),e(I,Pe),e(c,we),e(c,z),e(z,Y),m(v,te,k),m(v,y,k),e(y,Ae),e(y,B),e(B,qe),e(y,ye),e(y,L),e(L,ze),e(y,oe),e(y,ne),e(ne,Oe),e(y,Ce),e(y,W),e(W,De),e(y,be),e(y,X),e(X,ue),e(y,Le),m(v,fe,k),m(v,j,k),e(j,O),e(O,$e),e(O,U),e(U,ge),e(O,Se),e(O,J),e(J,Q),e(j,Ze),e(j,q),e(q,ee),e(q,se),e(se,he),e(q,Re),e(q,ae),e(ae,Te),e(j,P),e(j,H),e(H,re),e(H,ie),e(ie,Ke),m(v,V,k),m(v,D,k),e(D,We),e(D,A),e(A,Xe),e(D,Ue)},d(v){v&&t(d),v&&t(l),v&&t(c),v&&t(te),v&&t(y),v&&t(fe),v&&t(j),v&&t(V),v&&t(D)}}}function Tr(M){let d,w,g,u,x;return{c(){d=a("p"),w=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),u=n("Module"),x=n(`
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){d=r(l,"P",{});var c=i(d);w=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(c,"CODE",{});var I=i(g);u=s(I,"Module"),I.forEach(t),x=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){m(l,d,c),e(d,w),e(d,g),e(g,u),e(d,x)},d(l){l&&t(d)}}}function Nr(M){let d,w,g,u,x;return u=new rn({props:{code:`from transformers import ConvNextFeatureExtractor, TFConvNextModel
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

feature_extractor = ConvNextFeatureExtractor.from_pretrained("facebook/convnext-tiny-224")
model = TFConvNextModel.from_pretrained("facebook/convnext-tiny-224")

inputs = feature_extractor(images=image, return_tensors="tf")
outputs = model(**inputs)
last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ConvNextFeatureExtractor, TFConvNextModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = ConvNextFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/convnext-tiny-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFConvNextModel.from_pretrained(<span class="hljs-string">&quot;facebook/convnext-tiny-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=a("p"),w=n("Examples:"),g=f(),C(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);w=s(c,"Examples:"),c.forEach(t),g=h(l),b(u.$$.fragment,l)},m(l,c){m(l,d,c),e(d,w),m(l,g,c),$(u,l,c),x=!0},p:an,i(l){x||(T(u.$$.fragment,l),x=!0)},o(l){N(u.$$.fragment,l),x=!1},d(l){l&&t(d),l&&t(g),E(u,l)}}}function Er(M){let d,w,g,u,x,l,c,I,Pe,we,z,Y,te,y,Ae,B,qe,ye,L,ze,oe,ne,Oe,Ce,W,De,be,X,ue,Le,fe,j,O,$e,U,ge,Se,J,Q,Ze,q,ee,se,he,Re,ae,Te,P,H,re,ie,Ke,V,D,We,A,Xe,Ue;return{c(){d=a("p"),w=n("TensorFlow models and layers in "),g=a("code"),u=n("transformers"),x=n(" accept two formats as input:"),l=f(),c=a("ul"),I=a("li"),Pe=n("having all inputs as keyword arguments (like PyTorch models), or"),we=f(),z=a("li"),Y=n("having all inputs as a list, tuple or dict in the first positional argument."),te=f(),y=a("p"),Ae=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=a("code"),qe=n("model.fit()"),ye=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=a("code"),ze=n("model.fit()"),oe=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),ne=a("code"),Oe=n("fit()"),Ce=n(" and "),W=a("code"),De=n("predict()"),be=n(`, such as when creating your own layers or models with
the Keras `),X=a("code"),ue=n("Functional"),Le=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),fe=f(),j=a("ul"),O=a("li"),$e=n("a single Tensor with "),U=a("code"),ge=n("pixel_values"),Se=n(" only and nothing else: "),J=a("code"),Q=n("model(pixel_values)"),Ze=f(),q=a("li"),ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),se=a("code"),he=n("model([pixel_values, attention_mask])"),Re=n(" or "),ae=a("code"),Te=n("model([pixel_values, attention_mask, token_type_ids])"),P=f(),H=a("li"),re=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ie=a("code"),Ke=n('model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),V=f(),D=a("p"),We=n(`Note that when creating models and layers with
`),A=a("a"),Xe=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(v){d=r(v,"P",{});var k=i(d);w=s(k,"TensorFlow models and layers in "),g=r(k,"CODE",{});var et=i(g);u=s(et,"transformers"),et.forEach(t),x=s(k," accept two formats as input:"),k.forEach(t),l=h(v),c=r(v,"UL",{});var G=i(c);I=r(G,"LI",{});var tt=i(I);Pe=s(tt,"having all inputs as keyword arguments (like PyTorch models), or"),tt.forEach(t),we=h(G),z=r(G,"LI",{});var ot=i(z);Y=s(ot,"having all inputs as a list, tuple or dict in the first positional argument."),ot.forEach(t),G.forEach(t),te=h(v),y=r(v,"P",{});var F=i(y);Ae=s(F,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=r(F,"CODE",{});var le=i(B);qe=s(le,"model.fit()"),le.forEach(t),ye=s(F,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),L=r(F,"CODE",{});var me=i(L);ze=s(me,"model.fit()"),me.forEach(t),oe=s(F,` supports! If, however, you want to use the second
format outside of Keras methods like `),ne=r(F,"CODE",{});var Be=i(ne);Oe=s(Be,"fit()"),Be.forEach(t),Ce=s(F," and "),W=r(F,"CODE",{});var _e=i(W);De=s(_e,"predict()"),_e.forEach(t),be=s(F,`, such as when creating your own layers or models with
the Keras `),X=r(F,"CODE",{});var nt=i(X);ue=s(nt,"Functional"),nt.forEach(t),Le=s(F,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),F.forEach(t),fe=h(v),j=r(v,"UL",{});var S=i(j);O=r(S,"LI",{});var de=i(O);$e=s(de,"a single Tensor with "),U=r(de,"CODE",{});var Ye=i(U);ge=s(Ye,"pixel_values"),Ye.forEach(t),Se=s(de," only and nothing else: "),J=r(de,"CODE",{});var R=i(J);Q=s(R,"model(pixel_values)"),R.forEach(t),de.forEach(t),Ze=h(S),q=r(S,"LI",{});var K=i(q);ee=s(K,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),se=r(K,"CODE",{});var st=i(se);he=s(st,"model([pixel_values, attention_mask])"),st.forEach(t),Re=s(K," or "),ae=r(K,"CODE",{});var ce=i(ae);Te=s(ce,"model([pixel_values, attention_mask, token_type_ids])"),ce.forEach(t),K.forEach(t),P=h(S),H=r(S,"LI",{});var He=i(H);re=s(He,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ie=r(He,"CODE",{});var Ne=i(ie);Ke=s(Ne,'model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),Ne.forEach(t),He.forEach(t),S.forEach(t),V=h(v),D=r(v,"P",{});var ve=i(D);We=s(ve,`Note that when creating models and layers with
`),A=r(ve,"A",{href:!0,rel:!0});var at=i(A);Xe=s(at,"subclassing"),at.forEach(t),Ue=s(ve,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ve.forEach(t),this.h()},h(){p(A,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),p(A,"rel","nofollow")},m(v,k){m(v,d,k),e(d,w),e(d,g),e(g,u),e(d,x),m(v,l,k),m(v,c,k),e(c,I),e(I,Pe),e(c,we),e(c,z),e(z,Y),m(v,te,k),m(v,y,k),e(y,Ae),e(y,B),e(B,qe),e(y,ye),e(y,L),e(L,ze),e(y,oe),e(y,ne),e(ne,Oe),e(y,Ce),e(y,W),e(W,De),e(y,be),e(y,X),e(X,ue),e(y,Le),m(v,fe,k),m(v,j,k),e(j,O),e(O,$e),e(O,U),e(U,ge),e(O,Se),e(O,J),e(J,Q),e(j,Ze),e(j,q),e(q,ee),e(q,se),e(se,he),e(q,Re),e(q,ae),e(ae,Te),e(j,P),e(j,H),e(H,re),e(H,ie),e(ie,Ke),m(v,V,k),m(v,D,k),e(D,We),e(D,A),e(A,Xe),e(D,Ue)},d(v){v&&t(d),v&&t(l),v&&t(c),v&&t(te),v&&t(y),v&&t(fe),v&&t(j),v&&t(V),v&&t(D)}}}function kr(M){let d,w,g,u,x;return{c(){d=a("p"),w=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a("code"),u=n("Module"),x=n(`
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){d=r(l,"P",{});var c=i(d);w=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(c,"CODE",{});var I=i(g);u=s(I,"Module"),I.forEach(t),x=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){m(l,d,c),e(d,w),e(d,g),e(g,u),e(d,x)},d(l){l&&t(d)}}}function Fr(M){let d,w,g,u,x;return u=new rn({props:{code:`from transformers import ConvNextFeatureExtractor, TFConvNextForImageClassification
import tensorflow as tf
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

feature_extractor = ConvNextFeatureExtractor.from_pretrained("facebook/convnext-tiny-224")
model = TFConvNextForImageClassification.from_pretrained("facebook/convnext-tiny-224")

inputs = feature_extractor(images=image, return_tensors="tf")
outputs = model(**inputs)
logits = outputs.logits
# model predicts one of the 1000 ImageNet classes
predicted_class_idx = tf.math.argmax(logits, axis=-1)[0]
print("Predicted class:", model.config.id2label[int(predicted_class_idx)])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ConvNextFeatureExtractor, TFConvNextForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = ConvNextFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/convnext-tiny-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFConvNextForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/convnext-tiny-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.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_class_idx = tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Predicted class:&quot;</span>, model.config.id2label[<span class="hljs-built_in">int</span>(predicted_class_idx)])`}}),{c(){d=a("p"),w=n("Examples:"),g=f(),C(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);w=s(c,"Examples:"),c.forEach(t),g=h(l),b(u.$$.fragment,l)},m(l,c){m(l,d,c),e(d,w),m(l,g,c),$(u,l,c),x=!0},p:an,i(l){x||(T(u.$$.fragment,l),x=!0)},o(l){N(u.$$.fragment,l),x=!1},d(l){l&&t(d),l&&t(g),E(u,l)}}}function Ir(M){let d,w,g,u,x,l,c,I,Pe,we,z,Y,te,y,Ae,B,qe,ye,L,ze,oe,ne,Oe,Ce,W,De,be,X,ue,Le,fe,j,O,$e,U,ge,Se,J,Q,Ze,q,ee,se,he,Re,ae,Te,P,H,re,ie,Ke,V,D,We,A,Xe,Ue,v,k,et,G,tt,ot,F,le,me,Be,_e,nt,S,de,Ye,R,K,st,ce,He,Ne,ve,at,Lt,Pn,An,qn,rt,zn,uo,On,Dn,go,Ln,Sn,Rn,gt,ln,it,_t,Po,St,Kn,Ao,Wn,dn,Ve,Rt,Xn,qo,Un,Bn,Kt,Hn,_o,Vn,Gn,cn,lt,vt,zo,Wt,Zn,Oo,Yn,pn,Ge,Xt,Jn,Ut,Qn,Bt,es,ts,os,Ee,Ht,ns,dt,ss,vo,as,rs,Do,is,ls,ds,xt,cs,wt,fn,ct,yt,Lo,Vt,ps,So,fs,hn,xe,Gt,hs,Ro,ms,us,Zt,gs,Yt,_s,vs,xs,ke,Jt,ws,pt,ys,xo,Cs,bs,Ko,$s,Ts,Ns,Ct,Es,bt,mn,ft,$t,Wo,Qt,ks,Xo,Fs,un,pe,eo,Is,to,js,wo,Ms,Ps,As,oo,qs,no,zs,Os,Ds,Tt,Ls,Fe,so,Ss,ht,Rs,yo,Ks,Ws,Uo,Xs,Us,Bs,Nt,Hs,Et,gn,mt,kt,Bo,ao,Vs,Ho,Gs,_n,Z,ro,Zs,Vo,Ys,Js,io,Qs,Co,ea,ta,oa,lo,na,co,sa,aa,ra,Ft,ia,Ie,po,la,ut,da,bo,ca,pa,Go,fa,ha,ma,It,ua,jt,vn;return l=new Dt({}),y=new Dt({}),_e=new Dt({}),K=new Qe({props:{name:"class transformers.ConvNextConfig",anchor:"transformers.ConvNextConfig",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:"is_encoder_decoder",val:" = False"},{name:"layer_scale_init_value",val:" = 1e-06"},{name:"drop_path_rate",val:" = 0.0"},{name:"image_size",val:" = 224"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvNextConfig.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.ConvNextConfig.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.ConvNextConfig.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.ConvNextConfig.hidden_sizes",description:`<strong>hidden_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [96, 192, 384, 768]) &#x2014;
Dimensionality (hidden size) at each stage.`,name:"hidden_sizes"},{anchor:"transformers.ConvNextConfig.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to [3, 3, 9, 3]) &#x2014;
Depth (number of blocks) for each stage.`,name:"depths"},{anchor:"transformers.ConvNextConfig.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.ConvNextConfig.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.ConvNextConfig.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.ConvNextConfig.layer_scale_init_value",description:`<strong>layer_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-6) &#x2014;
The initial value for the layer scale.`,name:"layer_scale_init_value"},{anchor:"transformers.ConvNextConfig.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"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/convnext/configuration_convnext.py#L35"}}),gt=new sn({props:{anchor:"transformers.ConvNextConfig.example",$$slots:{default:[xr]},$$scope:{ctx:M}}}),St=new Dt({}),Rt=new Qe({props:{name:"class transformers.ConvNextFeatureExtractor",anchor:"transformers.ConvNextFeatureExtractor",parameters:[{name:"do_resize",val:" = True"},{name:"size",val:" = 224"},{name:"resample",val:" = <Resampling.BICUBIC: 3>"},{name:"crop_pct",val:" = None"},{name:"do_normalize",val:" = True"},{name:"image_mean",val:" = None"},{name:"image_std",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvNextFeatureExtractor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize (and optionally center crop) the input to a certain <code>size</code>.`,name:"do_resize"},{anchor:"transformers.ConvNextFeatureExtractor.size",description:`<strong>size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
Resize the input to the given size. If 384 or larger, the image is resized to (<code>size</code>, <code>size</code>). Else, the
smaller edge of the image will be matched to int(<code>size</code>/ <code>crop_pct</code>), after which the image is cropped to
<code>size</code>. Only has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"size"},{anchor:"transformers.ConvNextFeatureExtractor.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>PIL.Image.Resampling.BICUBIC</code>) &#x2014;
An optional resampling filter. This can be one of <code>PIL.Image.Resampling.NEAREST</code>,
<code>PIL.Image.Resampling.BOX</code>, <code>PIL.Image.Resampling.BILINEAR</code>, <code>PIL.Image.Resampling.HAMMING</code>,
<code>PIL.Image.Resampling.BICUBIC</code> or <code>PIL.Image.Resampling.LANCZOS</code>. Only has an effect if <code>do_resize</code> is set
to <code>True</code>.`,name:"resample"},{anchor:"transformers.ConvNextFeatureExtractor.crop_pct",description:`<strong>crop_pct</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The percentage of the image to crop. If <code>None</code>, then a cropping percentage of 224 / 256 is used. Only has
an effect if <code>do_resize</code> is set to <code>True</code> and <code>size</code> &lt; 384.`,name:"crop_pct"},{anchor:"transformers.ConvNextFeatureExtractor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to normalize the input with mean and standard deviation.`,name:"do_normalize"},{anchor:"transformers.ConvNextFeatureExtractor.image_mean",description:`<strong>image_mean</strong> (<code>List[int]</code>, defaults to <code>[0.485, 0.456, 0.406]</code>) &#x2014;
The sequence of means for each channel, to be used when normalizing images.`,name:"image_mean"},{anchor:"transformers.ConvNextFeatureExtractor.image_std",description:`<strong>image_std</strong> (<code>List[int]</code>, defaults to <code>[0.229, 0.224, 0.225]</code>) &#x2014;
The sequence of standard deviations for each channel, to be used when normalizing images.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/convnext/feature_extraction_convnext.py#L38"}}),Wt=new Dt({}),Xt=new Qe({props:{name:"class transformers.ConvNextModel",anchor:"transformers.ConvNextModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvNextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/convnext#transformers.ConvNextConfig">ConvNextConfig</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/pr_19907/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/vr_19907/src/transformers/models/convnext/modeling_convnext.py#L326"}}),Ht=new Qe({props:{name:"forward",anchor:"transformers.ConvNextModel.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.ConvNextModel.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/pr_19907/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See
<code>AutoFeatureExtractor.__call__()</code> for details.`,name:"pixel_values"},{anchor:"transformers.ConvNextModel.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.ConvNextModel.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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/convnext/modeling_convnext.py#L340",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/pr_19907/en/model_doc/convnext#transformers.ConvNextConfig"
>ConvNextConfig</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>
`}}),xt=new Mo({props:{$$slots:{default:[wr]},$$scope:{ctx:M}}}),wt=new sn({props:{anchor:"transformers.ConvNextModel.forward.example",$$slots:{default:[yr]},$$scope:{ctx:M}}}),Vt=new Dt({}),Gt=new Qe({props:{name:"class transformers.ConvNextForImageClassification",anchor:"transformers.ConvNextForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvNextForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/convnext#transformers.ConvNextConfig">ConvNextConfig</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/pr_19907/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/vr_19907/src/transformers/models/convnext/modeling_convnext.py#L393"}}),Jt=new Qe({props:{name:"forward",anchor:"transformers.ConvNextForImageClassification.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.ConvNextForImageClassification.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/pr_19907/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See
<code>AutoFeatureExtractor.__call__()</code> for details.`,name:"pixel_values"},{anchor:"transformers.ConvNextForImageClassification.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.ConvNextForImageClassification.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/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ConvNextForImageClassification.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/vr_19907/src/transformers/models/convnext/modeling_convnext.py#L408",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/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/pr_19907/en/model_doc/convnext#transformers.ConvNextConfig"
>ConvNextConfig</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/pr_19907/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ct=new Mo({props:{$$slots:{default:[Cr]},$$scope:{ctx:M}}}),bt=new sn({props:{anchor:"transformers.ConvNextForImageClassification.forward.example",$$slots:{default:[br]},$$scope:{ctx:M}}}),Qt=new Dt({}),eo=new Qe({props:{name:"class transformers.TFConvNextModel",anchor:"transformers.TFConvNextModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvNextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/convnext#transformers.ConvNextConfig">ConvNextConfig</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/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/convnext/modeling_tf_convnext.py#L452"}}),Tt=new Mo({props:{$$slots:{default:[$r]},$$scope:{ctx:M}}}),so=new Qe({props:{name:"call",anchor:"transformers.TFConvNextModel.call",parameters:[{name:"pixel_values",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFConvNextModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/convnext#transformers.ConvNextFeatureExtractor">ConvNextFeatureExtractor</a>. See
<code>ConvNextFeatureExtractor.__call__()</code> for details.`,name:"pixel_values"},{anchor:"transformers.TFConvNextModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFConvNextModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/convnext/modeling_tf_convnext.py#L457",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or a tuple of <code>tf.Tensor</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/pr_19907/en/model_doc/convnext#transformers.ConvNextConfig"
>ConvNextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</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>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Nt=new Mo({props:{$$slots:{default:[Tr]},$$scope:{ctx:M}}}),Et=new sn({props:{anchor:"transformers.TFConvNextModel.call.example",$$slots:{default:[Nr]},$$scope:{ctx:M}}}),ao=new Dt({}),ro=new Qe({props:{name:"class transformers.TFConvNextForImageClassification",anchor:"transformers.TFConvNextForImageClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvNextForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_19907/en/model_doc/convnext#transformers.ConvNextConfig">ConvNextConfig</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/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_19907/src/transformers/models/convnext/modeling_tf_convnext.py#L527"}}),Ft=new Mo({props:{$$slots:{default:[Er]},$$scope:{ctx:M}}}),po=new Qe({props:{name:"call",anchor:"transformers.TFConvNextForImageClassification.call",parameters:[{name:"pixel_values",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[tensorflow.python.keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, tensorflow.python.keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, tensorflow.python.keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFConvNextForImageClassification.call.pixel_values",description:`<strong>pixel_values</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/pr_19907/en/model_doc/convnext#transformers.ConvNextFeatureExtractor">ConvNextFeatureExtractor</a>. See
<code>ConvNextFeatureExtractor.__call__()</code> for details.`,name:"pixel_values"},{anchor:"transformers.TFConvNextForImageClassification.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFConvNextForImageClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_19907/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFConvNextForImageClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</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/vr_19907/src/transformers/models/convnext/modeling_tf_convnext.py#L542",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</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/pr_19907/en/model_doc/convnext#transformers.ConvNextConfig"
>ConvNextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/pr_19907/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),It=new Mo({props:{$$slots:{default:[kr]},$$scope:{ctx:M}}}),jt=new sn({props:{anchor:"transformers.TFConvNextForImageClassification.call.example",$$slots:{default:[Fr]},$$scope:{ctx:M}}}),{c(){d=a("meta"),w=f(),g=a("h1"),u=a("a"),x=a("span"),C(l.$$.fragment),c=f(),I=a("span"),Pe=n("ConvNeXT"),we=f(),z=a("h2"),Y=a("a"),te=a("span"),C(y.$$.fragment),Ae=f(),B=a("span"),qe=n("Overview"),ye=f(),L=a("p"),ze=n("The ConvNeXT model was proposed in "),oe=a("a"),ne=n("A ConvNet for the 2020s"),Oe=n(` by Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, Saining Xie.
ConvNeXT is a pure convolutional model (ConvNet), inspired by the design of Vision Transformers, that claims to outperform them.`),Ce=f(),W=a("p"),De=n("The abstract from the paper is the following:"),be=f(),X=a("p"),ue=a("em"),Le=n(`The \u201CRoaring 20s\u201D of visual recognition began with the introduction of Vision Transformers (ViTs), which quickly superseded ConvNets as the state-of-the-art image classification model.
A vanilla ViT, on the other hand, faces difficulties when applied to general computer vision tasks such as object detection and semantic segmentation. It is the hierarchical Transformers
(e.g., Swin Transformers) that reintroduced several ConvNet priors, making Transformers practically viable as a generic vision backbone and demonstrating remarkable performance on a wide
variety of vision tasks. However, the effectiveness of such hybrid approaches is still largely credited to the intrinsic superiority of Transformers, rather than the inherent inductive
biases of convolutions. In this work, we reexamine the design spaces and test the limits of what a pure ConvNet can achieve. We gradually \u201Cmodernize\u201D a standard ResNet toward the design
of a vision Transformer, and discover several key components that contribute to the performance difference along the way. The outcome of this exploration is a family of pure ConvNet models
dubbed ConvNeXt. Constructed entirely from standard ConvNet modules, ConvNeXts compete favorably with Transformers in terms of accuracy and scalability, achieving 87.8% ImageNet top-1 accuracy
and outperforming Swin Transformers on COCO detection and ADE20K segmentation, while maintaining the simplicity and efficiency of standard ConvNets.`),fe=f(),j=a("p"),O=n("Tips:"),$e=f(),U=a("ul"),ge=a("li"),Se=n("See the code examples below each model regarding usage."),J=f(),Q=a("img"),q=f(),ee=a("small"),se=n("ConvNeXT architecture. Taken from the "),he=a("a"),Re=n("original paper"),ae=n("."),Te=f(),P=a("p"),H=n("This model was contributed by "),re=a("a"),ie=n("nielsr"),Ke=n(". TensorFlow version of the model was contributed by "),V=a("a"),D=n("ariG23498"),We=n(`,
`),A=a("a"),Xe=n("gante"),Ue=n(", and "),v=a("a"),k=n("sayakpaul"),et=n(" (equal contribution). The original code can be found "),G=a("a"),tt=n("here"),ot=n("."),F=f(),le=a("h2"),me=a("a"),Be=a("span"),C(_e.$$.fragment),nt=f(),S=a("span"),de=n("ConvNextConfig"),Ye=f(),R=a("div"),C(K.$$.fragment),st=f(),ce=a("p"),He=n("This is the configuration class to store the configuration of a "),Ne=a("a"),ve=n("ConvNextModel"),at=n(`. It is used to instantiate an
ConvNeXT 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 ConvNeXT
`),Lt=a("a"),Pn=n("facebook/convnext-tiny-224"),An=n(" architecture."),qn=f(),rt=a("p"),zn=n("Configuration objects inherit from "),uo=a("a"),On=n("PretrainedConfig"),Dn=n(` and can be used to control the model outputs. Read the
documentation from `),go=a("a"),Ln=n("PretrainedConfig"),Sn=n(" for more information."),Rn=f(),C(gt.$$.fragment),ln=f(),it=a("h2"),_t=a("a"),Po=a("span"),C(St.$$.fragment),Kn=f(),Ao=a("span"),Wn=n("ConvNextFeatureExtractor"),dn=f(),Ve=a("div"),C(Rt.$$.fragment),Xn=f(),qo=a("p"),Un=n("Constructs a ConvNeXT feature extractor."),Bn=f(),Kt=a("p"),Hn=n("This feature extractor inherits from "),_o=a("a"),Vn=n("FeatureExtractionMixin"),Gn=n(` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),cn=f(),lt=a("h2"),vt=a("a"),zo=a("span"),C(Wt.$$.fragment),Zn=f(),Oo=a("span"),Yn=n("ConvNextModel"),pn=f(),Ge=a("div"),C(Xt.$$.fragment),Jn=f(),Ut=a("p"),Qn=n(`The bare ConvNext model outputting raw features without any specific head on top.
This model is a PyTorch `),Bt=a("a"),es=n("torch.nn.Module"),ts=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),os=f(),Ee=a("div"),C(Ht.$$.fragment),ns=f(),dt=a("p"),ss=n("The "),vo=a("a"),as=n("ConvNextModel"),rs=n(" forward method, overrides the "),Do=a("code"),is=n("__call__"),ls=n(" special method."),ds=f(),C(xt.$$.fragment),cs=f(),C(wt.$$.fragment),fn=f(),ct=a("h2"),yt=a("a"),Lo=a("span"),C(Vt.$$.fragment),ps=f(),So=a("span"),fs=n("ConvNextForImageClassification"),hn=f(),xe=a("div"),C(Gt.$$.fragment),hs=f(),Ro=a("p"),ms=n(`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),us=f(),Zt=a("p"),gs=n("This model is a PyTorch "),Yt=a("a"),_s=n("torch.nn.Module"),vs=n(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),xs=f(),ke=a("div"),C(Jt.$$.fragment),ws=f(),pt=a("p"),ys=n("The "),xo=a("a"),Cs=n("ConvNextForImageClassification"),bs=n(" forward method, overrides the "),Ko=a("code"),$s=n("__call__"),Ts=n(" special method."),Ns=f(),C(Ct.$$.fragment),Es=f(),C(bt.$$.fragment),mn=f(),ft=a("h2"),$t=a("a"),Wo=a("span"),C(Qt.$$.fragment),ks=f(),Xo=a("span"),Fs=n("TFConvNextModel"),un=f(),pe=a("div"),C(eo.$$.fragment),Is=f(),to=a("p"),js=n(`The bare ConvNext model outputting raw features without any specific head on top.
This model inherits from `),wo=a("a"),Ms=n("TFPreTrainedModel"),Ps=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),As=f(),oo=a("p"),qs=n("This model is also a "),no=a("a"),zs=n("tf.keras.Model"),Os=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Ds=f(),C(Tt.$$.fragment),Ls=f(),Fe=a("div"),C(so.$$.fragment),Ss=f(),ht=a("p"),Rs=n("The "),yo=a("a"),Ks=n("TFConvNextModel"),Ws=n(" forward method, overrides the "),Uo=a("code"),Xs=n("__call__"),Us=n(" special method."),Bs=f(),C(Nt.$$.fragment),Hs=f(),C(Et.$$.fragment),gn=f(),mt=a("h2"),kt=a("a"),Bo=a("span"),C(ao.$$.fragment),Vs=f(),Ho=a("span"),Gs=n("TFConvNextForImageClassification"),_n=f(),Z=a("div"),C(ro.$$.fragment),Zs=f(),Vo=a("p"),Ys=n(`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Js=f(),io=a("p"),Qs=n("This model inherits from "),Co=a("a"),ea=n("TFPreTrainedModel"),ta=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),oa=f(),lo=a("p"),na=n("This model is also a "),co=a("a"),sa=n("tf.keras.Model"),aa=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ra=f(),C(Ft.$$.fragment),ia=f(),Ie=a("div"),C(po.$$.fragment),la=f(),ut=a("p"),da=n("The "),bo=a("a"),ca=n("TFConvNextForImageClassification"),pa=n(" forward method, overrides the "),Go=a("code"),fa=n("__call__"),ha=n(" special method."),ma=f(),C(It.$$.fragment),ua=f(),C(jt.$$.fragment),this.h()},l(o){const _=gr('[data-svelte="svelte-1phssyn"]',document.head);d=r(_,"META",{name:!0,content:!0}),_.forEach(t),w=h(o),g=r(o,"H1",{class:!0});var fo=i(g);u=r(fo,"A",{id:!0,class:!0,href:!0});var Zo=i(u);x=r(Zo,"SPAN",{});var Yo=i(x);b(l.$$.fragment,Yo),Yo.forEach(t),Zo.forEach(t),c=h(fo),I=r(fo,"SPAN",{});var Jo=i(I);Pe=s(Jo,"ConvNeXT"),Jo.forEach(t),fo.forEach(t),we=h(o),z=r(o,"H2",{class:!0});var ho=i(z);Y=r(ho,"A",{id:!0,class:!0,href:!0});var Qo=i(Y);te=r(Qo,"SPAN",{});var en=i(te);b(y.$$.fragment,en),en.forEach(t),Qo.forEach(t),Ae=h(ho),B=r(ho,"SPAN",{});var tn=i(B);qe=s(tn,"Overview"),tn.forEach(t),ho.forEach(t),ye=h(o),L=r(o,"P",{});var mo=i(L);ze=s(mo,"The ConvNeXT model was proposed in "),oe=r(mo,"A",{href:!0,rel:!0});var on=i(oe);ne=s(on,"A ConvNet for the 2020s"),on.forEach(t),Oe=s(mo,` by Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, Saining Xie.
ConvNeXT is a pure convolutional model (ConvNet), inspired by the design of Vision Transformers, that claims to outperform them.`),mo.forEach(t),Ce=h(o),W=r(o,"P",{});var nn=i(W);De=s(nn,"The abstract from the paper is the following:"),nn.forEach(t),be=h(o),X=r(o,"P",{});var ga=i(X);ue=r(ga,"EM",{});var _a=i(ue);Le=s(_a,`The \u201CRoaring 20s\u201D of visual recognition began with the introduction of Vision Transformers (ViTs), which quickly superseded ConvNets as the state-of-the-art image classification model.
A vanilla ViT, on the other hand, faces difficulties when applied to general computer vision tasks such as object detection and semantic segmentation. It is the hierarchical Transformers
(e.g., Swin Transformers) that reintroduced several ConvNet priors, making Transformers practically viable as a generic vision backbone and demonstrating remarkable performance on a wide
variety of vision tasks. However, the effectiveness of such hybrid approaches is still largely credited to the intrinsic superiority of Transformers, rather than the inherent inductive
biases of convolutions. In this work, we reexamine the design spaces and test the limits of what a pure ConvNet can achieve. We gradually \u201Cmodernize\u201D a standard ResNet toward the design
of a vision Transformer, and discover several key components that contribute to the performance difference along the way. The outcome of this exploration is a family of pure ConvNet models
dubbed ConvNeXt. Constructed entirely from standard ConvNet modules, ConvNeXts compete favorably with Transformers in terms of accuracy and scalability, achieving 87.8% ImageNet top-1 accuracy
and outperforming Swin Transformers on COCO detection and ADE20K segmentation, while maintaining the simplicity and efficiency of standard ConvNets.`),_a.forEach(t),ga.forEach(t),fe=h(o),j=r(o,"P",{});var va=i(j);O=s(va,"Tips:"),va.forEach(t),$e=h(o),U=r(o,"UL",{});var xa=i(U);ge=r(xa,"LI",{});var wa=i(ge);Se=s(wa,"See the code examples below each model regarding usage."),wa.forEach(t),xa.forEach(t),J=h(o),Q=r(o,"IMG",{src:!0,alt:!0,width:!0}),q=h(o),ee=r(o,"SMALL",{});var xn=i(ee);se=s(xn,"ConvNeXT architecture. Taken from the "),he=r(xn,"A",{href:!0});var ya=i(he);Re=s(ya,"original paper"),ya.forEach(t),ae=s(xn,"."),xn.forEach(t),Te=h(o),P=r(o,"P",{});var je=i(P);H=s(je,"This model was contributed by "),re=r(je,"A",{href:!0,rel:!0});var Ca=i(re);ie=s(Ca,"nielsr"),Ca.forEach(t),Ke=s(je,". TensorFlow version of the model was contributed by "),V=r(je,"A",{href:!0,rel:!0});var ba=i(V);D=s(ba,"ariG23498"),ba.forEach(t),We=s(je,`,
`),A=r(je,"A",{href:!0,rel:!0});var $a=i(A);Xe=s($a,"gante"),$a.forEach(t),Ue=s(je,", and "),v=r(je,"A",{href:!0,rel:!0});var Ta=i(v);k=s(Ta,"sayakpaul"),Ta.forEach(t),et=s(je," (equal contribution). The original code can be found "),G=r(je,"A",{href:!0,rel:!0});var Na=i(G);tt=s(Na,"here"),Na.forEach(t),ot=s(je,"."),je.forEach(t),F=h(o),le=r(o,"H2",{class:!0});var wn=i(le);me=r(wn,"A",{id:!0,class:!0,href:!0});var Ea=i(me);Be=r(Ea,"SPAN",{});var ka=i(Be);b(_e.$$.fragment,ka),ka.forEach(t),Ea.forEach(t),nt=h(wn),S=r(wn,"SPAN",{});var Fa=i(S);de=s(Fa,"ConvNextConfig"),Fa.forEach(t),wn.forEach(t),Ye=h(o),R=r(o,"DIV",{class:!0});var Mt=i(R);b(K.$$.fragment,Mt),st=h(Mt),ce=r(Mt,"P",{});var $o=i(ce);He=s($o,"This is the configuration class to store the configuration of a "),Ne=r($o,"A",{href:!0});var Ia=i(Ne);ve=s(Ia,"ConvNextModel"),Ia.forEach(t),at=s($o,`. It is used to instantiate an
ConvNeXT 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 ConvNeXT
`),Lt=r($o,"A",{href:!0,rel:!0});var ja=i(Lt);Pn=s(ja,"facebook/convnext-tiny-224"),ja.forEach(t),An=s($o," architecture."),$o.forEach(t),qn=h(Mt),rt=r(Mt,"P",{});var To=i(rt);zn=s(To,"Configuration objects inherit from "),uo=r(To,"A",{href:!0});var Ma=i(uo);On=s(Ma,"PretrainedConfig"),Ma.forEach(t),Dn=s(To,` and can be used to control the model outputs. Read the
documentation from `),go=r(To,"A",{href:!0});var Pa=i(go);Ln=s(Pa,"PretrainedConfig"),Pa.forEach(t),Sn=s(To," for more information."),To.forEach(t),Rn=h(Mt),b(gt.$$.fragment,Mt),Mt.forEach(t),ln=h(o),it=r(o,"H2",{class:!0});var yn=i(it);_t=r(yn,"A",{id:!0,class:!0,href:!0});var Aa=i(_t);Po=r(Aa,"SPAN",{});var qa=i(Po);b(St.$$.fragment,qa),qa.forEach(t),Aa.forEach(t),Kn=h(yn),Ao=r(yn,"SPAN",{});var za=i(Ao);Wn=s(za,"ConvNextFeatureExtractor"),za.forEach(t),yn.forEach(t),dn=h(o),Ve=r(o,"DIV",{class:!0});var No=i(Ve);b(Rt.$$.fragment,No),Xn=h(No),qo=r(No,"P",{});var Oa=i(qo);Un=s(Oa,"Constructs a ConvNeXT feature extractor."),Oa.forEach(t),Bn=h(No),Kt=r(No,"P",{});var Cn=i(Kt);Hn=s(Cn,"This feature extractor inherits from "),_o=r(Cn,"A",{href:!0});var Da=i(_o);Vn=s(Da,"FeatureExtractionMixin"),Da.forEach(t),Gn=s(Cn,` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),Cn.forEach(t),No.forEach(t),cn=h(o),lt=r(o,"H2",{class:!0});var bn=i(lt);vt=r(bn,"A",{id:!0,class:!0,href:!0});var La=i(vt);zo=r(La,"SPAN",{});var Sa=i(zo);b(Wt.$$.fragment,Sa),Sa.forEach(t),La.forEach(t),Zn=h(bn),Oo=r(bn,"SPAN",{});var Ra=i(Oo);Yn=s(Ra,"ConvNextModel"),Ra.forEach(t),bn.forEach(t),pn=h(o),Ge=r(o,"DIV",{class:!0});var Eo=i(Ge);b(Xt.$$.fragment,Eo),Jn=h(Eo),Ut=r(Eo,"P",{});var $n=i(Ut);Qn=s($n,`The bare ConvNext model outputting raw features without any specific head on top.
This model is a PyTorch `),Bt=r($n,"A",{href:!0,rel:!0});var Ka=i(Bt);es=s(Ka,"torch.nn.Module"),Ka.forEach(t),ts=s($n,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),$n.forEach(t),os=h(Eo),Ee=r(Eo,"DIV",{class:!0});var Pt=i(Ee);b(Ht.$$.fragment,Pt),ns=h(Pt),dt=r(Pt,"P",{});var ko=i(dt);ss=s(ko,"The "),vo=r(ko,"A",{href:!0});var Wa=i(vo);as=s(Wa,"ConvNextModel"),Wa.forEach(t),rs=s(ko," forward method, overrides the "),Do=r(ko,"CODE",{});var Xa=i(Do);is=s(Xa,"__call__"),Xa.forEach(t),ls=s(ko," special method."),ko.forEach(t),ds=h(Pt),b(xt.$$.fragment,Pt),cs=h(Pt),b(wt.$$.fragment,Pt),Pt.forEach(t),Eo.forEach(t),fn=h(o),ct=r(o,"H2",{class:!0});var Tn=i(ct);yt=r(Tn,"A",{id:!0,class:!0,href:!0});var Ua=i(yt);Lo=r(Ua,"SPAN",{});var Ba=i(Lo);b(Vt.$$.fragment,Ba),Ba.forEach(t),Ua.forEach(t),ps=h(Tn),So=r(Tn,"SPAN",{});var Ha=i(So);fs=s(Ha,"ConvNextForImageClassification"),Ha.forEach(t),Tn.forEach(t),hn=h(o),xe=r(o,"DIV",{class:!0});var At=i(xe);b(Gt.$$.fragment,At),hs=h(At),Ro=r(At,"P",{});var Va=i(Ro);ms=s(Va,`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Va.forEach(t),us=h(At),Zt=r(At,"P",{});var Nn=i(Zt);gs=s(Nn,"This model is a PyTorch "),Yt=r(Nn,"A",{href:!0,rel:!0});var Ga=i(Yt);_s=s(Ga,"torch.nn.Module"),Ga.forEach(t),vs=s(Nn,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Nn.forEach(t),xs=h(At),ke=r(At,"DIV",{class:!0});var qt=i(ke);b(Jt.$$.fragment,qt),ws=h(qt),pt=r(qt,"P",{});var Fo=i(pt);ys=s(Fo,"The "),xo=r(Fo,"A",{href:!0});var Za=i(xo);Cs=s(Za,"ConvNextForImageClassification"),Za.forEach(t),bs=s(Fo," forward method, overrides the "),Ko=r(Fo,"CODE",{});var Ya=i(Ko);$s=s(Ya,"__call__"),Ya.forEach(t),Ts=s(Fo," special method."),Fo.forEach(t),Ns=h(qt),b(Ct.$$.fragment,qt),Es=h(qt),b(bt.$$.fragment,qt),qt.forEach(t),At.forEach(t),mn=h(o),ft=r(o,"H2",{class:!0});var En=i(ft);$t=r(En,"A",{id:!0,class:!0,href:!0});var Ja=i($t);Wo=r(Ja,"SPAN",{});var Qa=i(Wo);b(Qt.$$.fragment,Qa),Qa.forEach(t),Ja.forEach(t),ks=h(En),Xo=r(En,"SPAN",{});var er=i(Xo);Fs=s(er,"TFConvNextModel"),er.forEach(t),En.forEach(t),un=h(o),pe=r(o,"DIV",{class:!0});var Je=i(pe);b(eo.$$.fragment,Je),Is=h(Je),to=r(Je,"P",{});var kn=i(to);js=s(kn,`The bare ConvNext model outputting raw features without any specific head on top.
This model inherits from `),wo=r(kn,"A",{href:!0});var tr=i(wo);Ms=s(tr,"TFPreTrainedModel"),tr.forEach(t),Ps=s(kn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),kn.forEach(t),As=h(Je),oo=r(Je,"P",{});var Fn=i(oo);qs=s(Fn,"This model is also a "),no=r(Fn,"A",{href:!0,rel:!0});var or=i(no);zs=s(or,"tf.keras.Model"),or.forEach(t),Os=s(Fn,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Fn.forEach(t),Ds=h(Je),b(Tt.$$.fragment,Je),Ls=h(Je),Fe=r(Je,"DIV",{class:!0});var zt=i(Fe);b(so.$$.fragment,zt),Ss=h(zt),ht=r(zt,"P",{});var Io=i(ht);Rs=s(Io,"The "),yo=r(Io,"A",{href:!0});var nr=i(yo);Ks=s(nr,"TFConvNextModel"),nr.forEach(t),Ws=s(Io," forward method, overrides the "),Uo=r(Io,"CODE",{});var sr=i(Uo);Xs=s(sr,"__call__"),sr.forEach(t),Us=s(Io," special method."),Io.forEach(t),Bs=h(zt),b(Nt.$$.fragment,zt),Hs=h(zt),b(Et.$$.fragment,zt),zt.forEach(t),Je.forEach(t),gn=h(o),mt=r(o,"H2",{class:!0});var In=i(mt);kt=r(In,"A",{id:!0,class:!0,href:!0});var ar=i(kt);Bo=r(ar,"SPAN",{});var rr=i(Bo);b(ao.$$.fragment,rr),rr.forEach(t),ar.forEach(t),Vs=h(In),Ho=r(In,"SPAN",{});var ir=i(Ho);Gs=s(ir,"TFConvNextForImageClassification"),ir.forEach(t),In.forEach(t),_n=h(o),Z=r(o,"DIV",{class:!0});var Me=i(Z);b(ro.$$.fragment,Me),Zs=h(Me),Vo=r(Me,"P",{});var lr=i(Vo);Ys=s(lr,`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),lr.forEach(t),Js=h(Me),io=r(Me,"P",{});var jn=i(io);Qs=s(jn,"This model inherits from "),Co=r(jn,"A",{href:!0});var dr=i(Co);ea=s(dr,"TFPreTrainedModel"),dr.forEach(t),ta=s(jn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),jn.forEach(t),oa=h(Me),lo=r(Me,"P",{});var Mn=i(lo);na=s(Mn,"This model is also a "),co=r(Mn,"A",{href:!0,rel:!0});var cr=i(co);sa=s(cr,"tf.keras.Model"),cr.forEach(t),aa=s(Mn,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Mn.forEach(t),ra=h(Me),b(Ft.$$.fragment,Me),ia=h(Me),Ie=r(Me,"DIV",{class:!0});var Ot=i(Ie);b(po.$$.fragment,Ot),la=h(Ot),ut=r(Ot,"P",{});var jo=i(ut);da=s(jo,"The "),bo=r(jo,"A",{href:!0});var pr=i(bo);ca=s(pr,"TFConvNextForImageClassification"),pr.forEach(t),pa=s(jo," forward method, overrides the "),Go=r(jo,"CODE",{});var fr=i(Go);fa=s(fr,"__call__"),fr.forEach(t),ha=s(jo," special method."),jo.forEach(t),ma=h(Ot),b(It.$$.fragment,Ot),ua=h(Ot),b(jt.$$.fragment,Ot),Ot.forEach(t),Me.forEach(t),this.h()},h(){p(d,"name","hf:doc:metadata"),p(d,"content",JSON.stringify(jr)),p(u,"id","convnext"),p(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"),p(u,"href","#convnext"),p(g,"class","relative group"),p(Y,"id","overview"),p(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Y,"href","#overview"),p(z,"class","relative group"),p(oe,"href","https://arxiv.org/abs/2201.03545"),p(oe,"rel","nofollow"),_r(Q.src,Ze="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/convnext_architecture.jpg")||p(Q,"src",Ze),p(Q,"alt","drawing"),p(Q,"width","600"),p(he,"href","https://arxiv.org/abs/2201.03545"),p(re,"href","https://huggingface.co/nielsr"),p(re,"rel","nofollow"),p(V,"href","https://github.com/ariG23498"),p(V,"rel","nofollow"),p(A,"href","https://github.com/gante"),p(A,"rel","nofollow"),p(v,"href","https://github.com/sayakpaul"),p(v,"rel","nofollow"),p(G,"href","https://github.com/facebookresearch/ConvNeXt"),p(G,"rel","nofollow"),p(me,"id","transformers.ConvNextConfig"),p(me,"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"),p(me,"href","#transformers.ConvNextConfig"),p(le,"class","relative group"),p(Ne,"href","/docs/transformers/pr_19907/en/model_doc/convnext#transformers.ConvNextModel"),p(Lt,"href","https://huggingface.co/facebook/convnext-tiny-224"),p(Lt,"rel","nofollow"),p(uo,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),p(go,"href","/docs/transformers/pr_19907/en/main_classes/configuration#transformers.PretrainedConfig"),p(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(_t,"id","transformers.ConvNextFeatureExtractor"),p(_t,"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"),p(_t,"href","#transformers.ConvNextFeatureExtractor"),p(it,"class","relative group"),p(_o,"href","/docs/transformers/pr_19907/en/internal/image_processing_utils#transformers.FeatureExtractionMixin"),p(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(vt,"id","transformers.ConvNextModel"),p(vt,"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"),p(vt,"href","#transformers.ConvNextModel"),p(lt,"class","relative group"),p(Bt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Bt,"rel","nofollow"),p(vo,"href","/docs/transformers/pr_19907/en/model_doc/convnext#transformers.ConvNextModel"),p(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(yt,"id","transformers.ConvNextForImageClassification"),p(yt,"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"),p(yt,"href","#transformers.ConvNextForImageClassification"),p(ct,"class","relative group"),p(Yt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Yt,"rel","nofollow"),p(xo,"href","/docs/transformers/pr_19907/en/model_doc/convnext#transformers.ConvNextForImageClassification"),p(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p($t,"id","transformers.TFConvNextModel"),p($t,"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"),p($t,"href","#transformers.TFConvNextModel"),p(ft,"class","relative group"),p(wo,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),p(no,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(no,"rel","nofollow"),p(yo,"href","/docs/transformers/pr_19907/en/model_doc/convnext#transformers.TFConvNextModel"),p(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(kt,"id","transformers.TFConvNextForImageClassification"),p(kt,"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"),p(kt,"href","#transformers.TFConvNextForImageClassification"),p(mt,"class","relative group"),p(Co,"href","/docs/transformers/pr_19907/en/main_classes/model#transformers.TFPreTrainedModel"),p(co,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(co,"rel","nofollow"),p(bo,"href","/docs/transformers/pr_19907/en/model_doc/convnext#transformers.TFConvNextForImageClassification"),p(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,_){e(document.head,d),m(o,w,_),m(o,g,_),e(g,u),e(u,x),$(l,x,null),e(g,c),e(g,I),e(I,Pe),m(o,we,_),m(o,z,_),e(z,Y),e(Y,te),$(y,te,null),e(z,Ae),e(z,B),e(B,qe),m(o,ye,_),m(o,L,_),e(L,ze),e(L,oe),e(oe,ne),e(L,Oe),m(o,Ce,_),m(o,W,_),e(W,De),m(o,be,_),m(o,X,_),e(X,ue),e(ue,Le),m(o,fe,_),m(o,j,_),e(j,O),m(o,$e,_),m(o,U,_),e(U,ge),e(ge,Se),m(o,J,_),m(o,Q,_),m(o,q,_),m(o,ee,_),e(ee,se),e(ee,he),e(he,Re),e(ee,ae),m(o,Te,_),m(o,P,_),e(P,H),e(P,re),e(re,ie),e(P,Ke),e(P,V),e(V,D),e(P,We),e(P,A),e(A,Xe),e(P,Ue),e(P,v),e(v,k),e(P,et),e(P,G),e(G,tt),e(P,ot),m(o,F,_),m(o,le,_),e(le,me),e(me,Be),$(_e,Be,null),e(le,nt),e(le,S),e(S,de),m(o,Ye,_),m(o,R,_),$(K,R,null),e(R,st),e(R,ce),e(ce,He),e(ce,Ne),e(Ne,ve),e(ce,at),e(ce,Lt),e(Lt,Pn),e(ce,An),e(R,qn),e(R,rt),e(rt,zn),e(rt,uo),e(uo,On),e(rt,Dn),e(rt,go),e(go,Ln),e(rt,Sn),e(R,Rn),$(gt,R,null),m(o,ln,_),m(o,it,_),e(it,_t),e(_t,Po),$(St,Po,null),e(it,Kn),e(it,Ao),e(Ao,Wn),m(o,dn,_),m(o,Ve,_),$(Rt,Ve,null),e(Ve,Xn),e(Ve,qo),e(qo,Un),e(Ve,Bn),e(Ve,Kt),e(Kt,Hn),e(Kt,_o),e(_o,Vn),e(Kt,Gn),m(o,cn,_),m(o,lt,_),e(lt,vt),e(vt,zo),$(Wt,zo,null),e(lt,Zn),e(lt,Oo),e(Oo,Yn),m(o,pn,_),m(o,Ge,_),$(Xt,Ge,null),e(Ge,Jn),e(Ge,Ut),e(Ut,Qn),e(Ut,Bt),e(Bt,es),e(Ut,ts),e(Ge,os),e(Ge,Ee),$(Ht,Ee,null),e(Ee,ns),e(Ee,dt),e(dt,ss),e(dt,vo),e(vo,as),e(dt,rs),e(dt,Do),e(Do,is),e(dt,ls),e(Ee,ds),$(xt,Ee,null),e(Ee,cs),$(wt,Ee,null),m(o,fn,_),m(o,ct,_),e(ct,yt),e(yt,Lo),$(Vt,Lo,null),e(ct,ps),e(ct,So),e(So,fs),m(o,hn,_),m(o,xe,_),$(Gt,xe,null),e(xe,hs),e(xe,Ro),e(Ro,ms),e(xe,us),e(xe,Zt),e(Zt,gs),e(Zt,Yt),e(Yt,_s),e(Zt,vs),e(xe,xs),e(xe,ke),$(Jt,ke,null),e(ke,ws),e(ke,pt),e(pt,ys),e(pt,xo),e(xo,Cs),e(pt,bs),e(pt,Ko),e(Ko,$s),e(pt,Ts),e(ke,Ns),$(Ct,ke,null),e(ke,Es),$(bt,ke,null),m(o,mn,_),m(o,ft,_),e(ft,$t),e($t,Wo),$(Qt,Wo,null),e(ft,ks),e(ft,Xo),e(Xo,Fs),m(o,un,_),m(o,pe,_),$(eo,pe,null),e(pe,Is),e(pe,to),e(to,js),e(to,wo),e(wo,Ms),e(to,Ps),e(pe,As),e(pe,oo),e(oo,qs),e(oo,no),e(no,zs),e(oo,Os),e(pe,Ds),$(Tt,pe,null),e(pe,Ls),e(pe,Fe),$(so,Fe,null),e(Fe,Ss),e(Fe,ht),e(ht,Rs),e(ht,yo),e(yo,Ks),e(ht,Ws),e(ht,Uo),e(Uo,Xs),e(ht,Us),e(Fe,Bs),$(Nt,Fe,null),e(Fe,Hs),$(Et,Fe,null),m(o,gn,_),m(o,mt,_),e(mt,kt),e(kt,Bo),$(ao,Bo,null),e(mt,Vs),e(mt,Ho),e(Ho,Gs),m(o,_n,_),m(o,Z,_),$(ro,Z,null),e(Z,Zs),e(Z,Vo),e(Vo,Ys),e(Z,Js),e(Z,io),e(io,Qs),e(io,Co),e(Co,ea),e(io,ta),e(Z,oa),e(Z,lo),e(lo,na),e(lo,co),e(co,sa),e(lo,aa),e(Z,ra),$(Ft,Z,null),e(Z,ia),e(Z,Ie),$(po,Ie,null),e(Ie,la),e(Ie,ut),e(ut,da),e(ut,bo),e(bo,ca),e(ut,pa),e(ut,Go),e(Go,fa),e(ut,ha),e(Ie,ma),$(It,Ie,null),e(Ie,ua),$(jt,Ie,null),vn=!0},p(o,[_]){const fo={};_&2&&(fo.$$scope={dirty:_,ctx:o}),gt.$set(fo);const Zo={};_&2&&(Zo.$$scope={dirty:_,ctx:o}),xt.$set(Zo);const Yo={};_&2&&(Yo.$$scope={dirty:_,ctx:o}),wt.$set(Yo);const Jo={};_&2&&(Jo.$$scope={dirty:_,ctx:o}),Ct.$set(Jo);const ho={};_&2&&(ho.$$scope={dirty:_,ctx:o}),bt.$set(ho);const Qo={};_&2&&(Qo.$$scope={dirty:_,ctx:o}),Tt.$set(Qo);const en={};_&2&&(en.$$scope={dirty:_,ctx:o}),Nt.$set(en);const tn={};_&2&&(tn.$$scope={dirty:_,ctx:o}),Et.$set(tn);const mo={};_&2&&(mo.$$scope={dirty:_,ctx:o}),Ft.$set(mo);const on={};_&2&&(on.$$scope={dirty:_,ctx:o}),It.$set(on);const nn={};_&2&&(nn.$$scope={dirty:_,ctx:o}),jt.$set(nn)},i(o){vn||(T(l.$$.fragment,o),T(y.$$.fragment,o),T(_e.$$.fragment,o),T(K.$$.fragment,o),T(gt.$$.fragment,o),T(St.$$.fragment,o),T(Rt.$$.fragment,o),T(Wt.$$.fragment,o),T(Xt.$$.fragment,o),T(Ht.$$.fragment,o),T(xt.$$.fragment,o),T(wt.$$.fragment,o),T(Vt.$$.fragment,o),T(Gt.$$.fragment,o),T(Jt.$$.fragment,o),T(Ct.$$.fragment,o),T(bt.$$.fragment,o),T(Qt.$$.fragment,o),T(eo.$$.fragment,o),T(Tt.$$.fragment,o),T(so.$$.fragment,o),T(Nt.$$.fragment,o),T(Et.$$.fragment,o),T(ao.$$.fragment,o),T(ro.$$.fragment,o),T(Ft.$$.fragment,o),T(po.$$.fragment,o),T(It.$$.fragment,o),T(jt.$$.fragment,o),vn=!0)},o(o){N(l.$$.fragment,o),N(y.$$.fragment,o),N(_e.$$.fragment,o),N(K.$$.fragment,o),N(gt.$$.fragment,o),N(St.$$.fragment,o),N(Rt.$$.fragment,o),N(Wt.$$.fragment,o),N(Xt.$$.fragment,o),N(Ht.$$.fragment,o),N(xt.$$.fragment,o),N(wt.$$.fragment,o),N(Vt.$$.fragment,o),N(Gt.$$.fragment,o),N(Jt.$$.fragment,o),N(Ct.$$.fragment,o),N(bt.$$.fragment,o),N(Qt.$$.fragment,o),N(eo.$$.fragment,o),N(Tt.$$.fragment,o),N(so.$$.fragment,o),N(Nt.$$.fragment,o),N(Et.$$.fragment,o),N(ao.$$.fragment,o),N(ro.$$.fragment,o),N(Ft.$$.fragment,o),N(po.$$.fragment,o),N(It.$$.fragment,o),N(jt.$$.fragment,o),vn=!1},d(o){t(d),o&&t(w),o&&t(g),E(l),o&&t(we),o&&t(z),E(y),o&&t(ye),o&&t(L),o&&t(Ce),o&&t(W),o&&t(be),o&&t(X),o&&t(fe),o&&t(j),o&&t($e),o&&t(U),o&&t(J),o&&t(Q),o&&t(q),o&&t(ee),o&&t(Te),o&&t(P),o&&t(F),o&&t(le),E(_e),o&&t(Ye),o&&t(R),E(K),E(gt),o&&t(ln),o&&t(it),E(St),o&&t(dn),o&&t(Ve),E(Rt),o&&t(cn),o&&t(lt),E(Wt),o&&t(pn),o&&t(Ge),E(Xt),E(Ht),E(xt),E(wt),o&&t(fn),o&&t(ct),E(Vt),o&&t(hn),o&&t(xe),E(Gt),E(Jt),E(Ct),E(bt),o&&t(mn),o&&t(ft),E(Qt),o&&t(un),o&&t(pe),E(eo),E(Tt),E(so),E(Nt),E(Et),o&&t(gn),o&&t(mt),E(ao),o&&t(_n),o&&t(Z),E(ro),E(Ft),E(po),E(It),E(jt)}}}const jr={local:"convnext",sections:[{local:"overview",title:"Overview"},{local:"transformers.ConvNextConfig",title:"ConvNextConfig"},{local:"transformers.ConvNextFeatureExtractor",title:"ConvNextFeatureExtractor"},{local:"transformers.ConvNextModel",title:"ConvNextModel"},{local:"transformers.ConvNextForImageClassification",title:"ConvNextForImageClassification"},{local:"transformers.TFConvNextModel",title:"TFConvNextModel"},{local:"transformers.TFConvNextForImageClassification",title:"TFConvNextForImageClassification"}],title:"ConvNeXT"};function Mr(M){return vr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Lr extends hr{constructor(d){super();mr(this,d,Mr,Ir,ur,{})}}export{Lr as default,jr as metadata};
