import{S as mi,i as pi,s as fi,e as s,k as m,w as C,t as r,M as hi,c as n,d as o,m as p,a,x as w,h as i,b as d,N as gi,G as e,g as h,y as T,q as $,o as N,B as I,v as ui,L as Is}from"../../chunks/vendor-hf-doc-builder.js";import{T as Vt}from"../../chunks/Tip-hf-doc-builder.js";import{D as te}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ps}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as xo}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ns}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function vi(F){let c,x,v,u,y;return u=new Ps({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(){c=s("p"),x=r("Example:"),v=m(),C(u.$$.fragment)},l(l){c=n(l,"P",{});var f=a(c);x=i(f,"Example:"),f.forEach(o),v=p(l),w(u.$$.fragment,l)},m(l,f){h(l,c,f),e(c,x),h(l,v,f),T(u,l,f),y=!0},p:Is,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){N(u.$$.fragment,l),y=!1},d(l){l&&o(c),l&&o(v),I(u,l)}}}function _i(F){let c,x,v,u,y;return{c(){c=s("p"),x=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=s("code"),u=r("Module"),y=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=n(l,"P",{});var f=a(c);x=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=n(f,"CODE",{});var k=a(v);u=i(k,"Module"),k.forEach(o),y=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(l,f){h(l,c,f),e(c,x),e(c,v),e(v,u),e(c,y)},d(l){l&&o(c)}}}function yi(F){let c,x,v,u,y;return u=new Ps({props:{code:`from transformers import ConvNextImageProcessor, ConvNextModel
import torch
from datasets import load_dataset

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

feature_extractor = ConvNextImageProcessor.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> ConvNextImageProcessor, 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 = ConvNextImageProcessor.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=s("p"),x=r("Example:"),v=m(),C(u.$$.fragment)},l(l){c=n(l,"P",{});var f=a(c);x=i(f,"Example:"),f.forEach(o),v=p(l),w(u.$$.fragment,l)},m(l,f){h(l,c,f),e(c,x),h(l,v,f),T(u,l,f),y=!0},p:Is,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){N(u.$$.fragment,l),y=!1},d(l){l&&o(c),l&&o(v),I(u,l)}}}function xi(F){let c,x,v,u,y;return{c(){c=s("p"),x=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=s("code"),u=r("Module"),y=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=n(l,"P",{});var f=a(c);x=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=n(f,"CODE",{});var k=a(v);u=i(k,"Module"),k.forEach(o),y=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(l,f){h(l,c,f),e(c,x),e(c,v),e(v,u),e(c,y)},d(l){l&&o(c)}}}function bi(F){let c,x,v,u,y;return u=new Ps({props:{code:`from transformers import ConvNextImageProcessor, ConvNextForImageClassification
import torch
from datasets import load_dataset

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

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

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

image_processor = ConvNextImageProcessor.from_pretrained("facebook/convnext-tiny-224")
model = TFConvNextModel.from_pretrained("facebook/convnext-tiny-224")

inputs = image_processor(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> ConvNextImageProcessor, 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>image_processor = ConvNextImageProcessor.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 = image_processor(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=s("p"),x=r("Examples:"),v=m(),C(u.$$.fragment)},l(l){c=n(l,"P",{});var f=a(c);x=i(f,"Examples:"),f.forEach(o),v=p(l),w(u.$$.fragment,l)},m(l,f){h(l,c,f),e(c,x),h(l,v,f),T(u,l,f),y=!0},p:Is,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){N(u.$$.fragment,l),y=!1},d(l){l&&o(c),l&&o(v),I(u,l)}}}function $i(F){let c,x,v,u,y,l,f,k,De,Ce,D,Z,se,b,Ae,V,Le,we,O,Oe,ne,ae,Re,Te,W,Se,$e,X,ve,Ue,he,z,A,Ne,K,_e,We,Q,ee,Qe,M,oe,re,ge,Xe,ie,Ie,q,H,le,ce,Ke,B,L,Ve,j,He,Be;return{c(){c=s("p"),x=r("TensorFlow models and layers in "),v=s("code"),u=r("transformers"),y=r(" accept two formats as input:"),l=m(),f=s("ul"),k=s("li"),De=r("having all inputs as keyword arguments (like PyTorch models), or"),Ce=m(),D=s("li"),Z=r("having all inputs as a list, tuple or dict in the first positional argument."),se=m(),b=s("p"),Ae=r(`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 `),V=s("code"),Le=r("model.fit()"),we=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s("code"),Oe=r("model.fit()"),ne=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=s("code"),Re=r("fit()"),Te=r(" and "),W=s("code"),Se=r("predict()"),$e=r(`, such as when creating your own layers or models with
the Keras `),X=s("code"),ve=r("Functional"),Ue=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),he=m(),z=s("ul"),A=s("li"),Ne=r("a single Tensor with "),K=s("code"),_e=r("pixel_values"),We=r(" only and nothing else: "),Q=s("code"),ee=r("model(pixel_values)"),Qe=m(),M=s("li"),oe=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),re=s("code"),ge=r("model([pixel_values, attention_mask])"),Xe=r(" or "),ie=s("code"),Ie=r("model([pixel_values, attention_mask, token_type_ids])"),q=m(),H=s("li"),le=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ce=s("code"),Ke=r('model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),B=m(),L=s("p"),Ve=r(`Note that when creating models and layers with
`),j=s("a"),He=r("subclassing"),Be=r(` 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(_){c=n(_,"P",{});var P=a(c);x=i(P,"TensorFlow models and layers in "),v=n(P,"CODE",{});var to=a(v);u=i(to,"transformers"),to.forEach(o),y=i(P," accept two formats as input:"),P.forEach(o),l=p(_),f=n(_,"UL",{});var G=a(f);k=n(G,"LI",{});var so=a(k);De=i(so,"having all inputs as keyword arguments (like PyTorch models), or"),so.forEach(o),Ce=p(G),D=n(G,"LI",{});var no=a(D);Z=i(no,"having all inputs as a list, tuple or dict in the first positional argument."),no.forEach(o),G.forEach(o),se=p(_),b=n(_,"P",{});var E=a(b);Ae=i(E,`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 `),V=n(E,"CODE",{});var de=a(V);Le=i(de,"model.fit()"),de.forEach(o),we=i(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=n(E,"CODE",{});var ue=a(O);Oe=i(ue,"model.fit()"),ue.forEach(o),ne=i(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=n(E,"CODE",{});var Ge=a(ae);Re=i(Ge,"fit()"),Ge.forEach(o),Te=i(E," and "),W=n(E,"CODE",{});var ye=a(W);Se=i(ye,"predict()"),ye.forEach(o),$e=i(E,`, such as when creating your own layers or models with
the Keras `),X=n(E,"CODE",{});var ao=a(X);ve=i(ao,"Functional"),ao.forEach(o),Ue=i(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(o),he=p(_),z=n(_,"UL",{});var R=a(z);A=n(R,"LI",{});var me=a(A);Ne=i(me,"a single Tensor with "),K=n(me,"CODE",{});var eo=a(K);_e=i(eo,"pixel_values"),eo.forEach(o),We=i(me," only and nothing else: "),Q=n(me,"CODE",{});var S=a(Q);ee=i(S,"model(pixel_values)"),S.forEach(o),me.forEach(o),Qe=p(R),M=n(R,"LI",{});var U=a(M);oe=i(U,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),re=n(U,"CODE",{});var ro=a(re);ge=i(ro,"model([pixel_values, attention_mask])"),ro.forEach(o),Xe=i(U," or "),ie=n(U,"CODE",{});var pe=a(ie);Ie=i(pe,"model([pixel_values, attention_mask, token_type_ids])"),pe.forEach(o),U.forEach(o),q=p(R),H=n(R,"LI",{});var Ye=a(H);le=i(Ye,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ce=n(Ye,"CODE",{});var Pe=a(ce);Ke=i(Pe,'model({"pixel_values": pixel_values, "token_type_ids": token_type_ids})'),Pe.forEach(o),Ye.forEach(o),R.forEach(o),B=p(_),L=n(_,"P",{});var xe=a(L);Ve=i(xe,`Note that when creating models and layers with
`),j=n(xe,"A",{href:!0,rel:!0});var io=a(j);He=i(io,"subclassing"),io.forEach(o),Be=i(xe,` 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!`),xe.forEach(o),this.h()},h(){d(j,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),d(j,"rel","nofollow")},m(_,P){h(_,c,P),e(c,x),e(c,v),e(v,u),e(c,y),h(_,l,P),h(_,f,P),e(f,k),e(k,De),e(f,Ce),e(f,D),e(D,Z),h(_,se,P),h(_,b,P),e(b,Ae),e(b,V),e(V,Le),e(b,we),e(b,O),e(O,Oe),e(b,ne),e(b,ae),e(ae,Re),e(b,Te),e(b,W),e(W,Se),e(b,$e),e(b,X),e(X,ve),e(b,Ue),h(_,he,P),h(_,z,P),e(z,A),e(A,Ne),e(A,K),e(K,_e),e(A,We),e(A,Q),e(Q,ee),e(z,Qe),e(z,M),e(M,oe),e(M,re),e(re,ge),e(M,Xe),e(M,ie),e(ie,Ie),e(z,q),e(z,H),e(H,le),e(H,ce),e(ce,Ke),h(_,B,P),h(_,L,P),e(L,Ve),e(L,j),e(j,He),e(L,Be)},d(_){_&&o(c),_&&o(l),_&&o(f),_&&o(se),_&&o(b),_&&o(he),_&&o(z),_&&o(B),_&&o(L)}}}function Ni(F){let c,x,v,u,y;return{c(){c=s("p"),x=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=s("code"),u=r("Module"),y=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=n(l,"P",{});var f=a(c);x=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=n(f,"CODE",{});var k=a(v);u=i(k,"Module"),k.forEach(o),y=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(l,f){h(l,c,f),e(c,x),e(c,v),e(v,u),e(c,y)},d(l){l&&o(c)}}}function Ii(F){let c,x,v,u,y;return u=new Ps({props:{code:`from transformers import ConvNextImageProcessor, 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)

image_processor = ConvNextImageProcessor.from_pretrained("facebook/convnext-tiny-224")
model = TFConvNextForImageClassification.from_pretrained("facebook/convnext-tiny-224")

inputs = image_processor(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> ConvNextImageProcessor, 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>image_processor = ConvNextImageProcessor.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 = image_processor(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=s("p"),x=r("Examples:"),v=m(),C(u.$$.fragment)},l(l){c=n(l,"P",{});var f=a(c);x=i(f,"Examples:"),f.forEach(o),v=p(l),w(u.$$.fragment,l)},m(l,f){h(l,c,f),e(c,x),h(l,v,f),T(u,l,f),y=!0},p:Is,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){N(u.$$.fragment,l),y=!1},d(l){l&&o(c),l&&o(v),I(u,l)}}}function Pi(F){let c,x,v,u,y,l,f,k,De,Ce,D,Z,se,b,Ae,V,Le,we,O,Oe,ne,ae,Re,Te,W,Se,$e,X,ve,Ue,he,z,A,Ne,K,_e,We,Q,ee,Qe,M,oe,re,ge,Xe,ie,Ie,q,H,le,ce,Ke,B,L,Ve,j,He,Be,_,P,to,G,so,no,E,de,ue,Ge,ye,ao,R,me,eo,S,U,ro,pe,Ye,Pe,xe,io,Go,ln,cn,dn,lo,mn,kt,pn,fn,zt,hn,gn,un,bo,Es,co,Co,Ht,Yo,vn,Bt,_n,ks,Y,Jo,yn,Gt,xn,bn,wo,Zo,Cn,Yt,wn,Tn,To,Qo,$n,Jt,Nn,In,$o,et,Pn,Zt,En,kn,No,ot,zn,Qt,Fn,zs,mo,Io,es,tt,qn,os,jn,Fs,Je,st,Mn,ts,Dn,An,Po,nt,Ln,ss,On,qs,po,Eo,ns,at,Rn,as,Sn,js,Ze,rt,Un,it,Wn,lt,Xn,Kn,Vn,Ee,ct,Hn,fo,Bn,Ft,Gn,Yn,rs,Jn,Zn,Qn,ko,ea,zo,Ms,ho,Fo,is,dt,oa,ls,ta,Ds,be,mt,sa,cs,na,aa,pt,ra,ft,ia,la,ca,ke,ht,da,go,ma,qt,pa,fa,ds,ha,ga,ua,qo,va,jo,As,uo,Mo,ms,gt,_a,ps,ya,Ls,fe,ut,xa,vt,ba,jt,Ca,wa,Ta,_t,$a,yt,Na,Ia,Pa,Do,Ea,ze,xt,ka,vo,za,Mt,Fa,qa,fs,ja,Ma,Da,Ao,Aa,Lo,Os,_o,Oo,hs,bt,La,gs,Oa,Rs,J,Ct,Ra,us,Sa,Ua,wt,Wa,Dt,Xa,Ka,Va,Tt,Ha,$t,Ba,Ga,Ya,Ro,Ja,Fe,Nt,Za,yo,Qa,At,er,or,vs,tr,sr,nr,So,ar,Uo,Ss;return l=new xo({}),b=new xo({}),ye=new xo({}),U=new te({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/v4.25.1/src/transformers/models/convnext/configuration_convnext.py#L35"}}),bo=new Ns({props:{anchor:"transformers.ConvNextConfig.example",$$slots:{default:[vi]},$$scope:{ctx:F}}}),Yo=new xo({}),Jo=new te({props:{name:"class transformers.ConvNextImageProcessor",anchor:"transformers.ConvNextImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"crop_pct",val:": float = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvNextImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Controls whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overriden
by <code>do_resize</code> in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.ConvNextImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 384}</code>):
Resolution of the output image after <code>resize</code> is applied. If <code>size[&quot;shortest_edge&quot;]</code> &gt;= 384, the image is
resized to <code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>. Otherwise, the smaller edge of the image will
be matched to <code>int(size[&quot;shortest_edge&quot;]/crop_pct)</code>, after which the image is cropped to
<code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>. Only has an effect if <code>do_resize</code> is set to <code>True</code>. Can
be overriden by <code>size</code> in the <code>preprocess</code> method.`,name:"size"},{anchor:"transformers.ConvNextImageProcessor.crop_pct",description:`<strong>crop_pct</strong> (<code>float</code> <em>optional</em>, defaults to 244 / 256) &#x2014;
Percentage of the image to crop. Only has an effect if <code>do_resize</code> is <code>True</code> and size &lt; 384. Can be
overriden by <code>crop_pct</code> in the <code>preprocess</code> method.`,name:"crop_pct"},{anchor:"transformers.ConvNextImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overriden by <code>resample</code> in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.ConvNextImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overriden by <code>do_rescale</code> in
the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.ConvNextImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overriden by <code>rescale_factor</code> in the <code>preprocess</code>
method.`,name:"rescale_factor"},{anchor:"transformers.ConvNextImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.ConvNextImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.ConvNextImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/convnext/image_processing_convnext.py#L53"}}),Zo=new te({props:{name:"normalize",anchor:"transformers.ConvNextImageProcessor.normalize",parameters:[{name:"image",val:": ndarray"},{name:"mean",val:": typing.Union[float, typing.List[float]]"},{name:"std",val:": typing.Union[float, typing.List[float]]"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvNextImageProcessor.normalize.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
Image to normalize.`,name:"image"},{anchor:"transformers.ConvNextImageProcessor.normalize.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>) &#x2014;
Image mean.`,name:"image_mean"},{anchor:"transformers.ConvNextImageProcessor.normalize.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>) &#x2014;
Image standard deviation.`,name:"image_std"},{anchor:"transformers.ConvNextImageProcessor.normalize.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/convnext/image_processing_convnext.py#L184"}}),Qo=new te({props:{name:"preprocess",anchor:"transformers.ConvNextImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"crop_pct",val:": float = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvNextImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.ConvNextImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.ConvNextImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the output image after <code>resize</code> has been applied. If <code>size[&quot;shortest_edge&quot;]</code> &gt;= 384, the image
is resized to <code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>. Otherwise, the smaller edge of the
image will be matched to <code>int(size[&quot;shortest_edge&quot;]/ crop_pct)</code>, after which the image is cropped to
<code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>. Only has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"size"},{anchor:"transformers.ConvNextImageProcessor.preprocess.crop_pct",description:`<strong>crop_pct</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.crop_pct</code>) &#x2014;
Percentage of the image to crop if size &lt; 384.`,name:"crop_pct"},{anchor:"transformers.ConvNextImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of <code>PILImageResampling</code>, filters. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.ConvNextImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.ConvNextImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.ConvNextImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.ConvNextImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean.`,name:"image_mean"},{anchor:"transformers.ConvNextImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation.`,name:"image_std"},{anchor:"transformers.ConvNextImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.ConvNextImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
</ul>`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/convnext/image_processing_convnext.py#L207"}}),et=new te({props:{name:"rescale",anchor:"transformers.ConvNextImageProcessor.rescale",parameters:[{name:"image",val:": ndarray"},{name:"scale",val:": typing.Union[int, float]"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvNextImageProcessor.rescale.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
Image to rescale.`,name:"image"},{anchor:"transformers.ConvNextImageProcessor.rescale.scale",description:`<strong>scale</strong> (<code>int</code> or <code>float</code>) &#x2014;
Scale to apply to the image.`,name:"scale"},{anchor:"transformers.ConvNextImageProcessor.rescale.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/convnext/image_processing_convnext.py#L164"}}),ot=new te({props:{name:"resize",anchor:"transformers.ConvNextImageProcessor.resize",parameters:[{name:"image",val:": ndarray"},{name:"size",val:": typing.Dict[str, int]"},{name:"crop_pct",val:": float"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvNextImageProcessor.resize.image",description:`<strong>image</strong> (<code>np.ndarray</code>) &#x2014;
Image to resize.`,name:"image"},{anchor:"transformers.ConvNextImageProcessor.resize.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>) &#x2014;
Dictionary of the form <code>{&quot;shortest_edge&quot;: int}</code>, specifying the size of the output image. If
<code>size[&quot;shortest_edge&quot;]</code> &gt;= 384 image is resized to <code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>.
Otherwise, the smaller edge of the image will be matched to <code>int(size[&quot;shortest_edge&quot;] / crop_pct)</code>,
after which the image is cropped to <code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>.`,name:"size"},{anchor:"transformers.ConvNextImageProcessor.resize.crop_pct",description:`<strong>crop_pct</strong> (<code>float</code>) &#x2014;
Percentage of the image to crop. Only has an effect if size &lt; 384.`,name:"crop_pct"},{anchor:"transformers.ConvNextImageProcessor.resize.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BICUBIC</code>) &#x2014;
Resampling filter to use when resizing the image.`,name:"resample"},{anchor:"transformers.ConvNextImageProcessor.resize.data_format",description:`<strong>data_format</strong> (<code>str</code> or <code>ChannelDimension</code>, <em>optional</em>) &#x2014;
The channel dimension format of the image. If not provided, it will be the same as the input image.`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/convnext/image_processing_convnext.py#L119"}}),tt=new xo({}),st=new te({props:{name:"class transformers.ConvNextImageProcessor",anchor:"transformers.ConvNextImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"crop_pct",val:": float = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvNextImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Controls whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overriden
by <code>do_resize</code> in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.ConvNextImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 384}</code>):
Resolution of the output image after <code>resize</code> is applied. If <code>size[&quot;shortest_edge&quot;]</code> &gt;= 384, the image is
resized to <code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>. Otherwise, the smaller edge of the image will
be matched to <code>int(size[&quot;shortest_edge&quot;]/crop_pct)</code>, after which the image is cropped to
<code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>. Only has an effect if <code>do_resize</code> is set to <code>True</code>. Can
be overriden by <code>size</code> in the <code>preprocess</code> method.`,name:"size"},{anchor:"transformers.ConvNextImageProcessor.crop_pct",description:`<strong>crop_pct</strong> (<code>float</code> <em>optional</em>, defaults to 244 / 256) &#x2014;
Percentage of the image to crop. Only has an effect if <code>do_resize</code> is <code>True</code> and size &lt; 384. Can be
overriden by <code>crop_pct</code> in the <code>preprocess</code> method.`,name:"crop_pct"},{anchor:"transformers.ConvNextImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overriden by <code>resample</code> in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.ConvNextImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overriden by <code>do_rescale</code> in
the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.ConvNextImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Can be overriden by <code>rescale_factor</code> in the <code>preprocess</code>
method.`,name:"rescale_factor"},{anchor:"transformers.ConvNextImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.ConvNextImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.ConvNextImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/convnext/image_processing_convnext.py#L53"}}),nt=new te({props:{name:"preprocess",anchor:"transformers.ConvNextImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"crop_pct",val:": float = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvNextImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.ConvNextImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.ConvNextImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the output image after <code>resize</code> has been applied. If <code>size[&quot;shortest_edge&quot;]</code> &gt;= 384, the image
is resized to <code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>. Otherwise, the smaller edge of the
image will be matched to <code>int(size[&quot;shortest_edge&quot;]/ crop_pct)</code>, after which the image is cropped to
<code>(size[&quot;shortest_edge&quot;], size[&quot;shortest_edge&quot;])</code>. Only has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"size"},{anchor:"transformers.ConvNextImageProcessor.preprocess.crop_pct",description:`<strong>crop_pct</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.crop_pct</code>) &#x2014;
Percentage of the image to crop if size &lt; 384.`,name:"crop_pct"},{anchor:"transformers.ConvNextImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>int</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of <code>PILImageResampling</code>, filters. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.ConvNextImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.ConvNextImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.ConvNextImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.ConvNextImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean.`,name:"image_mean"},{anchor:"transformers.ConvNextImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation.`,name:"image_std"},{anchor:"transformers.ConvNextImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.ConvNextImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
</ul>`,name:"data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/convnext/image_processing_convnext.py#L207"}}),at=new xo({}),rt=new te({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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/convnext/modeling_convnext.py#L326"}}),ct=new te({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/v4.25.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<code>AutoImageProcessor.__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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/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/v4.25.1/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>
`}}),ko=new Vt({props:{$$slots:{default:[_i]},$$scope:{ctx:F}}}),zo=new Ns({props:{anchor:"transformers.ConvNextModel.forward.example",$$slots:{default:[yi]},$$scope:{ctx:F}}}),dt=new xo({}),mt=new te({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/v4.25.1/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/v4.25.1/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/convnext/modeling_convnext.py#L393"}}),ht=new te({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/v4.25.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<code>AutoImageProcessor.__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/v4.25.1/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/v4.25.1/src/transformers/models/convnext/modeling_convnext.py#L408",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qo=new Vt({props:{$$slots:{default:[xi]},$$scope:{ctx:F}}}),jo=new Ns({props:{anchor:"transformers.ConvNextForImageClassification.forward.example",$$slots:{default:[bi]},$$scope:{ctx:F}}}),gt=new xo({}),ut=new te({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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/convnext/modeling_tf_convnext.py#L452"}}),Do=new Vt({props:{$$slots:{default:[Ci]},$$scope:{ctx:F}}}),xt=new te({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/v4.25.1/en/model_doc/convnext#transformers.ConvNextImageProcessor">ConvNextImageProcessor</a>. See
<a href="/docs/transformers/v4.25.1/en/model_doc/deit#transformers.DeiTImageProcessor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> 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/v4.25.1/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/v4.25.1/src/transformers/models/convnext/modeling_tf_convnext.py#L457",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ao=new Vt({props:{$$slots:{default:[wi]},$$scope:{ctx:F}}}),Lo=new Ns({props:{anchor:"transformers.TFConvNextModel.call.example",$$slots:{default:[Ti]},$$scope:{ctx:F}}}),bt=new xo({}),Ct=new te({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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/convnext/modeling_tf_convnext.py#L527"}}),Ro=new Vt({props:{$$slots:{default:[$i]},$$scope:{ctx:F}}}),Nt=new te({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/v4.25.1/en/model_doc/convnext#transformers.ConvNextImageProcessor">ConvNextImageProcessor</a>. See
<a href="/docs/transformers/v4.25.1/en/model_doc/deit#transformers.DeiTImageProcessor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> 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/v4.25.1/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/v4.25.1/src/transformers/models/convnext/modeling_tf_convnext.py#L542",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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/v4.25.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),So=new Vt({props:{$$slots:{default:[Ni]},$$scope:{ctx:F}}}),Uo=new Ns({props:{anchor:"transformers.TFConvNextForImageClassification.call.example",$$slots:{default:[Ii]},$$scope:{ctx:F}}}),{c(){c=s("meta"),x=m(),v=s("h1"),u=s("a"),y=s("span"),C(l.$$.fragment),f=m(),k=s("span"),De=r("ConvNeXT"),Ce=m(),D=s("h2"),Z=s("a"),se=s("span"),C(b.$$.fragment),Ae=m(),V=s("span"),Le=r("Overview"),we=m(),O=s("p"),Oe=r("The ConvNeXT model was proposed in "),ne=s("a"),ae=r("A ConvNet for the 2020s"),Re=r(` 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.`),Te=m(),W=s("p"),Se=r("The abstract from the paper is the following:"),$e=m(),X=s("p"),ve=s("em"),Ue=r(`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.`),he=m(),z=s("p"),A=r("Tips:"),Ne=m(),K=s("ul"),_e=s("li"),We=r("See the code examples below each model regarding usage."),Q=m(),ee=s("img"),M=m(),oe=s("small"),re=r("ConvNeXT architecture. Taken from the "),ge=s("a"),Xe=r("original paper"),ie=r("."),Ie=m(),q=s("p"),H=r("This model was contributed by "),le=s("a"),ce=r("nielsr"),Ke=r(". TensorFlow version of the model was contributed by "),B=s("a"),L=r("ariG23498"),Ve=r(`,
`),j=s("a"),He=r("gante"),Be=r(", and "),_=s("a"),P=r("sayakpaul"),to=r(" (equal contribution). The original code can be found "),G=s("a"),so=r("here"),no=r("."),E=m(),de=s("h2"),ue=s("a"),Ge=s("span"),C(ye.$$.fragment),ao=m(),R=s("span"),me=r("ConvNextConfig"),eo=m(),S=s("div"),C(U.$$.fragment),ro=m(),pe=s("p"),Ye=r("This is the configuration class to store the configuration of a "),Pe=s("a"),xe=r("ConvNextModel"),io=r(`. 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
`),Go=s("a"),ln=r("facebook/convnext-tiny-224"),cn=r(" architecture."),dn=m(),lo=s("p"),mn=r("Configuration objects inherit from "),kt=s("a"),pn=r("PretrainedConfig"),fn=r(` and can be used to control the model outputs. Read the
documentation from `),zt=s("a"),hn=r("PretrainedConfig"),gn=r(" for more information."),un=m(),C(bo.$$.fragment),Es=m(),co=s("h2"),Co=s("a"),Ht=s("span"),C(Yo.$$.fragment),vn=m(),Bt=s("span"),_n=r("ConvNextFeatureExtractor"),ks=m(),Y=s("div"),C(Jo.$$.fragment),yn=m(),Gt=s("p"),xn=r("Constructs a ConvNeXT image processor."),bn=m(),wo=s("div"),C(Zo.$$.fragment),Cn=m(),Yt=s("p"),wn=r("Normalize an image. image = (image - image_mean) / image_std."),Tn=m(),To=s("div"),C(Qo.$$.fragment),$n=m(),Jt=s("p"),Nn=r("Preprocess an image or batch of images."),In=m(),$o=s("div"),C(et.$$.fragment),Pn=m(),Zt=s("p"),En=r("Rescale an image by a scale factor. image = image * scale."),kn=m(),No=s("div"),C(ot.$$.fragment),zn=m(),Qt=s("p"),Fn=r("Resize an image."),zs=m(),mo=s("h2"),Io=s("a"),es=s("span"),C(tt.$$.fragment),qn=m(),os=s("span"),jn=r("ConvNextImageProcessor"),Fs=m(),Je=s("div"),C(st.$$.fragment),Mn=m(),ts=s("p"),Dn=r("Constructs a ConvNeXT image processor."),An=m(),Po=s("div"),C(nt.$$.fragment),Ln=m(),ss=s("p"),On=r("Preprocess an image or batch of images."),qs=m(),po=s("h2"),Eo=s("a"),ns=s("span"),C(at.$$.fragment),Rn=m(),as=s("span"),Sn=r("ConvNextModel"),js=m(),Ze=s("div"),C(rt.$$.fragment),Un=m(),it=s("p"),Wn=r(`The bare ConvNext model outputting raw features without any specific head on top.
This model is a PyTorch `),lt=s("a"),Xn=r("torch.nn.Module"),Kn=r(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Vn=m(),Ee=s("div"),C(ct.$$.fragment),Hn=m(),fo=s("p"),Bn=r("The "),Ft=s("a"),Gn=r("ConvNextModel"),Yn=r(" forward method, overrides the "),rs=s("code"),Jn=r("__call__"),Zn=r(" special method."),Qn=m(),C(ko.$$.fragment),ea=m(),C(zo.$$.fragment),Ms=m(),ho=s("h2"),Fo=s("a"),is=s("span"),C(dt.$$.fragment),oa=m(),ls=s("span"),ta=r("ConvNextForImageClassification"),Ds=m(),be=s("div"),C(mt.$$.fragment),sa=m(),cs=s("p"),na=r(`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),aa=m(),pt=s("p"),ra=r("This model is a PyTorch "),ft=s("a"),ia=r("torch.nn.Module"),la=r(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ca=m(),ke=s("div"),C(ht.$$.fragment),da=m(),go=s("p"),ma=r("The "),qt=s("a"),pa=r("ConvNextForImageClassification"),fa=r(" forward method, overrides the "),ds=s("code"),ha=r("__call__"),ga=r(" special method."),ua=m(),C(qo.$$.fragment),va=m(),C(jo.$$.fragment),As=m(),uo=s("h2"),Mo=s("a"),ms=s("span"),C(gt.$$.fragment),_a=m(),ps=s("span"),ya=r("TFConvNextModel"),Ls=m(),fe=s("div"),C(ut.$$.fragment),xa=m(),vt=s("p"),ba=r(`The bare ConvNext model outputting raw features without any specific head on top.
This model inherits from `),jt=s("a"),Ca=r("TFPreTrainedModel"),wa=r(`. 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.)`),Ta=m(),_t=s("p"),$a=r("This model is also a "),yt=s("a"),Na=r("tf.keras.Model"),Ia=r(` 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.`),Pa=m(),C(Do.$$.fragment),Ea=m(),ze=s("div"),C(xt.$$.fragment),ka=m(),vo=s("p"),za=r("The "),Mt=s("a"),Fa=r("TFConvNextModel"),qa=r(" forward method, overrides the "),fs=s("code"),ja=r("__call__"),Ma=r(" special method."),Da=m(),C(Ao.$$.fragment),Aa=m(),C(Lo.$$.fragment),Os=m(),_o=s("h2"),Oo=s("a"),hs=s("span"),C(bt.$$.fragment),La=m(),gs=s("span"),Oa=r("TFConvNextForImageClassification"),Rs=m(),J=s("div"),C(Ct.$$.fragment),Ra=m(),us=s("p"),Sa=r(`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Ua=m(),wt=s("p"),Wa=r("This model inherits from "),Dt=s("a"),Xa=r("TFPreTrainedModel"),Ka=r(`. 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.)`),Va=m(),Tt=s("p"),Ha=r("This model is also a "),$t=s("a"),Ba=r("tf.keras.Model"),Ga=r(` 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.`),Ya=m(),C(Ro.$$.fragment),Ja=m(),Fe=s("div"),C(Nt.$$.fragment),Za=m(),yo=s("p"),Qa=r("The "),At=s("a"),er=r("TFConvNextForImageClassification"),or=r(" forward method, overrides the "),vs=s("code"),tr=r("__call__"),sr=r(" special method."),nr=m(),C(So.$$.fragment),ar=m(),C(Uo.$$.fragment),this.h()},l(t){const g=hi('[data-svelte="svelte-1phssyn"]',document.head);c=n(g,"META",{name:!0,content:!0}),g.forEach(o),x=p(t),v=n(t,"H1",{class:!0});var It=a(v);u=n(It,"A",{id:!0,class:!0,href:!0});var _s=a(u);y=n(_s,"SPAN",{});var ys=a(y);w(l.$$.fragment,ys),ys.forEach(o),_s.forEach(o),f=p(It),k=n(It,"SPAN",{});var xs=a(k);De=i(xs,"ConvNeXT"),xs.forEach(o),It.forEach(o),Ce=p(t),D=n(t,"H2",{class:!0});var Pt=a(D);Z=n(Pt,"A",{id:!0,class:!0,href:!0});var bs=a(Z);se=n(bs,"SPAN",{});var Cs=a(se);w(b.$$.fragment,Cs),Cs.forEach(o),bs.forEach(o),Ae=p(Pt),V=n(Pt,"SPAN",{});var ws=a(V);Le=i(ws,"Overview"),ws.forEach(o),Pt.forEach(o),we=p(t),O=n(t,"P",{});var Et=a(O);Oe=i(Et,"The ConvNeXT model was proposed in "),ne=n(Et,"A",{href:!0,rel:!0});var Ts=a(ne);ae=i(Ts,"A ConvNet for the 2020s"),Ts.forEach(o),Re=i(Et,` 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.`),Et.forEach(o),Te=p(t),W=n(t,"P",{});var $s=a(W);Se=i($s,"The abstract from the paper is the following:"),$s.forEach(o),$e=p(t),X=n(t,"P",{});var rr=a(X);ve=n(rr,"EM",{});var ir=a(ve);Ue=i(ir,`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.`),ir.forEach(o),rr.forEach(o),he=p(t),z=n(t,"P",{});var lr=a(z);A=i(lr,"Tips:"),lr.forEach(o),Ne=p(t),K=n(t,"UL",{});var cr=a(K);_e=n(cr,"LI",{});var dr=a(_e);We=i(dr,"See the code examples below each model regarding usage."),dr.forEach(o),cr.forEach(o),Q=p(t),ee=n(t,"IMG",{src:!0,alt:!0,width:!0}),M=p(t),oe=n(t,"SMALL",{});var Us=a(oe);re=i(Us,"ConvNeXT architecture. Taken from the "),ge=n(Us,"A",{href:!0});var mr=a(ge);Xe=i(mr,"original paper"),mr.forEach(o),ie=i(Us,"."),Us.forEach(o),Ie=p(t),q=n(t,"P",{});var qe=a(q);H=i(qe,"This model was contributed by "),le=n(qe,"A",{href:!0,rel:!0});var pr=a(le);ce=i(pr,"nielsr"),pr.forEach(o),Ke=i(qe,". TensorFlow version of the model was contributed by "),B=n(qe,"A",{href:!0,rel:!0});var fr=a(B);L=i(fr,"ariG23498"),fr.forEach(o),Ve=i(qe,`,
`),j=n(qe,"A",{href:!0,rel:!0});var hr=a(j);He=i(hr,"gante"),hr.forEach(o),Be=i(qe,", and "),_=n(qe,"A",{href:!0,rel:!0});var gr=a(_);P=i(gr,"sayakpaul"),gr.forEach(o),to=i(qe," (equal contribution). The original code can be found "),G=n(qe,"A",{href:!0,rel:!0});var ur=a(G);so=i(ur,"here"),ur.forEach(o),no=i(qe,"."),qe.forEach(o),E=p(t),de=n(t,"H2",{class:!0});var Ws=a(de);ue=n(Ws,"A",{id:!0,class:!0,href:!0});var vr=a(ue);Ge=n(vr,"SPAN",{});var _r=a(Ge);w(ye.$$.fragment,_r),_r.forEach(o),vr.forEach(o),ao=p(Ws),R=n(Ws,"SPAN",{});var yr=a(R);me=i(yr,"ConvNextConfig"),yr.forEach(o),Ws.forEach(o),eo=p(t),S=n(t,"DIV",{class:!0});var Wo=a(S);w(U.$$.fragment,Wo),ro=p(Wo),pe=n(Wo,"P",{});var Lt=a(pe);Ye=i(Lt,"This is the configuration class to store the configuration of a "),Pe=n(Lt,"A",{href:!0});var xr=a(Pe);xe=i(xr,"ConvNextModel"),xr.forEach(o),io=i(Lt,`. 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
`),Go=n(Lt,"A",{href:!0,rel:!0});var br=a(Go);ln=i(br,"facebook/convnext-tiny-224"),br.forEach(o),cn=i(Lt," architecture."),Lt.forEach(o),dn=p(Wo),lo=n(Wo,"P",{});var Ot=a(lo);mn=i(Ot,"Configuration objects inherit from "),kt=n(Ot,"A",{href:!0});var Cr=a(kt);pn=i(Cr,"PretrainedConfig"),Cr.forEach(o),fn=i(Ot,` and can be used to control the model outputs. Read the
documentation from `),zt=n(Ot,"A",{href:!0});var wr=a(zt);hn=i(wr,"PretrainedConfig"),wr.forEach(o),gn=i(Ot," for more information."),Ot.forEach(o),un=p(Wo),w(bo.$$.fragment,Wo),Wo.forEach(o),Es=p(t),co=n(t,"H2",{class:!0});var Xs=a(co);Co=n(Xs,"A",{id:!0,class:!0,href:!0});var Tr=a(Co);Ht=n(Tr,"SPAN",{});var $r=a(Ht);w(Yo.$$.fragment,$r),$r.forEach(o),Tr.forEach(o),vn=p(Xs),Bt=n(Xs,"SPAN",{});var Nr=a(Bt);_n=i(Nr,"ConvNextFeatureExtractor"),Nr.forEach(o),Xs.forEach(o),ks=p(t),Y=n(t,"DIV",{class:!0});var je=a(Y);w(Jo.$$.fragment,je),yn=p(je),Gt=n(je,"P",{});var Ir=a(Gt);xn=i(Ir,"Constructs a ConvNeXT image processor."),Ir.forEach(o),bn=p(je),wo=n(je,"DIV",{class:!0});var Ks=a(wo);w(Zo.$$.fragment,Ks),Cn=p(Ks),Yt=n(Ks,"P",{});var Pr=a(Yt);wn=i(Pr,"Normalize an image. image = (image - image_mean) / image_std."),Pr.forEach(o),Ks.forEach(o),Tn=p(je),To=n(je,"DIV",{class:!0});var Vs=a(To);w(Qo.$$.fragment,Vs),$n=p(Vs),Jt=n(Vs,"P",{});var Er=a(Jt);Nn=i(Er,"Preprocess an image or batch of images."),Er.forEach(o),Vs.forEach(o),In=p(je),$o=n(je,"DIV",{class:!0});var Hs=a($o);w(et.$$.fragment,Hs),Pn=p(Hs),Zt=n(Hs,"P",{});var kr=a(Zt);En=i(kr,"Rescale an image by a scale factor. image = image * scale."),kr.forEach(o),Hs.forEach(o),kn=p(je),No=n(je,"DIV",{class:!0});var Bs=a(No);w(ot.$$.fragment,Bs),zn=p(Bs),Qt=n(Bs,"P",{});var zr=a(Qt);Fn=i(zr,"Resize an image."),zr.forEach(o),Bs.forEach(o),je.forEach(o),zs=p(t),mo=n(t,"H2",{class:!0});var Gs=a(mo);Io=n(Gs,"A",{id:!0,class:!0,href:!0});var Fr=a(Io);es=n(Fr,"SPAN",{});var qr=a(es);w(tt.$$.fragment,qr),qr.forEach(o),Fr.forEach(o),qn=p(Gs),os=n(Gs,"SPAN",{});var jr=a(os);jn=i(jr,"ConvNextImageProcessor"),jr.forEach(o),Gs.forEach(o),Fs=p(t),Je=n(t,"DIV",{class:!0});var Rt=a(Je);w(st.$$.fragment,Rt),Mn=p(Rt),ts=n(Rt,"P",{});var Mr=a(ts);Dn=i(Mr,"Constructs a ConvNeXT image processor."),Mr.forEach(o),An=p(Rt),Po=n(Rt,"DIV",{class:!0});var Ys=a(Po);w(nt.$$.fragment,Ys),Ln=p(Ys),ss=n(Ys,"P",{});var Dr=a(ss);On=i(Dr,"Preprocess an image or batch of images."),Dr.forEach(o),Ys.forEach(o),Rt.forEach(o),qs=p(t),po=n(t,"H2",{class:!0});var Js=a(po);Eo=n(Js,"A",{id:!0,class:!0,href:!0});var Ar=a(Eo);ns=n(Ar,"SPAN",{});var Lr=a(ns);w(at.$$.fragment,Lr),Lr.forEach(o),Ar.forEach(o),Rn=p(Js),as=n(Js,"SPAN",{});var Or=a(as);Sn=i(Or,"ConvNextModel"),Or.forEach(o),Js.forEach(o),js=p(t),Ze=n(t,"DIV",{class:!0});var St=a(Ze);w(rt.$$.fragment,St),Un=p(St),it=n(St,"P",{});var Zs=a(it);Wn=i(Zs,`The bare ConvNext model outputting raw features without any specific head on top.
This model is a PyTorch `),lt=n(Zs,"A",{href:!0,rel:!0});var Rr=a(lt);Xn=i(Rr,"torch.nn.Module"),Rr.forEach(o),Kn=i(Zs,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Zs.forEach(o),Vn=p(St),Ee=n(St,"DIV",{class:!0});var Xo=a(Ee);w(ct.$$.fragment,Xo),Hn=p(Xo),fo=n(Xo,"P",{});var Ut=a(fo);Bn=i(Ut,"The "),Ft=n(Ut,"A",{href:!0});var Sr=a(Ft);Gn=i(Sr,"ConvNextModel"),Sr.forEach(o),Yn=i(Ut," forward method, overrides the "),rs=n(Ut,"CODE",{});var Ur=a(rs);Jn=i(Ur,"__call__"),Ur.forEach(o),Zn=i(Ut," special method."),Ut.forEach(o),Qn=p(Xo),w(ko.$$.fragment,Xo),ea=p(Xo),w(zo.$$.fragment,Xo),Xo.forEach(o),St.forEach(o),Ms=p(t),ho=n(t,"H2",{class:!0});var Qs=a(ho);Fo=n(Qs,"A",{id:!0,class:!0,href:!0});var Wr=a(Fo);is=n(Wr,"SPAN",{});var Xr=a(is);w(dt.$$.fragment,Xr),Xr.forEach(o),Wr.forEach(o),oa=p(Qs),ls=n(Qs,"SPAN",{});var Kr=a(ls);ta=i(Kr,"ConvNextForImageClassification"),Kr.forEach(o),Qs.forEach(o),Ds=p(t),be=n(t,"DIV",{class:!0});var Ko=a(be);w(mt.$$.fragment,Ko),sa=p(Ko),cs=n(Ko,"P",{});var Vr=a(cs);na=i(Vr,`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Vr.forEach(o),aa=p(Ko),pt=n(Ko,"P",{});var en=a(pt);ra=i(en,"This model is a PyTorch "),ft=n(en,"A",{href:!0,rel:!0});var Hr=a(ft);ia=i(Hr,"torch.nn.Module"),Hr.forEach(o),la=i(en,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),en.forEach(o),ca=p(Ko),ke=n(Ko,"DIV",{class:!0});var Vo=a(ke);w(ht.$$.fragment,Vo),da=p(Vo),go=n(Vo,"P",{});var Wt=a(go);ma=i(Wt,"The "),qt=n(Wt,"A",{href:!0});var Br=a(qt);pa=i(Br,"ConvNextForImageClassification"),Br.forEach(o),fa=i(Wt," forward method, overrides the "),ds=n(Wt,"CODE",{});var Gr=a(ds);ha=i(Gr,"__call__"),Gr.forEach(o),ga=i(Wt," special method."),Wt.forEach(o),ua=p(Vo),w(qo.$$.fragment,Vo),va=p(Vo),w(jo.$$.fragment,Vo),Vo.forEach(o),Ko.forEach(o),As=p(t),uo=n(t,"H2",{class:!0});var on=a(uo);Mo=n(on,"A",{id:!0,class:!0,href:!0});var Yr=a(Mo);ms=n(Yr,"SPAN",{});var Jr=a(ms);w(gt.$$.fragment,Jr),Jr.forEach(o),Yr.forEach(o),_a=p(on),ps=n(on,"SPAN",{});var Zr=a(ps);ya=i(Zr,"TFConvNextModel"),Zr.forEach(o),on.forEach(o),Ls=p(t),fe=n(t,"DIV",{class:!0});var oo=a(fe);w(ut.$$.fragment,oo),xa=p(oo),vt=n(oo,"P",{});var tn=a(vt);ba=i(tn,`The bare ConvNext model outputting raw features without any specific head on top.
This model inherits from `),jt=n(tn,"A",{href:!0});var Qr=a(jt);Ca=i(Qr,"TFPreTrainedModel"),Qr.forEach(o),wa=i(tn,`. 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.)`),tn.forEach(o),Ta=p(oo),_t=n(oo,"P",{});var sn=a(_t);$a=i(sn,"This model is also a "),yt=n(sn,"A",{href:!0,rel:!0});var ei=a(yt);Na=i(ei,"tf.keras.Model"),ei.forEach(o),Ia=i(sn,` 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.`),sn.forEach(o),Pa=p(oo),w(Do.$$.fragment,oo),Ea=p(oo),ze=n(oo,"DIV",{class:!0});var Ho=a(ze);w(xt.$$.fragment,Ho),ka=p(Ho),vo=n(Ho,"P",{});var Xt=a(vo);za=i(Xt,"The "),Mt=n(Xt,"A",{href:!0});var oi=a(Mt);Fa=i(oi,"TFConvNextModel"),oi.forEach(o),qa=i(Xt," forward method, overrides the "),fs=n(Xt,"CODE",{});var ti=a(fs);ja=i(ti,"__call__"),ti.forEach(o),Ma=i(Xt," special method."),Xt.forEach(o),Da=p(Ho),w(Ao.$$.fragment,Ho),Aa=p(Ho),w(Lo.$$.fragment,Ho),Ho.forEach(o),oo.forEach(o),Os=p(t),_o=n(t,"H2",{class:!0});var nn=a(_o);Oo=n(nn,"A",{id:!0,class:!0,href:!0});var si=a(Oo);hs=n(si,"SPAN",{});var ni=a(hs);w(bt.$$.fragment,ni),ni.forEach(o),si.forEach(o),La=p(nn),gs=n(nn,"SPAN",{});var ai=a(gs);Oa=i(ai,"TFConvNextForImageClassification"),ai.forEach(o),nn.forEach(o),Rs=p(t),J=n(t,"DIV",{class:!0});var Me=a(J);w(Ct.$$.fragment,Me),Ra=p(Me),us=n(Me,"P",{});var ri=a(us);Sa=i(ri,`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),ri.forEach(o),Ua=p(Me),wt=n(Me,"P",{});var an=a(wt);Wa=i(an,"This model inherits from "),Dt=n(an,"A",{href:!0});var ii=a(Dt);Xa=i(ii,"TFPreTrainedModel"),ii.forEach(o),Ka=i(an,`. 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.)`),an.forEach(o),Va=p(Me),Tt=n(Me,"P",{});var rn=a(Tt);Ha=i(rn,"This model is also a "),$t=n(rn,"A",{href:!0,rel:!0});var li=a($t);Ba=i(li,"tf.keras.Model"),li.forEach(o),Ga=i(rn,` 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.`),rn.forEach(o),Ya=p(Me),w(Ro.$$.fragment,Me),Ja=p(Me),Fe=n(Me,"DIV",{class:!0});var Bo=a(Fe);w(Nt.$$.fragment,Bo),Za=p(Bo),yo=n(Bo,"P",{});var Kt=a(yo);Qa=i(Kt,"The "),At=n(Kt,"A",{href:!0});var ci=a(At);er=i(ci,"TFConvNextForImageClassification"),ci.forEach(o),or=i(Kt," forward method, overrides the "),vs=n(Kt,"CODE",{});var di=a(vs);tr=i(di,"__call__"),di.forEach(o),sr=i(Kt," special method."),Kt.forEach(o),nr=p(Bo),w(So.$$.fragment,Bo),ar=p(Bo),w(Uo.$$.fragment,Bo),Bo.forEach(o),Me.forEach(o),this.h()},h(){d(c,"name","hf:doc:metadata"),d(c,"content",JSON.stringify(Ei)),d(u,"id","convnext"),d(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"),d(u,"href","#convnext"),d(v,"class","relative group"),d(Z,"id","overview"),d(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"),d(Z,"href","#overview"),d(D,"class","relative group"),d(ne,"href","https://arxiv.org/abs/2201.03545"),d(ne,"rel","nofollow"),gi(ee.src,Qe="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/convnext_architecture.jpg")||d(ee,"src",Qe),d(ee,"alt","drawing"),d(ee,"width","600"),d(ge,"href","https://arxiv.org/abs/2201.03545"),d(le,"href","https://huggingface.co/nielsr"),d(le,"rel","nofollow"),d(B,"href","https://github.com/ariG23498"),d(B,"rel","nofollow"),d(j,"href","https://github.com/gante"),d(j,"rel","nofollow"),d(_,"href","https://github.com/sayakpaul"),d(_,"rel","nofollow"),d(G,"href","https://github.com/facebookresearch/ConvNeXt"),d(G,"rel","nofollow"),d(ue,"id","transformers.ConvNextConfig"),d(ue,"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"),d(ue,"href","#transformers.ConvNextConfig"),d(de,"class","relative group"),d(Pe,"href","/docs/transformers/v4.25.1/en/model_doc/convnext#transformers.ConvNextModel"),d(Go,"href","https://huggingface.co/facebook/convnext-tiny-224"),d(Go,"rel","nofollow"),d(kt,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(zt,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Co,"id","transformers.ConvNextImageProcessor"),d(Co,"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"),d(Co,"href","#transformers.ConvNextImageProcessor"),d(co,"class","relative group"),d(wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(To,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d($o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(No,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Io,"id","transformers.ConvNextImageProcessor"),d(Io,"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"),d(Io,"href","#transformers.ConvNextImageProcessor"),d(mo,"class","relative group"),d(Po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Eo,"id","transformers.ConvNextModel"),d(Eo,"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"),d(Eo,"href","#transformers.ConvNextModel"),d(po,"class","relative group"),d(lt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(lt,"rel","nofollow"),d(Ft,"href","/docs/transformers/v4.25.1/en/model_doc/convnext#transformers.ConvNextModel"),d(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Fo,"id","transformers.ConvNextForImageClassification"),d(Fo,"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"),d(Fo,"href","#transformers.ConvNextForImageClassification"),d(ho,"class","relative group"),d(ft,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(ft,"rel","nofollow"),d(qt,"href","/docs/transformers/v4.25.1/en/model_doc/convnext#transformers.ConvNextForImageClassification"),d(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Mo,"id","transformers.TFConvNextModel"),d(Mo,"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"),d(Mo,"href","#transformers.TFConvNextModel"),d(uo,"class","relative group"),d(jt,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),d(yt,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),d(yt,"rel","nofollow"),d(Mt,"href","/docs/transformers/v4.25.1/en/model_doc/convnext#transformers.TFConvNextModel"),d(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Oo,"id","transformers.TFConvNextForImageClassification"),d(Oo,"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"),d(Oo,"href","#transformers.TFConvNextForImageClassification"),d(_o,"class","relative group"),d(Dt,"href","/docs/transformers/v4.25.1/en/main_classes/model#transformers.TFPreTrainedModel"),d($t,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),d($t,"rel","nofollow"),d(At,"href","/docs/transformers/v4.25.1/en/model_doc/convnext#transformers.TFConvNextForImageClassification"),d(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(J,"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,g){e(document.head,c),h(t,x,g),h(t,v,g),e(v,u),e(u,y),T(l,y,null),e(v,f),e(v,k),e(k,De),h(t,Ce,g),h(t,D,g),e(D,Z),e(Z,se),T(b,se,null),e(D,Ae),e(D,V),e(V,Le),h(t,we,g),h(t,O,g),e(O,Oe),e(O,ne),e(ne,ae),e(O,Re),h(t,Te,g),h(t,W,g),e(W,Se),h(t,$e,g),h(t,X,g),e(X,ve),e(ve,Ue),h(t,he,g),h(t,z,g),e(z,A),h(t,Ne,g),h(t,K,g),e(K,_e),e(_e,We),h(t,Q,g),h(t,ee,g),h(t,M,g),h(t,oe,g),e(oe,re),e(oe,ge),e(ge,Xe),e(oe,ie),h(t,Ie,g),h(t,q,g),e(q,H),e(q,le),e(le,ce),e(q,Ke),e(q,B),e(B,L),e(q,Ve),e(q,j),e(j,He),e(q,Be),e(q,_),e(_,P),e(q,to),e(q,G),e(G,so),e(q,no),h(t,E,g),h(t,de,g),e(de,ue),e(ue,Ge),T(ye,Ge,null),e(de,ao),e(de,R),e(R,me),h(t,eo,g),h(t,S,g),T(U,S,null),e(S,ro),e(S,pe),e(pe,Ye),e(pe,Pe),e(Pe,xe),e(pe,io),e(pe,Go),e(Go,ln),e(pe,cn),e(S,dn),e(S,lo),e(lo,mn),e(lo,kt),e(kt,pn),e(lo,fn),e(lo,zt),e(zt,hn),e(lo,gn),e(S,un),T(bo,S,null),h(t,Es,g),h(t,co,g),e(co,Co),e(Co,Ht),T(Yo,Ht,null),e(co,vn),e(co,Bt),e(Bt,_n),h(t,ks,g),h(t,Y,g),T(Jo,Y,null),e(Y,yn),e(Y,Gt),e(Gt,xn),e(Y,bn),e(Y,wo),T(Zo,wo,null),e(wo,Cn),e(wo,Yt),e(Yt,wn),e(Y,Tn),e(Y,To),T(Qo,To,null),e(To,$n),e(To,Jt),e(Jt,Nn),e(Y,In),e(Y,$o),T(et,$o,null),e($o,Pn),e($o,Zt),e(Zt,En),e(Y,kn),e(Y,No),T(ot,No,null),e(No,zn),e(No,Qt),e(Qt,Fn),h(t,zs,g),h(t,mo,g),e(mo,Io),e(Io,es),T(tt,es,null),e(mo,qn),e(mo,os),e(os,jn),h(t,Fs,g),h(t,Je,g),T(st,Je,null),e(Je,Mn),e(Je,ts),e(ts,Dn),e(Je,An),e(Je,Po),T(nt,Po,null),e(Po,Ln),e(Po,ss),e(ss,On),h(t,qs,g),h(t,po,g),e(po,Eo),e(Eo,ns),T(at,ns,null),e(po,Rn),e(po,as),e(as,Sn),h(t,js,g),h(t,Ze,g),T(rt,Ze,null),e(Ze,Un),e(Ze,it),e(it,Wn),e(it,lt),e(lt,Xn),e(it,Kn),e(Ze,Vn),e(Ze,Ee),T(ct,Ee,null),e(Ee,Hn),e(Ee,fo),e(fo,Bn),e(fo,Ft),e(Ft,Gn),e(fo,Yn),e(fo,rs),e(rs,Jn),e(fo,Zn),e(Ee,Qn),T(ko,Ee,null),e(Ee,ea),T(zo,Ee,null),h(t,Ms,g),h(t,ho,g),e(ho,Fo),e(Fo,is),T(dt,is,null),e(ho,oa),e(ho,ls),e(ls,ta),h(t,Ds,g),h(t,be,g),T(mt,be,null),e(be,sa),e(be,cs),e(cs,na),e(be,aa),e(be,pt),e(pt,ra),e(pt,ft),e(ft,ia),e(pt,la),e(be,ca),e(be,ke),T(ht,ke,null),e(ke,da),e(ke,go),e(go,ma),e(go,qt),e(qt,pa),e(go,fa),e(go,ds),e(ds,ha),e(go,ga),e(ke,ua),T(qo,ke,null),e(ke,va),T(jo,ke,null),h(t,As,g),h(t,uo,g),e(uo,Mo),e(Mo,ms),T(gt,ms,null),e(uo,_a),e(uo,ps),e(ps,ya),h(t,Ls,g),h(t,fe,g),T(ut,fe,null),e(fe,xa),e(fe,vt),e(vt,ba),e(vt,jt),e(jt,Ca),e(vt,wa),e(fe,Ta),e(fe,_t),e(_t,$a),e(_t,yt),e(yt,Na),e(_t,Ia),e(fe,Pa),T(Do,fe,null),e(fe,Ea),e(fe,ze),T(xt,ze,null),e(ze,ka),e(ze,vo),e(vo,za),e(vo,Mt),e(Mt,Fa),e(vo,qa),e(vo,fs),e(fs,ja),e(vo,Ma),e(ze,Da),T(Ao,ze,null),e(ze,Aa),T(Lo,ze,null),h(t,Os,g),h(t,_o,g),e(_o,Oo),e(Oo,hs),T(bt,hs,null),e(_o,La),e(_o,gs),e(gs,Oa),h(t,Rs,g),h(t,J,g),T(Ct,J,null),e(J,Ra),e(J,us),e(us,Sa),e(J,Ua),e(J,wt),e(wt,Wa),e(wt,Dt),e(Dt,Xa),e(wt,Ka),e(J,Va),e(J,Tt),e(Tt,Ha),e(Tt,$t),e($t,Ba),e(Tt,Ga),e(J,Ya),T(Ro,J,null),e(J,Ja),e(J,Fe),T(Nt,Fe,null),e(Fe,Za),e(Fe,yo),e(yo,Qa),e(yo,At),e(At,er),e(yo,or),e(yo,vs),e(vs,tr),e(yo,sr),e(Fe,nr),T(So,Fe,null),e(Fe,ar),T(Uo,Fe,null),Ss=!0},p(t,[g]){const It={};g&2&&(It.$$scope={dirty:g,ctx:t}),bo.$set(It);const _s={};g&2&&(_s.$$scope={dirty:g,ctx:t}),ko.$set(_s);const ys={};g&2&&(ys.$$scope={dirty:g,ctx:t}),zo.$set(ys);const xs={};g&2&&(xs.$$scope={dirty:g,ctx:t}),qo.$set(xs);const Pt={};g&2&&(Pt.$$scope={dirty:g,ctx:t}),jo.$set(Pt);const bs={};g&2&&(bs.$$scope={dirty:g,ctx:t}),Do.$set(bs);const Cs={};g&2&&(Cs.$$scope={dirty:g,ctx:t}),Ao.$set(Cs);const ws={};g&2&&(ws.$$scope={dirty:g,ctx:t}),Lo.$set(ws);const Et={};g&2&&(Et.$$scope={dirty:g,ctx:t}),Ro.$set(Et);const Ts={};g&2&&(Ts.$$scope={dirty:g,ctx:t}),So.$set(Ts);const $s={};g&2&&($s.$$scope={dirty:g,ctx:t}),Uo.$set($s)},i(t){Ss||($(l.$$.fragment,t),$(b.$$.fragment,t),$(ye.$$.fragment,t),$(U.$$.fragment,t),$(bo.$$.fragment,t),$(Yo.$$.fragment,t),$(Jo.$$.fragment,t),$(Zo.$$.fragment,t),$(Qo.$$.fragment,t),$(et.$$.fragment,t),$(ot.$$.fragment,t),$(tt.$$.fragment,t),$(st.$$.fragment,t),$(nt.$$.fragment,t),$(at.$$.fragment,t),$(rt.$$.fragment,t),$(ct.$$.fragment,t),$(ko.$$.fragment,t),$(zo.$$.fragment,t),$(dt.$$.fragment,t),$(mt.$$.fragment,t),$(ht.$$.fragment,t),$(qo.$$.fragment,t),$(jo.$$.fragment,t),$(gt.$$.fragment,t),$(ut.$$.fragment,t),$(Do.$$.fragment,t),$(xt.$$.fragment,t),$(Ao.$$.fragment,t),$(Lo.$$.fragment,t),$(bt.$$.fragment,t),$(Ct.$$.fragment,t),$(Ro.$$.fragment,t),$(Nt.$$.fragment,t),$(So.$$.fragment,t),$(Uo.$$.fragment,t),Ss=!0)},o(t){N(l.$$.fragment,t),N(b.$$.fragment,t),N(ye.$$.fragment,t),N(U.$$.fragment,t),N(bo.$$.fragment,t),N(Yo.$$.fragment,t),N(Jo.$$.fragment,t),N(Zo.$$.fragment,t),N(Qo.$$.fragment,t),N(et.$$.fragment,t),N(ot.$$.fragment,t),N(tt.$$.fragment,t),N(st.$$.fragment,t),N(nt.$$.fragment,t),N(at.$$.fragment,t),N(rt.$$.fragment,t),N(ct.$$.fragment,t),N(ko.$$.fragment,t),N(zo.$$.fragment,t),N(dt.$$.fragment,t),N(mt.$$.fragment,t),N(ht.$$.fragment,t),N(qo.$$.fragment,t),N(jo.$$.fragment,t),N(gt.$$.fragment,t),N(ut.$$.fragment,t),N(Do.$$.fragment,t),N(xt.$$.fragment,t),N(Ao.$$.fragment,t),N(Lo.$$.fragment,t),N(bt.$$.fragment,t),N(Ct.$$.fragment,t),N(Ro.$$.fragment,t),N(Nt.$$.fragment,t),N(So.$$.fragment,t),N(Uo.$$.fragment,t),Ss=!1},d(t){o(c),t&&o(x),t&&o(v),I(l),t&&o(Ce),t&&o(D),I(b),t&&o(we),t&&o(O),t&&o(Te),t&&o(W),t&&o($e),t&&o(X),t&&o(he),t&&o(z),t&&o(Ne),t&&o(K),t&&o(Q),t&&o(ee),t&&o(M),t&&o(oe),t&&o(Ie),t&&o(q),t&&o(E),t&&o(de),I(ye),t&&o(eo),t&&o(S),I(U),I(bo),t&&o(Es),t&&o(co),I(Yo),t&&o(ks),t&&o(Y),I(Jo),I(Zo),I(Qo),I(et),I(ot),t&&o(zs),t&&o(mo),I(tt),t&&o(Fs),t&&o(Je),I(st),I(nt),t&&o(qs),t&&o(po),I(at),t&&o(js),t&&o(Ze),I(rt),I(ct),I(ko),I(zo),t&&o(Ms),t&&o(ho),I(dt),t&&o(Ds),t&&o(be),I(mt),I(ht),I(qo),I(jo),t&&o(As),t&&o(uo),I(gt),t&&o(Ls),t&&o(fe),I(ut),I(Do),I(xt),I(Ao),I(Lo),t&&o(Os),t&&o(_o),I(bt),t&&o(Rs),t&&o(J),I(Ct),I(Ro),I(Nt),I(So),I(Uo)}}}const Ei={local:"convnext",sections:[{local:"overview",title:"Overview"},{local:"transformers.ConvNextConfig",title:"ConvNextConfig"},{local:"transformers.ConvNextImageProcessor",title:"ConvNextFeatureExtractor"},{local:"transformers.ConvNextImageProcessor",title:"ConvNextImageProcessor"},{local:"transformers.ConvNextModel",title:"ConvNextModel"},{local:"transformers.ConvNextForImageClassification",title:"ConvNextForImageClassification"},{local:"transformers.TFConvNextModel",title:"TFConvNextModel"},{local:"transformers.TFConvNextForImageClassification",title:"TFConvNextForImageClassification"}],title:"ConvNeXT"};function ki(F){return ui(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ai extends mi{constructor(c){super();pi(this,c,ki,Pi,fi,{})}}export{Ai as default,Ei as metadata};
