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

# Initializing a ConvNext convnext-tiny-224 style configuration
configuration = ConvNextConfig()
# Initializing a model 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> ConvNextModel, ConvNextConfig

<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 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(){c=n("p"),x=i("Example:"),g=h(),w(d.$$.fragment)},l(r){c=a(r,"P",{});var p=s(c);x=l(p,"Example:"),p.forEach(o),g=m(r),$(d.$$.fragment,r)},m(r,p){_(r,c,p),e(c,x),_(r,g,p),b(d,r,p),v=!0},p:Eo,i(r){v||(T(d.$$.fragment,r),v=!0)},o(r){y(d.$$.fragment,r),v=!1},d(r){r&&o(c),r&&o(g),N(d,r)}}}function Cr(k){let c,x,g,d,v;return{c(){c=n("p"),x=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),d=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){c=a(r,"P",{});var p=s(c);x=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(p,"CODE",{});var F=s(g);d=l(F,"Module"),F.forEach(o),v=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(r,p){_(r,c,p),e(c,x),e(c,g),e(g,d),e(c,v)},d(r){r&&o(c)}}}function wr(k){let c,x,g,d,v;return d=new Fo({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(){c=n("p"),x=i("Example:"),g=h(),w(d.$$.fragment)},l(r){c=a(r,"P",{});var p=s(c);x=l(p,"Example:"),p.forEach(o),g=m(r),$(d.$$.fragment,r)},m(r,p){_(r,c,p),e(c,x),_(r,g,p),b(d,r,p),v=!0},p:Eo,i(r){v||(T(d.$$.fragment,r),v=!0)},o(r){y(d.$$.fragment,r),v=!1},d(r){r&&o(c),r&&o(g),N(d,r)}}}function $r(k){let c,x,g,d,v;return{c(){c=n("p"),x=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),d=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){c=a(r,"P",{});var p=s(c);x=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(p,"CODE",{});var F=s(g);d=l(F,"Module"),F.forEach(o),v=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(r,p){_(r,c,p),e(c,x),e(c,g),e(g,d),e(c,v)},d(r){r&&o(c)}}}function br(k){let c,x,g,d,v;return d=new Fo({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(){c=n("p"),x=i("Example:"),g=h(),w(d.$$.fragment)},l(r){c=a(r,"P",{});var p=s(c);x=l(p,"Example:"),p.forEach(o),g=m(r),$(d.$$.fragment,r)},m(r,p){_(r,c,p),e(c,x),_(r,g,p),b(d,r,p),v=!0},p:Eo,i(r){v||(T(d.$$.fragment,r),v=!0)},o(r){y(d.$$.fragment,r),v=!1},d(r){r&&o(c),r&&o(g),N(d,r)}}}function Tr(k){let c,x,g,d,v,r,p,F,Y,S,E,z,M,O,J,P,Q,U;return{c(){c=n("p"),x=i("TF 2.0 models accepts two formats as inputs:"),g=h(),d=n("ul"),v=n("li"),r=i("having all inputs as keyword arguments (like PyTorch models), or"),p=h(),F=n("li"),Y=i("having all inputs as a list, tuple or dict in the first positional arguments."),S=h(),E=n("p"),z=i("This second option is useful when using "),M=n("code"),O=i("tf.keras.Model.fit"),J=i(` method which currently requires having all the
tensors in the first argument of the model call function: `),P=n("code"),Q=i("model(inputs)"),U=i(".")},l(C){c=a(C,"P",{});var I=s(c);x=l(I,"TF 2.0 models accepts two formats as inputs:"),I.forEach(o),g=m(C),d=a(C,"UL",{});var q=s(d);v=a(q,"LI",{});var ae=s(v);r=l(ae,"having all inputs as keyword arguments (like PyTorch models), or"),ae.forEach(o),p=m(q),F=a(q,"LI",{});var se=s(F);Y=l(se,"having all inputs as a list, tuple or dict in the first positional arguments."),se.forEach(o),q.forEach(o),S=m(C),E=a(C,"P",{});var j=s(E);z=l(j,"This second option is useful when using "),M=a(j,"CODE",{});var V=s(M);O=l(V,"tf.keras.Model.fit"),V.forEach(o),J=l(j,` method which currently requires having all the
tensors in the first argument of the model call function: `),P=a(j,"CODE",{});var re=s(P);Q=l(re,"model(inputs)"),re.forEach(o),U=l(j,"."),j.forEach(o)},m(C,I){_(C,c,I),e(c,x),_(C,g,I),_(C,d,I),e(d,v),e(v,r),e(d,p),e(d,F),e(F,Y),_(C,S,I),_(C,E,I),e(E,z),e(E,M),e(M,O),e(E,J),e(E,P),e(P,Q),e(E,U)},d(C){C&&o(c),C&&o(g),C&&o(d),C&&o(S),C&&o(E)}}}function yr(k){let c,x,g,d,v;return{c(){c=n("p"),x=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),d=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){c=a(r,"P",{});var p=s(c);x=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(p,"CODE",{});var F=s(g);d=l(F,"Module"),F.forEach(o),v=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(r,p){_(r,c,p),e(c,x),e(c,g),e(g,d),e(c,v)},d(r){r&&o(c)}}}function Nr(k){let c,x,g,d,v;return d=new Fo({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(){c=n("p"),x=i("Examples:"),g=h(),w(d.$$.fragment)},l(r){c=a(r,"P",{});var p=s(c);x=l(p,"Examples:"),p.forEach(o),g=m(r),$(d.$$.fragment,r)},m(r,p){_(r,c,p),e(c,x),_(r,g,p),b(d,r,p),v=!0},p:Eo,i(r){v||(T(d.$$.fragment,r),v=!0)},o(r){y(d.$$.fragment,r),v=!1},d(r){r&&o(c),r&&o(g),N(d,r)}}}function Er(k){let c,x,g,d,v,r,p,F,Y,S,E,z,M,O,J,P,Q,U;return{c(){c=n("p"),x=i("TF 2.0 models accepts two formats as inputs:"),g=h(),d=n("ul"),v=n("li"),r=i("having all inputs as keyword arguments (like PyTorch models), or"),p=h(),F=n("li"),Y=i("having all inputs as a list, tuple or dict in the first positional arguments."),S=h(),E=n("p"),z=i("This second option is useful when using "),M=n("code"),O=i("tf.keras.Model.fit"),J=i(` method which currently requires having all the
tensors in the first argument of the model call function: `),P=n("code"),Q=i("model(inputs)"),U=i(".")},l(C){c=a(C,"P",{});var I=s(c);x=l(I,"TF 2.0 models accepts two formats as inputs:"),I.forEach(o),g=m(C),d=a(C,"UL",{});var q=s(d);v=a(q,"LI",{});var ae=s(v);r=l(ae,"having all inputs as keyword arguments (like PyTorch models), or"),ae.forEach(o),p=m(q),F=a(q,"LI",{});var se=s(F);Y=l(se,"having all inputs as a list, tuple or dict in the first positional arguments."),se.forEach(o),q.forEach(o),S=m(C),E=a(C,"P",{});var j=s(E);z=l(j,"This second option is useful when using "),M=a(j,"CODE",{});var V=s(M);O=l(V,"tf.keras.Model.fit"),V.forEach(o),J=l(j,` method which currently requires having all the
tensors in the first argument of the model call function: `),P=a(j,"CODE",{});var re=s(P);Q=l(re,"model(inputs)"),re.forEach(o),U=l(j,"."),j.forEach(o)},m(C,I){_(C,c,I),e(c,x),_(C,g,I),_(C,d,I),e(d,v),e(v,r),e(d,p),e(d,F),e(F,Y),_(C,S,I),_(C,E,I),e(E,z),e(E,M),e(M,O),e(E,J),e(E,P),e(P,Q),e(E,U)},d(C){C&&o(c),C&&o(g),C&&o(d),C&&o(S),C&&o(E)}}}function Fr(k){let c,x,g,d,v;return{c(){c=n("p"),x=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),d=i("Module"),v=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){c=a(r,"P",{});var p=s(c);x=l(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(p,"CODE",{});var F=s(g);d=l(F,"Module"),F.forEach(o),v=l(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(o)},m(r,p){_(r,c,p),e(c,x),e(c,g),e(g,d),e(c,v)},d(r){r&&o(c)}}}function kr(k){let c,x,g,d,v;return d=new Fo({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(){c=n("p"),x=i("Examples:"),g=h(),w(d.$$.fragment)},l(r){c=a(r,"P",{});var p=s(c);x=l(p,"Examples:"),p.forEach(o),g=m(r),$(d.$$.fragment,r)},m(r,p){_(r,c,p),e(c,x),_(r,g,p),b(d,r,p),v=!0},p:Eo,i(r){v||(T(d.$$.fragment,r),v=!0)},o(r){y(d.$$.fragment,r),v=!1},d(r){r&&o(c),r&&o(g),N(d,r)}}}function Ir(k){let c,x,g,d,v,r,p,F,Y,S,E,z,M,O,J,P,Q,U,C,I,q,ae,se,j,V,re,ko,Et,Zt,cn,Io,Ft,dn,jo,kt,Yt,fn,Mo,xe,us,Po,Ce,pn,It,hn,mn,qo,L,un,Be,gn,_n,He,vn,xn,Ke,Cn,wn,Re,$n,bn,Ge,Tn,yn,Ao,ie,we,Jt,Ze,Nn,Qt,En,zo,W,Ye,Fn,le,kn,jt,In,jn,Je,Mn,Pn,qn,ce,An,Mt,zn,Ln,Pt,On,Dn,Sn,$e,Lo,de,be,eo,Qe,Wn,to,Xn,Oo,ee,et,Un,oo,Vn,Bn,tt,Hn,qt,Kn,Rn,Do,fe,Te,no,ot,Gn,ao,Zn,So,te,nt,Yn,at,Jn,st,Qn,ea,ta,B,rt,oa,pe,na,At,aa,sa,so,ra,ia,la,ye,ca,Ne,Wo,he,Ee,ro,it,da,io,fa,Xo,X,lt,pa,lo,ha,ma,ct,ua,dt,ga,_a,va,H,ft,xa,me,Ca,zt,wa,$a,co,ba,Ta,ya,Fe,Na,ke,Uo,ue,Ie,fo,pt,Ea,po,Fa,Vo,D,ht,ka,mt,Ia,Lt,ja,Ma,Pa,ut,qa,gt,Aa,za,La,je,Oa,K,_t,Da,ge,Sa,Ot,Wa,Xa,ho,Ua,Va,Ba,Me,Ha,Pe,Bo,_e,qe,mo,vt,Ka,uo,Ra,Ho,A,xt,Ga,go,Za,Ya,Ct,Ja,Dt,Qa,es,ts,wt,os,$t,ns,as,ss,Ae,rs,R,bt,is,ve,ls,St,cs,ds,_o,fs,ps,hs,ze,ms,Le,Ko;return r=new Ve({}),O=new Ve({}),Ze=new Ve({}),Ye=new ne({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_17548/src/transformers/models/convnext/configuration_convnext.py#L29"}}),$e=new No({props:{anchor:"transformers.ConvNextConfig.example",$$slots:{default:[xr]},$$scope:{ctx:k}}}),Qe=new Ve({}),et=new ne({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.BICUBIC</code>) &#x2014;
An optional resampling filter. This can be one of <code>PIL.Image.NEAREST</code>, <code>PIL.Image.BOX</code>,
<code>PIL.Image.BILINEAR</code>, <code>PIL.Image.HAMMING</code>, <code>PIL.Image.BICUBIC</code> or <code>PIL.Image.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_17548/src/transformers/models/convnext/feature_extraction_convnext.py#L36"}}),ot=new Ve({}),nt=new ne({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_17548/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_17548/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_17548/src/transformers/models/convnext/modeling_convnext.py#L312"}}),rt=new ne({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_17548/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_17548/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_17548/src/transformers/models/convnext/modeling_convnext.py#L326",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_17548/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>
`}}),ye=new Gt({props:{$$slots:{default:[Cr]},$$scope:{ctx:k}}}),Ne=new No({props:{anchor:"transformers.ConvNextModel.forward.example",$$slots:{default:[wr]},$$scope:{ctx:k}}}),it=new Ve({}),lt=new ne({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_17548/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_17548/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_17548/src/transformers/models/convnext/modeling_convnext.py#L379"}}),ft=new ne({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_17548/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_17548/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_17548/src/transformers/models/convnext/modeling_convnext.py#L394",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/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_17548/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_17548/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fe=new Gt({props:{$$slots:{default:[$r]},$$scope:{ctx:k}}}),ke=new No({props:{anchor:"transformers.ConvNextForImageClassification.forward.example",$$slots:{default:[br]},$$scope:{ctx:k}}}),pt=new Ve({}),ht=new ne({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_17548/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_17548/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_17548/src/transformers/models/convnext/modeling_tf_convnext.py#L427"}}),je=new Gt({props:{$$slots:{default:[Tr]},$$scope:{ctx:k}}}),_t=new ne({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_17548/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_17548/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_17548/src/transformers/models/convnext/modeling_tf_convnext.py#L432",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/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_17548/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_17548/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Me=new Gt({props:{$$slots:{default:[yr]},$$scope:{ctx:k}}}),Pe=new No({props:{anchor:"transformers.TFConvNextModel.call.example",$$slots:{default:[Nr]},$$scope:{ctx:k}}}),vt=new Ve({}),xt=new ne({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_17548/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_17548/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_17548/src/transformers/models/convnext/modeling_tf_convnext.py#L494"}}),Ae=new Gt({props:{$$slots:{default:[Er]},$$scope:{ctx:k}}}),bt=new ne({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_17548/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_17548/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_17548/src/transformers/models/convnext/modeling_tf_convnext.py#L509",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/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_17548/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_17548/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ze=new Gt({props:{$$slots:{default:[Fr]},$$scope:{ctx:k}}}),Le=new No({props:{anchor:"transformers.TFConvNextForImageClassification.call.example",$$slots:{default:[kr]},$$scope:{ctx:k}}}),{c(){c=n("meta"),x=h(),g=n("h1"),d=n("a"),v=n("span"),w(r.$$.fragment),p=h(),F=n("span"),Y=i("ConvNeXT"),S=h(),E=n("h2"),z=n("a"),M=n("span"),w(O.$$.fragment),J=h(),P=n("span"),Q=i("Overview"),U=h(),C=n("p"),I=i("The ConvNeXT model was proposed in "),q=n("a"),ae=i("A ConvNet for the 2020s"),se=i(` 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.`),j=h(),V=n("p"),re=i("The abstract from the paper is the following:"),ko=h(),Et=n("p"),Zt=n("em"),cn=i(`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.`),Io=h(),Ft=n("p"),dn=i("Tips:"),jo=h(),kt=n("ul"),Yt=n("li"),fn=i("See the code examples below each model regarding usage."),Mo=h(),xe=n("img"),Po=h(),Ce=n("small"),pn=i("ConvNeXT architecture. Taken from the "),It=n("a"),hn=i("original paper"),mn=i("."),qo=h(),L=n("p"),un=i("This model was contributed by "),Be=n("a"),gn=i("nielsr"),_n=i(". TensorFlow version of the model was contributed by "),He=n("a"),vn=i("ariG23498"),xn=i(`,
`),Ke=n("a"),Cn=i("gante"),wn=i(", and "),Re=n("a"),$n=i("sayakpaul"),bn=i(" (equal contribution). The original code can be found "),Ge=n("a"),Tn=i("here"),yn=i("."),Ao=h(),ie=n("h2"),we=n("a"),Jt=n("span"),w(Ze.$$.fragment),Nn=h(),Qt=n("span"),En=i("ConvNextConfig"),zo=h(),W=n("div"),w(Ye.$$.fragment),Fn=h(),le=n("p"),kn=i("This is the configuration class to store the configuration of a "),jt=n("a"),In=i("ConvNextModel"),jn=i(`. 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
`),Je=n("a"),Mn=i("facebook/convnext-tiny-224"),Pn=i(" architecture."),qn=h(),ce=n("p"),An=i("Configuration objects inherit from "),Mt=n("a"),zn=i("PretrainedConfig"),Ln=i(` and can be used to control the model outputs. Read the
documentation from `),Pt=n("a"),On=i("PretrainedConfig"),Dn=i(" for more information."),Sn=h(),w($e.$$.fragment),Lo=h(),de=n("h2"),be=n("a"),eo=n("span"),w(Qe.$$.fragment),Wn=h(),to=n("span"),Xn=i("ConvNextFeatureExtractor"),Oo=h(),ee=n("div"),w(et.$$.fragment),Un=h(),oo=n("p"),Vn=i("Constructs a ConvNeXT feature extractor."),Bn=h(),tt=n("p"),Hn=i("This feature extractor inherits from "),qt=n("a"),Kn=i("FeatureExtractionMixin"),Rn=i(` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),Do=h(),fe=n("h2"),Te=n("a"),no=n("span"),w(ot.$$.fragment),Gn=h(),ao=n("span"),Zn=i("ConvNextModel"),So=h(),te=n("div"),w(nt.$$.fragment),Yn=h(),at=n("p"),Jn=i(`The bare ConvNext model outputting raw features without any specific head on top.
This model is a PyTorch `),st=n("a"),Qn=i("torch.nn.Module"),ea=i(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ta=h(),B=n("div"),w(rt.$$.fragment),oa=h(),pe=n("p"),na=i("The "),At=n("a"),aa=i("ConvNextModel"),sa=i(" forward method, overrides the "),so=n("code"),ra=i("__call__"),ia=i(" special method."),la=h(),w(ye.$$.fragment),ca=h(),w(Ne.$$.fragment),Wo=h(),he=n("h2"),Ee=n("a"),ro=n("span"),w(it.$$.fragment),da=h(),io=n("span"),fa=i("ConvNextForImageClassification"),Xo=h(),X=n("div"),w(lt.$$.fragment),pa=h(),lo=n("p"),ha=i(`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),ma=h(),ct=n("p"),ua=i("This model is a PyTorch "),dt=n("a"),ga=i("torch.nn.Module"),_a=i(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),va=h(),H=n("div"),w(ft.$$.fragment),xa=h(),me=n("p"),Ca=i("The "),zt=n("a"),wa=i("ConvNextForImageClassification"),$a=i(" forward method, overrides the "),co=n("code"),ba=i("__call__"),Ta=i(" special method."),ya=h(),w(Fe.$$.fragment),Na=h(),w(ke.$$.fragment),Uo=h(),ue=n("h2"),Ie=n("a"),fo=n("span"),w(pt.$$.fragment),Ea=h(),po=n("span"),Fa=i("TFConvNextModel"),Vo=h(),D=n("div"),w(ht.$$.fragment),ka=h(),mt=n("p"),Ia=i(`The bare ConvNext model outputting raw features without any specific head on top.
This model inherits from `),Lt=n("a"),ja=i("TFPreTrainedModel"),Ma=i(`. 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.)`),Pa=h(),ut=n("p"),qa=i("This model is also a "),gt=n("a"),Aa=i("tf.keras.Model"),za=i(` 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.`),La=h(),w(je.$$.fragment),Oa=h(),K=n("div"),w(_t.$$.fragment),Da=h(),ge=n("p"),Sa=i("The "),Ot=n("a"),Wa=i("TFConvNextModel"),Xa=i(" forward method, overrides the "),ho=n("code"),Ua=i("__call__"),Va=i(" special method."),Ba=h(),w(Me.$$.fragment),Ha=h(),w(Pe.$$.fragment),Bo=h(),_e=n("h2"),qe=n("a"),mo=n("span"),w(vt.$$.fragment),Ka=h(),uo=n("span"),Ra=i("TFConvNextForImageClassification"),Ho=h(),A=n("div"),w(xt.$$.fragment),Ga=h(),go=n("p"),Za=i(`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Ya=h(),Ct=n("p"),Ja=i("This model inherits from "),Dt=n("a"),Qa=i("TFPreTrainedModel"),es=i(`. 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.)`),ts=h(),wt=n("p"),os=i("This model is also a "),$t=n("a"),ns=i("tf.keras.Model"),as=i(` 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.`),ss=h(),w(Ae.$$.fragment),rs=h(),R=n("div"),w(bt.$$.fragment),is=h(),ve=n("p"),ls=i("The "),St=n("a"),cs=i("TFConvNextForImageClassification"),ds=i(" forward method, overrides the "),_o=n("code"),fs=i("__call__"),ps=i(" special method."),hs=h(),w(ze.$$.fragment),ms=h(),w(Le.$$.fragment),this.h()},l(t){const u=gr('[data-svelte="svelte-1phssyn"]',document.head);c=a(u,"META",{name:!0,content:!0}),u.forEach(o),x=m(t),g=a(t,"H1",{class:!0});var Tt=s(g);d=a(Tt,"A",{id:!0,class:!0,href:!0});var vo=s(d);v=a(vo,"SPAN",{});var xo=s(v);$(r.$$.fragment,xo),xo.forEach(o),vo.forEach(o),p=m(Tt),F=a(Tt,"SPAN",{});var Co=s(F);Y=l(Co,"ConvNeXT"),Co.forEach(o),Tt.forEach(o),S=m(t),E=a(t,"H2",{class:!0});var yt=s(E);z=a(yt,"A",{id:!0,class:!0,href:!0});var wo=s(z);M=a(wo,"SPAN",{});var $o=s(M);$(O.$$.fragment,$o),$o.forEach(o),wo.forEach(o),J=m(yt),P=a(yt,"SPAN",{});var bo=s(P);Q=l(bo,"Overview"),bo.forEach(o),yt.forEach(o),U=m(t),C=a(t,"P",{});var Nt=s(C);I=l(Nt,"The ConvNeXT model was proposed in "),q=a(Nt,"A",{href:!0,rel:!0});var To=s(q);ae=l(To,"A ConvNet for the 2020s"),To.forEach(o),se=l(Nt,` 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.`),Nt.forEach(o),j=m(t),V=a(t,"P",{});var yo=s(V);re=l(yo,"The abstract from the paper is the following:"),yo.forEach(o),ko=m(t),Et=a(t,"P",{});var gs=s(Et);Zt=a(gs,"EM",{});var _s=s(Zt);cn=l(_s,`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.`),_s.forEach(o),gs.forEach(o),Io=m(t),Ft=a(t,"P",{});var vs=s(Ft);dn=l(vs,"Tips:"),vs.forEach(o),jo=m(t),kt=a(t,"UL",{});var xs=s(kt);Yt=a(xs,"LI",{});var Cs=s(Yt);fn=l(Cs,"See the code examples below each model regarding usage."),Cs.forEach(o),xs.forEach(o),Mo=m(t),xe=a(t,"IMG",{src:!0,alt:!0,width:!0}),Po=m(t),Ce=a(t,"SMALL",{});var Ro=s(Ce);pn=l(Ro,"ConvNeXT architecture. Taken from the "),It=a(Ro,"A",{href:!0});var ws=s(It);hn=l(ws,"original paper"),ws.forEach(o),mn=l(Ro,"."),Ro.forEach(o),qo=m(t),L=a(t,"P",{});var G=s(L);un=l(G,"This model was contributed by "),Be=a(G,"A",{href:!0,rel:!0});var $s=s(Be);gn=l($s,"nielsr"),$s.forEach(o),_n=l(G,". TensorFlow version of the model was contributed by "),He=a(G,"A",{href:!0,rel:!0});var bs=s(He);vn=l(bs,"ariG23498"),bs.forEach(o),xn=l(G,`,
`),Ke=a(G,"A",{href:!0,rel:!0});var Ts=s(Ke);Cn=l(Ts,"gante"),Ts.forEach(o),wn=l(G,", and "),Re=a(G,"A",{href:!0,rel:!0});var ys=s(Re);$n=l(ys,"sayakpaul"),ys.forEach(o),bn=l(G," (equal contribution). The original code can be found "),Ge=a(G,"A",{href:!0,rel:!0});var Ns=s(Ge);Tn=l(Ns,"here"),Ns.forEach(o),yn=l(G,"."),G.forEach(o),Ao=m(t),ie=a(t,"H2",{class:!0});var Go=s(ie);we=a(Go,"A",{id:!0,class:!0,href:!0});var Es=s(we);Jt=a(Es,"SPAN",{});var Fs=s(Jt);$(Ze.$$.fragment,Fs),Fs.forEach(o),Es.forEach(o),Nn=m(Go),Qt=a(Go,"SPAN",{});var ks=s(Qt);En=l(ks,"ConvNextConfig"),ks.forEach(o),Go.forEach(o),zo=m(t),W=a(t,"DIV",{class:!0});var Oe=s(W);$(Ye.$$.fragment,Oe),Fn=m(Oe),le=a(Oe,"P",{});var Wt=s(le);kn=l(Wt,"This is the configuration class to store the configuration of a "),jt=a(Wt,"A",{href:!0});var Is=s(jt);In=l(Is,"ConvNextModel"),Is.forEach(o),jn=l(Wt,`. 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
`),Je=a(Wt,"A",{href:!0,rel:!0});var js=s(Je);Mn=l(js,"facebook/convnext-tiny-224"),js.forEach(o),Pn=l(Wt," architecture."),Wt.forEach(o),qn=m(Oe),ce=a(Oe,"P",{});var Xt=s(ce);An=l(Xt,"Configuration objects inherit from "),Mt=a(Xt,"A",{href:!0});var Ms=s(Mt);zn=l(Ms,"PretrainedConfig"),Ms.forEach(o),Ln=l(Xt,` and can be used to control the model outputs. Read the
documentation from `),Pt=a(Xt,"A",{href:!0});var Ps=s(Pt);On=l(Ps,"PretrainedConfig"),Ps.forEach(o),Dn=l(Xt," for more information."),Xt.forEach(o),Sn=m(Oe),$($e.$$.fragment,Oe),Oe.forEach(o),Lo=m(t),de=a(t,"H2",{class:!0});var Zo=s(de);be=a(Zo,"A",{id:!0,class:!0,href:!0});var qs=s(be);eo=a(qs,"SPAN",{});var As=s(eo);$(Qe.$$.fragment,As),As.forEach(o),qs.forEach(o),Wn=m(Zo),to=a(Zo,"SPAN",{});var zs=s(to);Xn=l(zs,"ConvNextFeatureExtractor"),zs.forEach(o),Zo.forEach(o),Oo=m(t),ee=a(t,"DIV",{class:!0});var Ut=s(ee);$(et.$$.fragment,Ut),Un=m(Ut),oo=a(Ut,"P",{});var Ls=s(oo);Vn=l(Ls,"Constructs a ConvNeXT feature extractor."),Ls.forEach(o),Bn=m(Ut),tt=a(Ut,"P",{});var Yo=s(tt);Hn=l(Yo,"This feature extractor inherits from "),qt=a(Yo,"A",{href:!0});var Os=s(qt);Kn=l(Os,"FeatureExtractionMixin"),Os.forEach(o),Rn=l(Yo,` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),Yo.forEach(o),Ut.forEach(o),Do=m(t),fe=a(t,"H2",{class:!0});var Jo=s(fe);Te=a(Jo,"A",{id:!0,class:!0,href:!0});var Ds=s(Te);no=a(Ds,"SPAN",{});var Ss=s(no);$(ot.$$.fragment,Ss),Ss.forEach(o),Ds.forEach(o),Gn=m(Jo),ao=a(Jo,"SPAN",{});var Ws=s(ao);Zn=l(Ws,"ConvNextModel"),Ws.forEach(o),Jo.forEach(o),So=m(t),te=a(t,"DIV",{class:!0});var Vt=s(te);$(nt.$$.fragment,Vt),Yn=m(Vt),at=a(Vt,"P",{});var Qo=s(at);Jn=l(Qo,`The bare ConvNext model outputting raw features without any specific head on top.
This model is a PyTorch `),st=a(Qo,"A",{href:!0,rel:!0});var Xs=s(st);Qn=l(Xs,"torch.nn.Module"),Xs.forEach(o),ea=l(Qo,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Qo.forEach(o),ta=m(Vt),B=a(Vt,"DIV",{class:!0});var De=s(B);$(rt.$$.fragment,De),oa=m(De),pe=a(De,"P",{});var Bt=s(pe);na=l(Bt,"The "),At=a(Bt,"A",{href:!0});var Us=s(At);aa=l(Us,"ConvNextModel"),Us.forEach(o),sa=l(Bt," forward method, overrides the "),so=a(Bt,"CODE",{});var Vs=s(so);ra=l(Vs,"__call__"),Vs.forEach(o),ia=l(Bt," special method."),Bt.forEach(o),la=m(De),$(ye.$$.fragment,De),ca=m(De),$(Ne.$$.fragment,De),De.forEach(o),Vt.forEach(o),Wo=m(t),he=a(t,"H2",{class:!0});var en=s(he);Ee=a(en,"A",{id:!0,class:!0,href:!0});var Bs=s(Ee);ro=a(Bs,"SPAN",{});var Hs=s(ro);$(it.$$.fragment,Hs),Hs.forEach(o),Bs.forEach(o),da=m(en),io=a(en,"SPAN",{});var Ks=s(io);fa=l(Ks,"ConvNextForImageClassification"),Ks.forEach(o),en.forEach(o),Xo=m(t),X=a(t,"DIV",{class:!0});var Se=s(X);$(lt.$$.fragment,Se),pa=m(Se),lo=a(Se,"P",{});var Rs=s(lo);ha=l(Rs,`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Rs.forEach(o),ma=m(Se),ct=a(Se,"P",{});var tn=s(ct);ua=l(tn,"This model is a PyTorch "),dt=a(tn,"A",{href:!0,rel:!0});var Gs=s(dt);ga=l(Gs,"torch.nn.Module"),Gs.forEach(o),_a=l(tn,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),tn.forEach(o),va=m(Se),H=a(Se,"DIV",{class:!0});var We=s(H);$(ft.$$.fragment,We),xa=m(We),me=a(We,"P",{});var Ht=s(me);Ca=l(Ht,"The "),zt=a(Ht,"A",{href:!0});var Zs=s(zt);wa=l(Zs,"ConvNextForImageClassification"),Zs.forEach(o),$a=l(Ht," forward method, overrides the "),co=a(Ht,"CODE",{});var Ys=s(co);ba=l(Ys,"__call__"),Ys.forEach(o),Ta=l(Ht," special method."),Ht.forEach(o),ya=m(We),$(Fe.$$.fragment,We),Na=m(We),$(ke.$$.fragment,We),We.forEach(o),Se.forEach(o),Uo=m(t),ue=a(t,"H2",{class:!0});var on=s(ue);Ie=a(on,"A",{id:!0,class:!0,href:!0});var Js=s(Ie);fo=a(Js,"SPAN",{});var Qs=s(fo);$(pt.$$.fragment,Qs),Qs.forEach(o),Js.forEach(o),Ea=m(on),po=a(on,"SPAN",{});var er=s(po);Fa=l(er,"TFConvNextModel"),er.forEach(o),on.forEach(o),Vo=m(t),D=a(t,"DIV",{class:!0});var oe=s(D);$(ht.$$.fragment,oe),ka=m(oe),mt=a(oe,"P",{});var nn=s(mt);Ia=l(nn,`The bare ConvNext model outputting raw features without any specific head on top.
This model inherits from `),Lt=a(nn,"A",{href:!0});var tr=s(Lt);ja=l(tr,"TFPreTrainedModel"),tr.forEach(o),Ma=l(nn,`. 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.)`),nn.forEach(o),Pa=m(oe),ut=a(oe,"P",{});var an=s(ut);qa=l(an,"This model is also a "),gt=a(an,"A",{href:!0,rel:!0});var or=s(gt);Aa=l(or,"tf.keras.Model"),or.forEach(o),za=l(an,` 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.`),an.forEach(o),La=m(oe),$(je.$$.fragment,oe),Oa=m(oe),K=a(oe,"DIV",{class:!0});var Xe=s(K);$(_t.$$.fragment,Xe),Da=m(Xe),ge=a(Xe,"P",{});var Kt=s(ge);Sa=l(Kt,"The "),Ot=a(Kt,"A",{href:!0});var nr=s(Ot);Wa=l(nr,"TFConvNextModel"),nr.forEach(o),Xa=l(Kt," forward method, overrides the "),ho=a(Kt,"CODE",{});var ar=s(ho);Ua=l(ar,"__call__"),ar.forEach(o),Va=l(Kt," special method."),Kt.forEach(o),Ba=m(Xe),$(Me.$$.fragment,Xe),Ha=m(Xe),$(Pe.$$.fragment,Xe),Xe.forEach(o),oe.forEach(o),Bo=m(t),_e=a(t,"H2",{class:!0});var sn=s(_e);qe=a(sn,"A",{id:!0,class:!0,href:!0});var sr=s(qe);mo=a(sr,"SPAN",{});var rr=s(mo);$(vt.$$.fragment,rr),rr.forEach(o),sr.forEach(o),Ka=m(sn),uo=a(sn,"SPAN",{});var ir=s(uo);Ra=l(ir,"TFConvNextForImageClassification"),ir.forEach(o),sn.forEach(o),Ho=m(t),A=a(t,"DIV",{class:!0});var Z=s(A);$(xt.$$.fragment,Z),Ga=m(Z),go=a(Z,"P",{});var lr=s(go);Za=l(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(o),Ya=m(Z),Ct=a(Z,"P",{});var rn=s(Ct);Ja=l(rn,"This model inherits from "),Dt=a(rn,"A",{href:!0});var cr=s(Dt);Qa=l(cr,"TFPreTrainedModel"),cr.forEach(o),es=l(rn,`. 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.)`),rn.forEach(o),ts=m(Z),wt=a(Z,"P",{});var ln=s(wt);os=l(ln,"This model is also a "),$t=a(ln,"A",{href:!0,rel:!0});var dr=s($t);ns=l(dr,"tf.keras.Model"),dr.forEach(o),as=l(ln,` 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.`),ln.forEach(o),ss=m(Z),$(Ae.$$.fragment,Z),rs=m(Z),R=a(Z,"DIV",{class:!0});var Ue=s(R);$(bt.$$.fragment,Ue),is=m(Ue),ve=a(Ue,"P",{});var Rt=s(ve);ls=l(Rt,"The "),St=a(Rt,"A",{href:!0});var fr=s(St);cs=l(fr,"TFConvNextForImageClassification"),fr.forEach(o),ds=l(Rt," forward method, overrides the "),_o=a(Rt,"CODE",{});var pr=s(_o);fs=l(pr,"__call__"),pr.forEach(o),ps=l(Rt," special method."),Rt.forEach(o),hs=m(Ue),$(ze.$$.fragment,Ue),ms=m(Ue),$(Le.$$.fragment,Ue),Ue.forEach(o),Z.forEach(o),this.h()},h(){f(c,"name","hf:doc:metadata"),f(c,"content",JSON.stringify(jr)),f(d,"id","convnext"),f(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"),f(d,"href","#convnext"),f(g,"class","relative group"),f(z,"id","overview"),f(z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(z,"href","#overview"),f(E,"class","relative group"),f(q,"href","https://arxiv.org/abs/2201.03545"),f(q,"rel","nofollow"),_r(xe.src,us="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/convnext_architecture.jpg")||f(xe,"src",us),f(xe,"alt","drawing"),f(xe,"width","600"),f(It,"href","https://arxiv.org/abs/2201.03545"),f(Be,"href","https://huggingface.co/nielsr"),f(Be,"rel","nofollow"),f(He,"href","https://github.com/ariG23498"),f(He,"rel","nofollow"),f(Ke,"href","https://github.com/gante"),f(Ke,"rel","nofollow"),f(Re,"href","https://github.com/sayakpaul"),f(Re,"rel","nofollow"),f(Ge,"href","https://github.com/facebookresearch/ConvNeXt"),f(Ge,"rel","nofollow"),f(we,"id","transformers.ConvNextConfig"),f(we,"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"),f(we,"href","#transformers.ConvNextConfig"),f(ie,"class","relative group"),f(jt,"href","/docs/transformers/pr_17548/en/model_doc/convnext#transformers.ConvNextModel"),f(Je,"href","https://huggingface.co/facebook/convnext-tiny-224"),f(Je,"rel","nofollow"),f(Mt,"href","/docs/transformers/pr_17548/en/main_classes/configuration#transformers.PretrainedConfig"),f(Pt,"href","/docs/transformers/pr_17548/en/main_classes/configuration#transformers.PretrainedConfig"),f(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(be,"id","transformers.ConvNextFeatureExtractor"),f(be,"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"),f(be,"href","#transformers.ConvNextFeatureExtractor"),f(de,"class","relative group"),f(qt,"href","/docs/transformers/pr_17548/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin"),f(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Te,"id","transformers.ConvNextModel"),f(Te,"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"),f(Te,"href","#transformers.ConvNextModel"),f(fe,"class","relative group"),f(st,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(st,"rel","nofollow"),f(At,"href","/docs/transformers/pr_17548/en/model_doc/convnext#transformers.ConvNextModel"),f(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ee,"id","transformers.ConvNextForImageClassification"),f(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"),f(Ee,"href","#transformers.ConvNextForImageClassification"),f(he,"class","relative group"),f(dt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(dt,"rel","nofollow"),f(zt,"href","/docs/transformers/pr_17548/en/model_doc/convnext#transformers.ConvNextForImageClassification"),f(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ie,"id","transformers.TFConvNextModel"),f(Ie,"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"),f(Ie,"href","#transformers.TFConvNextModel"),f(ue,"class","relative group"),f(Lt,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel"),f(gt,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(gt,"rel","nofollow"),f(Ot,"href","/docs/transformers/pr_17548/en/model_doc/convnext#transformers.TFConvNextModel"),f(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(qe,"id","transformers.TFConvNextForImageClassification"),f(qe,"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"),f(qe,"href","#transformers.TFConvNextForImageClassification"),f(_e,"class","relative group"),f(Dt,"href","/docs/transformers/pr_17548/en/main_classes/model#transformers.TFPreTrainedModel"),f($t,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f($t,"rel","nofollow"),f(St,"href","/docs/transformers/pr_17548/en/model_doc/convnext#transformers.TFConvNextForImageClassification"),f(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,u){e(document.head,c),_(t,x,u),_(t,g,u),e(g,d),e(d,v),b(r,v,null),e(g,p),e(g,F),e(F,Y),_(t,S,u),_(t,E,u),e(E,z),e(z,M),b(O,M,null),e(E,J),e(E,P),e(P,Q),_(t,U,u),_(t,C,u),e(C,I),e(C,q),e(q,ae),e(C,se),_(t,j,u),_(t,V,u),e(V,re),_(t,ko,u),_(t,Et,u),e(Et,Zt),e(Zt,cn),_(t,Io,u),_(t,Ft,u),e(Ft,dn),_(t,jo,u),_(t,kt,u),e(kt,Yt),e(Yt,fn),_(t,Mo,u),_(t,xe,u),_(t,Po,u),_(t,Ce,u),e(Ce,pn),e(Ce,It),e(It,hn),e(Ce,mn),_(t,qo,u),_(t,L,u),e(L,un),e(L,Be),e(Be,gn),e(L,_n),e(L,He),e(He,vn),e(L,xn),e(L,Ke),e(Ke,Cn),e(L,wn),e(L,Re),e(Re,$n),e(L,bn),e(L,Ge),e(Ge,Tn),e(L,yn),_(t,Ao,u),_(t,ie,u),e(ie,we),e(we,Jt),b(Ze,Jt,null),e(ie,Nn),e(ie,Qt),e(Qt,En),_(t,zo,u),_(t,W,u),b(Ye,W,null),e(W,Fn),e(W,le),e(le,kn),e(le,jt),e(jt,In),e(le,jn),e(le,Je),e(Je,Mn),e(le,Pn),e(W,qn),e(W,ce),e(ce,An),e(ce,Mt),e(Mt,zn),e(ce,Ln),e(ce,Pt),e(Pt,On),e(ce,Dn),e(W,Sn),b($e,W,null),_(t,Lo,u),_(t,de,u),e(de,be),e(be,eo),b(Qe,eo,null),e(de,Wn),e(de,to),e(to,Xn),_(t,Oo,u),_(t,ee,u),b(et,ee,null),e(ee,Un),e(ee,oo),e(oo,Vn),e(ee,Bn),e(ee,tt),e(tt,Hn),e(tt,qt),e(qt,Kn),e(tt,Rn),_(t,Do,u),_(t,fe,u),e(fe,Te),e(Te,no),b(ot,no,null),e(fe,Gn),e(fe,ao),e(ao,Zn),_(t,So,u),_(t,te,u),b(nt,te,null),e(te,Yn),e(te,at),e(at,Jn),e(at,st),e(st,Qn),e(at,ea),e(te,ta),e(te,B),b(rt,B,null),e(B,oa),e(B,pe),e(pe,na),e(pe,At),e(At,aa),e(pe,sa),e(pe,so),e(so,ra),e(pe,ia),e(B,la),b(ye,B,null),e(B,ca),b(Ne,B,null),_(t,Wo,u),_(t,he,u),e(he,Ee),e(Ee,ro),b(it,ro,null),e(he,da),e(he,io),e(io,fa),_(t,Xo,u),_(t,X,u),b(lt,X,null),e(X,pa),e(X,lo),e(lo,ha),e(X,ma),e(X,ct),e(ct,ua),e(ct,dt),e(dt,ga),e(ct,_a),e(X,va),e(X,H),b(ft,H,null),e(H,xa),e(H,me),e(me,Ca),e(me,zt),e(zt,wa),e(me,$a),e(me,co),e(co,ba),e(me,Ta),e(H,ya),b(Fe,H,null),e(H,Na),b(ke,H,null),_(t,Uo,u),_(t,ue,u),e(ue,Ie),e(Ie,fo),b(pt,fo,null),e(ue,Ea),e(ue,po),e(po,Fa),_(t,Vo,u),_(t,D,u),b(ht,D,null),e(D,ka),e(D,mt),e(mt,Ia),e(mt,Lt),e(Lt,ja),e(mt,Ma),e(D,Pa),e(D,ut),e(ut,qa),e(ut,gt),e(gt,Aa),e(ut,za),e(D,La),b(je,D,null),e(D,Oa),e(D,K),b(_t,K,null),e(K,Da),e(K,ge),e(ge,Sa),e(ge,Ot),e(Ot,Wa),e(ge,Xa),e(ge,ho),e(ho,Ua),e(ge,Va),e(K,Ba),b(Me,K,null),e(K,Ha),b(Pe,K,null),_(t,Bo,u),_(t,_e,u),e(_e,qe),e(qe,mo),b(vt,mo,null),e(_e,Ka),e(_e,uo),e(uo,Ra),_(t,Ho,u),_(t,A,u),b(xt,A,null),e(A,Ga),e(A,go),e(go,Za),e(A,Ya),e(A,Ct),e(Ct,Ja),e(Ct,Dt),e(Dt,Qa),e(Ct,es),e(A,ts),e(A,wt),e(wt,os),e(wt,$t),e($t,ns),e(wt,as),e(A,ss),b(Ae,A,null),e(A,rs),e(A,R),b(bt,R,null),e(R,is),e(R,ve),e(ve,ls),e(ve,St),e(St,cs),e(ve,ds),e(ve,_o),e(_o,fs),e(ve,ps),e(R,hs),b(ze,R,null),e(R,ms),b(Le,R,null),Ko=!0},p(t,[u]){const Tt={};u&2&&(Tt.$$scope={dirty:u,ctx:t}),$e.$set(Tt);const vo={};u&2&&(vo.$$scope={dirty:u,ctx:t}),ye.$set(vo);const xo={};u&2&&(xo.$$scope={dirty:u,ctx:t}),Ne.$set(xo);const Co={};u&2&&(Co.$$scope={dirty:u,ctx:t}),Fe.$set(Co);const yt={};u&2&&(yt.$$scope={dirty:u,ctx:t}),ke.$set(yt);const wo={};u&2&&(wo.$$scope={dirty:u,ctx:t}),je.$set(wo);const $o={};u&2&&($o.$$scope={dirty:u,ctx:t}),Me.$set($o);const bo={};u&2&&(bo.$$scope={dirty:u,ctx:t}),Pe.$set(bo);const Nt={};u&2&&(Nt.$$scope={dirty:u,ctx:t}),Ae.$set(Nt);const To={};u&2&&(To.$$scope={dirty:u,ctx:t}),ze.$set(To);const yo={};u&2&&(yo.$$scope={dirty:u,ctx:t}),Le.$set(yo)},i(t){Ko||(T(r.$$.fragment,t),T(O.$$.fragment,t),T(Ze.$$.fragment,t),T(Ye.$$.fragment,t),T($e.$$.fragment,t),T(Qe.$$.fragment,t),T(et.$$.fragment,t),T(ot.$$.fragment,t),T(nt.$$.fragment,t),T(rt.$$.fragment,t),T(ye.$$.fragment,t),T(Ne.$$.fragment,t),T(it.$$.fragment,t),T(lt.$$.fragment,t),T(ft.$$.fragment,t),T(Fe.$$.fragment,t),T(ke.$$.fragment,t),T(pt.$$.fragment,t),T(ht.$$.fragment,t),T(je.$$.fragment,t),T(_t.$$.fragment,t),T(Me.$$.fragment,t),T(Pe.$$.fragment,t),T(vt.$$.fragment,t),T(xt.$$.fragment,t),T(Ae.$$.fragment,t),T(bt.$$.fragment,t),T(ze.$$.fragment,t),T(Le.$$.fragment,t),Ko=!0)},o(t){y(r.$$.fragment,t),y(O.$$.fragment,t),y(Ze.$$.fragment,t),y(Ye.$$.fragment,t),y($e.$$.fragment,t),y(Qe.$$.fragment,t),y(et.$$.fragment,t),y(ot.$$.fragment,t),y(nt.$$.fragment,t),y(rt.$$.fragment,t),y(ye.$$.fragment,t),y(Ne.$$.fragment,t),y(it.$$.fragment,t),y(lt.$$.fragment,t),y(ft.$$.fragment,t),y(Fe.$$.fragment,t),y(ke.$$.fragment,t),y(pt.$$.fragment,t),y(ht.$$.fragment,t),y(je.$$.fragment,t),y(_t.$$.fragment,t),y(Me.$$.fragment,t),y(Pe.$$.fragment,t),y(vt.$$.fragment,t),y(xt.$$.fragment,t),y(Ae.$$.fragment,t),y(bt.$$.fragment,t),y(ze.$$.fragment,t),y(Le.$$.fragment,t),Ko=!1},d(t){o(c),t&&o(x),t&&o(g),N(r),t&&o(S),t&&o(E),N(O),t&&o(U),t&&o(C),t&&o(j),t&&o(V),t&&o(ko),t&&o(Et),t&&o(Io),t&&o(Ft),t&&o(jo),t&&o(kt),t&&o(Mo),t&&o(xe),t&&o(Po),t&&o(Ce),t&&o(qo),t&&o(L),t&&o(Ao),t&&o(ie),N(Ze),t&&o(zo),t&&o(W),N(Ye),N($e),t&&o(Lo),t&&o(de),N(Qe),t&&o(Oo),t&&o(ee),N(et),t&&o(Do),t&&o(fe),N(ot),t&&o(So),t&&o(te),N(nt),N(rt),N(ye),N(Ne),t&&o(Wo),t&&o(he),N(it),t&&o(Xo),t&&o(X),N(lt),N(ft),N(Fe),N(ke),t&&o(Uo),t&&o(ue),N(pt),t&&o(Vo),t&&o(D),N(ht),N(je),N(_t),N(Me),N(Pe),t&&o(Bo),t&&o(_e),N(vt),t&&o(Ho),t&&o(A),N(xt),N(Ae),N(bt),N(ze),N(Le)}}}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(k){return vr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Dr extends hr{constructor(c){super();mr(this,c,Mr,Ir,ur,{})}}export{Dr as default,jr as metadata};
