import{s as ht,f as ut,o as _t,n as Ce}from"../chunks/scheduler.bdbef820.js";import{S as vt,i as bt,g as m,s as i,r as b,A as xt,h as p,f as s,c as l,j as se,u as x,x as w,k as G,y as f,a as r,v as C,d as y,t as $,w as T}from"../chunks/index.33f81d56.js";import{T as Xe}from"../chunks/Tip.34194030.js";import{D as de}from"../chunks/Docstring.64554317.js";import{C as Ve}from"../chunks/CodeBlock.362b34a4.js";import{F as Ct,M as gt}from"../chunks/Markdown.8a4b74ff.js";import{E as Se}from"../chunks/ExampleCodeBlock.4f2252c6.js";import{P as yt}from"../chunks/PipelineTag.d2f354cd.js";import{H as xe,E as $t}from"../chunks/EditOnGithub.a9246e21.js";function Tt(F){let t,h="Example:",o,a,_;return a=new Ve({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENvbnZOZXh0Q29uZmlnJTJDJTIwQ29udk5leHRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDb252TmV4dCUyMGNvbnZuZXh0LXRpbnktMjI0JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMENvbnZOZXh0Q29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGNvbnZuZXh0LXRpbnktMjI0JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBDb252TmV4dE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",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`,wrap:!1}}),{c(){t=m("p"),t.textContent=h,o=i(),b(a.$$.fragment)},l(n){t=p(n,"P",{"data-svelte-h":!0}),w(t)!=="svelte-11lpom8"&&(t.textContent=h),o=l(n),x(a.$$.fragment,n)},m(n,v){r(n,t,v),r(n,o,v),C(a,n,v),_=!0},p:Ce,i(n){_||(y(a.$$.fragment,n),_=!0)},o(n){$(a.$$.fragment,n),_=!1},d(n){n&&(s(t),s(o)),T(a,n)}}}function wt(F){let t,h=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=m("p"),t.innerHTML=h},l(o){t=p(o,"P",{"data-svelte-h":!0}),w(t)!=="svelte-fincs2"&&(t.innerHTML=h)},m(o,a){r(o,t,a)},p:Ce,d(o){o&&s(t)}}}function Mt(F){let t,h="Example:",o,a,_;return a=new Ve({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMENvbnZOZXh0TW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGY29udm5leHQtdGlueS0yMjQlMjIpJTBBbW9kZWwlMjAlM0QlMjBDb252TmV4dE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRmNvbnZuZXh0LXRpbnktMjI0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBbGlzdChsYXN0X2hpZGRlbl9zdGF0ZXMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, 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>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/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 = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">768</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`,wrap:!1}}),{c(){t=m("p"),t.textContent=h,o=i(),b(a.$$.fragment)},l(n){t=p(n,"P",{"data-svelte-h":!0}),w(t)!=="svelte-11lpom8"&&(t.textContent=h),o=l(n),x(a.$$.fragment,n)},m(n,v){r(n,t,v),r(n,o,v),C(a,n,v),_=!0},p:Ce,i(n){_||(y(a.$$.fragment,n),_=!0)},o(n){$(a.$$.fragment,n),_=!1},d(n){n&&(s(t),s(o)),T(a,n)}}}function Nt(F){let t,h=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=m("p"),t.innerHTML=h},l(o){t=p(o,"P",{"data-svelte-h":!0}),w(t)!=="svelte-fincs2"&&(t.innerHTML=h)},m(o,a){r(o,t,a)},p:Ce,d(o){o&&s(t)}}}function It(F){let t,h="Example:",o,a,_;return a=new Ve({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMENvbnZOZXh0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZjb252bmV4dC10aW55LTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMENvbnZOZXh0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZjb252bmV4dC10aW55LTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpLml0ZW0oKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, 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>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/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 = image_processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 1000 ImageNet classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
tabby, tabby cat`,wrap:!1}}),{c(){t=m("p"),t.textContent=h,o=i(),b(a.$$.fragment)},l(n){t=p(n,"P",{"data-svelte-h":!0}),w(t)!=="svelte-11lpom8"&&(t.textContent=h),o=l(n),x(a.$$.fragment,n)},m(n,v){r(n,t,v),r(n,o,v),C(a,n,v),_=!0},p:Ce,i(n){_||(y(a.$$.fragment,n),_=!0)},o(n){$(a.$$.fragment,n),_=!1},d(n){n&&(s(t),s(o)),T(a,n)}}}function jt(F){let t,h,o,a,_,n,v=`The bare ConvNext model outputting raw features without any specific head on top.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,D,N,U,S,j,R='The <a href="/docs/transformers/main/ja/model_doc/convnext#transformers.ConvNextModel">ConvNextModel</a> forward method, overrides the <code>__call__</code> special method.',Z,c,z,E,K,ie,V,q,X,me,J,ye=`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,W,H,he=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Q,A,ee,Y,le,ce='The <a href="/docs/transformers/main/ja/model_doc/convnext#transformers.ConvNextForImageClassification">ConvNextForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',pe,te,ae,B,fe;return t=new xe({props:{title:"ConvNextModel",local:"transformers.ConvNextModel",headingTag:"h2"}}),a=new de({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/main/ja/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/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convnext/modeling_convnext.py#L319"}}),U=new de({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/main/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/ja/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> 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/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convnext/modeling_convnext.py#L337",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/ja/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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),c=new Xe({props:{$$slots:{default:[wt]},$$scope:{ctx:F}}}),E=new Se({props:{anchor:"transformers.ConvNextModel.forward.example",$$slots:{default:[Mt]},$$scope:{ctx:F}}}),ie=new xe({props:{title:"ConvNextForImageClassification",local:"transformers.ConvNextForImageClassification",headingTag:"h2"}}),X=new de({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/main/ja/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/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convnext/modeling_convnext.py#L382"}}),ee=new de({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/main/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/ja/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> 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/main/ja/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/main/src/transformers/models/convnext/modeling_convnext.py#L404",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ja/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/ja/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) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ja/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),te=new Xe({props:{$$slots:{default:[Nt]},$$scope:{ctx:F}}}),B=new Se({props:{anchor:"transformers.ConvNextForImageClassification.forward.example",$$slots:{default:[It]},$$scope:{ctx:F}}}),{c(){b(t.$$.fragment),h=i(),o=m("div"),b(a.$$.fragment),_=i(),n=m("p"),n.innerHTML=v,D=i(),N=m("div"),b(U.$$.fragment),S=i(),j=m("p"),j.innerHTML=R,Z=i(),b(c.$$.fragment),z=i(),b(E.$$.fragment),K=i(),b(ie.$$.fragment),V=i(),q=m("div"),b(X.$$.fragment),me=i(),J=m("p"),J.textContent=ye,W=i(),H=m("p"),H.innerHTML=he,Q=i(),A=m("div"),b(ee.$$.fragment),Y=i(),le=m("p"),le.innerHTML=ce,pe=i(),b(te.$$.fragment),ae=i(),b(B.$$.fragment),this.h()},l(d){x(t.$$.fragment,d),h=l(d),o=p(d,"DIV",{class:!0});var I=se(o);x(a.$$.fragment,I),_=l(I),n=p(I,"P",{"data-svelte-h":!0}),w(n)!=="svelte-22827l"&&(n.innerHTML=v),D=l(I),N=p(I,"DIV",{class:!0});var P=se(N);x(U.$$.fragment,P),S=l(P),j=p(P,"P",{"data-svelte-h":!0}),w(j)!=="svelte-15742xo"&&(j.innerHTML=R),Z=l(P),x(c.$$.fragment,P),z=l(P),x(E.$$.fragment,P),P.forEach(s),I.forEach(s),K=l(d),x(ie.$$.fragment,d),V=l(d),q=p(d,"DIV",{class:!0});var k=se(q);x(X.$$.fragment,k),me=l(k),J=p(k,"P",{"data-svelte-h":!0}),w(J)!=="svelte-xy24s5"&&(J.textContent=ye),W=l(k),H=p(k,"P",{"data-svelte-h":!0}),w(H)!=="svelte-1gjh92c"&&(H.innerHTML=he),Q=l(k),A=p(k,"DIV",{class:!0});var O=se(A);x(ee.$$.fragment,O),Y=l(O),le=p(O,"P",{"data-svelte-h":!0}),w(le)!=="svelte-1w05j62"&&(le.innerHTML=ce),pe=l(O),x(te.$$.fragment,O),ae=l(O),x(B.$$.fragment,O),O.forEach(s),k.forEach(s),this.h()},h(){G(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(d,I){C(t,d,I),r(d,h,I),r(d,o,I),C(a,o,null),f(o,_),f(o,n),f(o,D),f(o,N),C(U,N,null),f(N,S),f(N,j),f(N,Z),C(c,N,null),f(N,z),C(E,N,null),r(d,K,I),C(ie,d,I),r(d,V,I),r(d,q,I),C(X,q,null),f(q,me),f(q,J),f(q,W),f(q,H),f(q,Q),f(q,A),C(ee,A,null),f(A,Y),f(A,le),f(A,pe),C(te,A,null),f(A,ae),C(B,A,null),fe=!0},p(d,I){const P={};I&2&&(P.$$scope={dirty:I,ctx:d}),c.$set(P);const k={};I&2&&(k.$$scope={dirty:I,ctx:d}),E.$set(k);const O={};I&2&&(O.$$scope={dirty:I,ctx:d}),te.$set(O);const ge={};I&2&&(ge.$$scope={dirty:I,ctx:d}),B.$set(ge)},i(d){fe||(y(t.$$.fragment,d),y(a.$$.fragment,d),y(U.$$.fragment,d),y(c.$$.fragment,d),y(E.$$.fragment,d),y(ie.$$.fragment,d),y(X.$$.fragment,d),y(ee.$$.fragment,d),y(te.$$.fragment,d),y(B.$$.fragment,d),fe=!0)},o(d){$(t.$$.fragment,d),$(a.$$.fragment,d),$(U.$$.fragment,d),$(c.$$.fragment,d),$(E.$$.fragment,d),$(ie.$$.fragment,d),$(X.$$.fragment,d),$(ee.$$.fragment,d),$(te.$$.fragment,d),$(B.$$.fragment,d),fe=!1},d(d){d&&(s(h),s(o),s(K),s(V),s(q)),T(t,d),T(a),T(U),T(c),T(E),T(ie,d),T(X),T(ee),T(te),T(B)}}}function Ft(F){let t,h;return t=new gt({props:{$$slots:{default:[jt]},$$scope:{ctx:F}}}),{c(){b(t.$$.fragment)},l(o){x(t.$$.fragment,o)},m(o,a){C(t,o,a),h=!0},p(o,a){const _={};a&2&&(_.$$scope={dirty:a,ctx:o}),t.$set(_)},i(o){h||(y(t.$$.fragment,o),h=!0)},o(o){$(t.$$.fragment,o),h=!1},d(o){T(t,o)}}}function zt(F){let t,h="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",o,a,_="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",n,v,D=`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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,N,U,S=`<li>a single Tensor with <code>pixel_values</code> only and nothing else: <code>model(pixel_values)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([pixel_values, attention_mask])</code> or <code>model([pixel_values, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;pixel_values&quot;: pixel_values, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,j,R,Z=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){t=m("p"),t.innerHTML=h,o=i(),a=m("ul"),a.innerHTML=_,n=i(),v=m("p"),v.innerHTML=D,N=i(),U=m("ul"),U.innerHTML=S,j=i(),R=m("p"),R.innerHTML=Z},l(c){t=p(c,"P",{"data-svelte-h":!0}),w(t)!=="svelte-1ajbfxg"&&(t.innerHTML=h),o=l(c),a=p(c,"UL",{"data-svelte-h":!0}),w(a)!=="svelte-qm1t26"&&(a.innerHTML=_),n=l(c),v=p(c,"P",{"data-svelte-h":!0}),w(v)!=="svelte-1v9qsc5"&&(v.innerHTML=D),N=l(c),U=p(c,"UL",{"data-svelte-h":!0}),w(U)!=="svelte-99h8aq"&&(U.innerHTML=S),j=l(c),R=p(c,"P",{"data-svelte-h":!0}),w(R)!=="svelte-1an3odd"&&(R.innerHTML=Z)},m(c,z){r(c,t,z),r(c,o,z),r(c,a,z),r(c,n,z),r(c,v,z),r(c,N,z),r(c,U,z),r(c,j,z),r(c,R,z)},p:Ce,d(c){c&&(s(t),s(o),s(a),s(n),s(v),s(N),s(U),s(j),s(R))}}}function Ut(F){let t,h=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=m("p"),t.innerHTML=h},l(o){t=p(o,"P",{"data-svelte-h":!0}),w(t)!=="svelte-fincs2"&&(t.innerHTML=h)},m(o,a){r(o,t,a)},p:Ce,d(o){o&&s(t)}}}function Pt(F){let t,h="Examples:",o,a,_;return a=new Ve({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGQ29udk5leHRNb2RlbCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZjb252bmV4dC10aW55LTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQ29udk5leHRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZjb252bmV4dC10aW55LTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, 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 = AutoImageProcessor.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`,wrap:!1}}),{c(){t=m("p"),t.textContent=h,o=i(),b(a.$$.fragment)},l(n){t=p(n,"P",{"data-svelte-h":!0}),w(t)!=="svelte-kvfsh7"&&(t.textContent=h),o=l(n),x(a.$$.fragment,n)},m(n,v){r(n,t,v),r(n,o,v),C(a,n,v),_=!0},p:Ce,i(n){_||(y(a.$$.fragment,n),_=!0)},o(n){$(a.$$.fragment,n),_=!1},d(n){n&&(s(t),s(o)),T(a,n)}}}function Zt(F){let t,h="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",o,a,_="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",n,v,D=`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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,N,U,S=`<li>a single Tensor with <code>pixel_values</code> only and nothing else: <code>model(pixel_values)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([pixel_values, attention_mask])</code> or <code>model([pixel_values, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;pixel_values&quot;: pixel_values, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,j,R,Z=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){t=m("p"),t.innerHTML=h,o=i(),a=m("ul"),a.innerHTML=_,n=i(),v=m("p"),v.innerHTML=D,N=i(),U=m("ul"),U.innerHTML=S,j=i(),R=m("p"),R.innerHTML=Z},l(c){t=p(c,"P",{"data-svelte-h":!0}),w(t)!=="svelte-1ajbfxg"&&(t.innerHTML=h),o=l(c),a=p(c,"UL",{"data-svelte-h":!0}),w(a)!=="svelte-qm1t26"&&(a.innerHTML=_),n=l(c),v=p(c,"P",{"data-svelte-h":!0}),w(v)!=="svelte-1v9qsc5"&&(v.innerHTML=D),N=l(c),U=p(c,"UL",{"data-svelte-h":!0}),w(U)!=="svelte-99h8aq"&&(U.innerHTML=S),j=l(c),R=p(c,"P",{"data-svelte-h":!0}),w(R)!=="svelte-1an3odd"&&(R.innerHTML=Z)},m(c,z){r(c,t,z),r(c,o,z),r(c,a,z),r(c,n,z),r(c,v,z),r(c,N,z),r(c,U,z),r(c,j,z),r(c,R,z)},p:Ce,d(c){c&&(s(t),s(o),s(a),s(n),s(v),s(N),s(U),s(j),s(R))}}}function Wt(F){let t,h=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=m("p"),t.innerHTML=h},l(o){t=p(o,"P",{"data-svelte-h":!0}),w(t)!=="svelte-fincs2"&&(t.innerHTML=h)},m(o,a){r(o,t,a)},p:Ce,d(o){o&&s(t)}}}function kt(F){let t,h="Examples:",o,a,_;return a=new Ve({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGQ29udk5leHRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGY29udm5leHQtdGlueS0yMjQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkNvbnZOZXh0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZjb252bmV4dC10aW55LTIyNCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfY2xhc3NfaWR4JTIwJTNEJTIwdGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQlMEFwcmludCglMjJQcmVkaWN0ZWQlMjBjbGFzcyUzQSUyMiUyQyUyMG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QmludChwcmVkaWN0ZWRfY2xhc3NfaWR4KSU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, 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 = AutoImageProcessor.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)])`,wrap:!1}}),{c(){t=m("p"),t.textContent=h,o=i(),b(a.$$.fragment)},l(n){t=p(n,"P",{"data-svelte-h":!0}),w(t)!=="svelte-kvfsh7"&&(t.textContent=h),o=l(n),x(a.$$.fragment,n)},m(n,v){r(n,t,v),r(n,o,v),C(a,n,v),_=!0},p:Ce,i(n){_||(y(a.$$.fragment,n),_=!0)},o(n){$(a.$$.fragment,n),_=!1},d(n){n&&(s(t),s(o)),T(a,n)}}}function Rt(F){let t,h,o,a,_,n,v=`The bare ConvNext model outputting raw features without any specific head on top.
This model inherits from <a href="/docs/transformers/main/ja/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,D,N,U=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> 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.`,S,j,R,Z,c,z,E,K='The <a href="/docs/transformers/main/ja/model_doc/convnext#transformers.TFConvNextModel">TFConvNextModel</a> forward method, overrides the <code>__call__</code> special method.',ie,V,q,X,me,J,ye,W,H,he,Q,A=`ConvNext Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,ee,Y,le=`This model inherits from <a href="/docs/transformers/main/ja/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,ce,pe,te=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> 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.`,ae,B,fe,d,I,P,k,O='The <a href="/docs/transformers/main/ja/model_doc/convnext#transformers.TFConvNextForImageClassification">TFConvNextForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',ge,ue,Ie,re,je;return t=new xe({props:{title:"TFConvNextModel",local:"transformers.TFConvNextModel",headingTag:"h2"}}),a=new de({props:{name:"class transformers.TFConvNextModel",anchor:"transformers.TFConvNextModel",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"add_pooling_layer",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvNextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ja/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/main/ja/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/main/src/transformers/models/convnext/modeling_tf_convnext.py#L491"}}),j=new Xe({props:{$$slots:{default:[zt]},$$scope:{ctx:F}}}),c=new de({props:{name:"call",anchor:"transformers.TFConvNextModel.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": 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/main/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/ja/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.__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/main/ja/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/main/src/transformers/models/convnext/modeling_tf_convnext.py#L500",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ja/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/main/ja/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>) — 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>) — 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’re 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ja/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),V=new Xe({props:{$$slots:{default:[Ut]},$$scope:{ctx:F}}}),X=new Se({props:{anchor:"transformers.TFConvNextModel.call.example",$$slots:{default:[Pt]},$$scope:{ctx:F}}}),J=new xe({props:{title:"TFConvNextForImageClassification",local:"transformers.TFConvNextForImageClassification",headingTag:"h2"}}),H=new de({props:{name:"class transformers.TFConvNextForImageClassification",anchor:"transformers.TFConvNextForImageClassification",parameters:[{name:"config",val:": ConvNextConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvNextForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ja/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/main/ja/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/main/src/transformers/models/convnext/modeling_tf_convnext.py#L563"}}),B=new Xe({props:{$$slots:{default:[Zt]},$$scope:{ctx:F}}}),I=new de({props:{name:"call",anchor:"transformers.TFConvNextForImageClassification.call",parameters:[{name:"pixel_values",val:": TFModelInputType | None = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": 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/main/ja/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/ja/model_doc/conditional_detr#transformers.ConditionalDetrFeatureExtractor.__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/main/ja/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/main/src/transformers/models/convnext/modeling_tf_convnext.py#L586",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ja/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/main/ja/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ja/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ue=new Xe({props:{$$slots:{default:[Wt]},$$scope:{ctx:F}}}),re=new Se({props:{anchor:"transformers.TFConvNextForImageClassification.call.example",$$slots:{default:[kt]},$$scope:{ctx:F}}}),{c(){b(t.$$.fragment),h=i(),o=m("div"),b(a.$$.fragment),_=i(),n=m("p"),n.innerHTML=v,D=i(),N=m("p"),N.innerHTML=U,S=i(),b(j.$$.fragment),R=i(),Z=m("div"),b(c.$$.fragment),z=i(),E=m("p"),E.innerHTML=K,ie=i(),b(V.$$.fragment),q=i(),b(X.$$.fragment),me=i(),b(J.$$.fragment),ye=i(),W=m("div"),b(H.$$.fragment),he=i(),Q=m("p"),Q.textContent=A,ee=i(),Y=m("p"),Y.innerHTML=le,ce=i(),pe=m("p"),pe.innerHTML=te,ae=i(),b(B.$$.fragment),fe=i(),d=m("div"),b(I.$$.fragment),P=i(),k=m("p"),k.innerHTML=O,ge=i(),b(ue.$$.fragment),Ie=i(),b(re.$$.fragment),this.h()},l(u){x(t.$$.fragment,u),h=l(u),o=p(u,"DIV",{class:!0});var M=se(o);x(a.$$.fragment,M),_=l(M),n=p(M,"P",{"data-svelte-h":!0}),w(n)!=="svelte-sgqamf"&&(n.innerHTML=v),D=l(M),N=p(M,"P",{"data-svelte-h":!0}),w(N)!=="svelte-1be7e3c"&&(N.innerHTML=U),S=l(M),x(j.$$.fragment,M),R=l(M),Z=p(M,"DIV",{class:!0});var oe=se(Z);x(c.$$.fragment,oe),z=l(oe),E=p(oe,"P",{"data-svelte-h":!0}),w(E)!=="svelte-1buimc"&&(E.innerHTML=K),ie=l(oe),x(V.$$.fragment,oe),q=l(oe),x(X.$$.fragment,oe),oe.forEach(s),M.forEach(s),me=l(u),x(J.$$.fragment,u),ye=l(u),W=p(u,"DIV",{class:!0});var L=se(W);x(H.$$.fragment,L),he=l(L),Q=p(L,"P",{"data-svelte-h":!0}),w(Q)!=="svelte-xy24s5"&&(Q.textContent=A),ee=l(L),Y=p(L,"P",{"data-svelte-h":!0}),w(Y)!=="svelte-x53t1u"&&(Y.innerHTML=le),ce=l(L),pe=p(L,"P",{"data-svelte-h":!0}),w(pe)!=="svelte-1be7e3c"&&(pe.innerHTML=te),ae=l(L),x(B.$$.fragment,L),fe=l(L),d=p(L,"DIV",{class:!0});var ne=se(d);x(I.$$.fragment,ne),P=l(ne),k=p(ne,"P",{"data-svelte-h":!0}),w(k)!=="svelte-h88lg6"&&(k.innerHTML=O),ge=l(ne),x(ue.$$.fragment,ne),Ie=l(ne),x(re.$$.fragment,ne),ne.forEach(s),L.forEach(s),this.h()},h(){G(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(u,M){C(t,u,M),r(u,h,M),r(u,o,M),C(a,o,null),f(o,_),f(o,n),f(o,D),f(o,N),f(o,S),C(j,o,null),f(o,R),f(o,Z),C(c,Z,null),f(Z,z),f(Z,E),f(Z,ie),C(V,Z,null),f(Z,q),C(X,Z,null),r(u,me,M),C(J,u,M),r(u,ye,M),r(u,W,M),C(H,W,null),f(W,he),f(W,Q),f(W,ee),f(W,Y),f(W,ce),f(W,pe),f(W,ae),C(B,W,null),f(W,fe),f(W,d),C(I,d,null),f(d,P),f(d,k),f(d,ge),C(ue,d,null),f(d,Ie),C(re,d,null),je=!0},p(u,M){const oe={};M&2&&(oe.$$scope={dirty:M,ctx:u}),j.$set(oe);const L={};M&2&&(L.$$scope={dirty:M,ctx:u}),V.$set(L);const ne={};M&2&&(ne.$$scope={dirty:M,ctx:u}),X.$set(ne);const $e={};M&2&&($e.$$scope={dirty:M,ctx:u}),B.$set($e);const Te={};M&2&&(Te.$$scope={dirty:M,ctx:u}),ue.$set(Te);const Fe={};M&2&&(Fe.$$scope={dirty:M,ctx:u}),re.$set(Fe)},i(u){je||(y(t.$$.fragment,u),y(a.$$.fragment,u),y(j.$$.fragment,u),y(c.$$.fragment,u),y(V.$$.fragment,u),y(X.$$.fragment,u),y(J.$$.fragment,u),y(H.$$.fragment,u),y(B.$$.fragment,u),y(I.$$.fragment,u),y(ue.$$.fragment,u),y(re.$$.fragment,u),je=!0)},o(u){$(t.$$.fragment,u),$(a.$$.fragment,u),$(j.$$.fragment,u),$(c.$$.fragment,u),$(V.$$.fragment,u),$(X.$$.fragment,u),$(J.$$.fragment,u),$(H.$$.fragment,u),$(B.$$.fragment,u),$(I.$$.fragment,u),$(ue.$$.fragment,u),$(re.$$.fragment,u),je=!1},d(u){u&&(s(h),s(o),s(me),s(ye),s(W)),T(t,u),T(a),T(j),T(c),T(V),T(X),T(J,u),T(H),T(B),T(I),T(ue),T(re)}}}function qt(F){let t,h;return t=new gt({props:{$$slots:{default:[Rt]},$$scope:{ctx:F}}}),{c(){b(t.$$.fragment)},l(o){x(t.$$.fragment,o)},m(o,a){C(t,o,a),h=!0},p(o,a){const _={};a&2&&(_.$$scope={dirty:a,ctx:o}),t.$set(_)},i(o){h||(y(t.$$.fragment,o),h=!0)},o(o){$(t.$$.fragment,o),h=!1},d(o){T(t,o)}}}function Lt(F){let t,h,o,a,_,n,v,D,N,U=`ConvNeXT モデルは、<a href="https://arxiv.org/abs/2201.03545" rel="nofollow">A ConvNet for the 2020s</a> で Zhuang Liu、Hanzi Mao、Chao-Yuan Wu、Christoph Feichtenhofer、Trevor Darrell、Saining Xie によって提案されました。
ConvNeXT は、ビジョン トランスフォーマーの設計からインスピレーションを得た純粋な畳み込みモデル (ConvNet) であり、ビジョン トランスフォーマーよりも優れたパフォーマンスを発揮すると主張しています。`,S,j,R="論文の要約は次のとおりです。",Z,c,z=`<em>視覚認識の「狂騒の 20 年代」は、最先端の画像分類モデルとして ConvNet にすぐに取って代わられた Vision Transformers (ViT) の導入から始まりました。
一方、バニラ ViT は、オブジェクト検出やセマンティック セグメンテーションなどの一般的なコンピューター ビジョン タスクに適用すると困難に直面します。階層型トランスフォーマーです
(Swin Transformers など) は、いくつかの ConvNet の以前の機能を再導入し、Transformers を汎用ビジョン バックボーンとして実用的に可能にし、幅広い環境で顕著なパフォーマンスを実証しました。
さまざまな視覚タスク。ただし、このようなハイブリッド アプローチの有効性は、依然として、固有の誘導性ではなく、トランスフォーマーの本質的な優位性によるところが大きいと考えられています。
畳み込みのバイアス。この作業では、設計空間を再検討し、純粋な ConvNet が達成できる限界をテストします。標準 ResNet を設計に向けて徐々に「最新化」します。
ビジョン Transformer の概要を確認し、途中でパフォーマンスの違いに寄与するいくつかの重要なコンポーネントを発見します。この調査の結果は、純粋な ConvNet モデルのファミリーです。
ConvNextと呼ばれます。 ConvNeXts は完全に標準の ConvNet モジュールから構築されており、精度と拡張性の点で Transformers と有利に競合し、87.8% の ImageNet トップ 1 精度を達成しています。
標準 ConvNet のシンプルさと効率を維持しながら、COCO 検出と ADE20K セグメンテーションでは Swin Transformers よりも優れたパフォーマンスを発揮します。</em>`,E,K,ie,V,q,X='ConvNeXT アーキテクチャ。 <a href="https://arxiv.org/abs/2201.03545">元の論文</a>から抜粋。',me,J,ye=`このモデルは、<a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a> によって提供されました。 TensorFlow バージョンのモデルは <a href="https://github.com/ariG23498" rel="nofollow">ariG23498</a> によって提供されました。
<a href="https://github.com/gante" rel="nofollow">gante</a>、および <a href="https://github.com/sayakpaul" rel="nofollow">sayakpaul</a> (同等の貢献)。元のコードは <a href="https://github.com/facebookresearch/ConvNeXt" rel="nofollow">こちら</a> にあります。`,W,H,he,Q,A="ConvNeXT の使用を開始するのに役立つ公式 Hugging Face およびコミュニティ (🌎 で示される) リソースのリスト。",ee,Y,le,ce,pe='<li><a href="/docs/transformers/main/ja/model_doc/convnext#transformers.ConvNextForImageClassification">ConvNextForImageClassification</a> は、この <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification" rel="nofollow">サンプル スクリプト</a> および <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb" rel="nofollow">ノートブック</a>。</li> <li>参照: <a href="../tasks/image_classification">画像分類タスク ガイド</a></li>',te,ae,B="ここに含めるリソースの送信に興味がある場合は、お気軽にプル リクエストを開いてください。審査させていただきます。リソースは、既存のリソースを複製するのではなく、何か新しいものを示すことが理想的です。",fe,d,I,P,k,O,ge,ue=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ja/model_doc/convnext#transformers.ConvNextModel">ConvNextModel</a>. 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
<a href="https://huggingface.co/facebook/convnext-tiny-224" rel="nofollow">facebook/convnext-tiny-224</a> architecture.`,Ie,re,je=`Configuration objects inherit from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,u,M,oe,L,ne,$e,Te,Fe,ze,Qe,_e,Ue,st,qe,dt="Constructs a ConvNeXT image processor.",at,we,Pe,rt,Le,mt="Preprocess an image or batch of images.",Ae,Ze,Ye,ve,We,it,Je,pt="Constructs a fast ConvNeXT image processor.",lt,Me,ke,ct,He,ft="Preprocess an image or batch of images.",Oe,Ne,Ke,Re,et,Ge,tt;return _=new xe({props:{title:"ConvNeXT",local:"convnext",headingTag:"h1"}}),v=new xe({props:{title:"Overview",local:"overview",headingTag:"h2"}}),H=new xe({props:{title:"Resources",local:"resources",headingTag:"h2"}}),Y=new yt({props:{pipeline:"image-classification"}}),d=new xe({props:{title:"ConvNextConfig",local:"transformers.ConvNextConfig",headingTag:"h2"}}),k=new de({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:"layer_scale_init_value",val:" = 1e-06"},{name:"drop_path_rate",val:" = 0.0"},{name:"image_size",val:" = 224"},{name:"out_features",val:" = None"},{name:"out_indices",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.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>, <em>optional</em>, 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>, <em>optional</em>, 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"},{anchor:"transformers.ConvNextConfig.out_features",description:`<strong>out_features</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
If used as backbone, list of features to output. Can be any of <code>&quot;stem&quot;</code>, <code>&quot;stage1&quot;</code>, <code>&quot;stage2&quot;</code>, etc.
(depending on how many stages the model has). If unset and <code>out_indices</code> is set, will default to the
corresponding stages. If unset and <code>out_indices</code> is unset, will default to the last stage. Must be in the
same order as defined in the <code>stage_names</code> attribute.`,name:"out_features"},{anchor:"transformers.ConvNextConfig.out_indices",description:`<strong>out_indices</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
If used as backbone, list of indices of features to output. Can be any of 0, 1, 2, etc. (depending on how
many stages the model has). If unset and <code>out_features</code> is set, will default to the corresponding stages.
If unset and <code>out_features</code> is unset, will default to the last stage. Must be in the
same order as defined in the <code>stage_names</code> attribute.`,name:"out_indices"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convnext/configuration_convnext.py#L31"}}),M=new Se({props:{anchor:"transformers.ConvNextConfig.example",$$slots:{default:[Tt]},$$scope:{ctx:F}}}),L=new xe({props:{title:"ConvNextFeatureExtractor",local:"transformers.ConvNextFeatureExtractor",headingTag:"h2"}}),Te=new de({props:{name:"class transformers.ConvNextFeatureExtractor",anchor:"transformers.ConvNextFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convnext/feature_extraction_convnext.py#L26"}}),ze=new xe({props:{title:"ConvNextImageProcessor",local:"transformers.ConvNextImageProcessor",headingTag:"h2"}}),Ue=new de({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 224 / 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>Resampling.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/main/src/transformers/models/convnext/image_processing_convnext.py#L51"}}),Pe=new de({props:{name:"preprocess",anchor:"transformers.ConvNextImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), list['PIL.Image.Image'], list[numpy.ndarray], list['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:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"}],parametersDescription:[{anchor:"transformers.ConvNextImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,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>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.ConvNextImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convnext/image_processing_convnext.py#L186"}}),Ze=new xe({props:{title:"ConvNextImageProcessorFast",local:"transformers.ConvNextImageProcessorFast",headingTag:"h2"}}),We=new de({props:{name:"class transformers.ConvNextImageProcessorFast",anchor:"transformers.ConvNextImageProcessorFast",parameters:[{name:"**kwargs",val:": typing_extensions.Unpack[transformers.models.convnext.image_processing_convnext_fast.ConvNextFastImageProcessorKwargs]"}],parametersDescription:[{anchor:"transformers.ConvNextImageProcessorFast.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&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by the
<code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.ConvNextImageProcessorFast.size",description:`<strong>size</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.ConvNextImageProcessorFast.default_to_square",description:`<strong>default_to_square</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.default_to_square</code>) &#x2014;
Whether to default to a square image when resizing, if size is an int.`,name:"default_to_square"},{anchor:"transformers.ConvNextImageProcessorFast.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. Only has an effect if <code>do_resize</code> is set to <code>True</code>. Can be
overridden by the <code>resample</code> parameter in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.ConvNextImageProcessorFast.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image to the specified <code>crop_size</code>. Can be overridden by <code>do_center_crop</code> in the
<code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.ConvNextImageProcessorFast.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the output image after applying <code>center_crop</code>. Can be overridden by <code>crop_size</code> in the <code>preprocess</code>
method.`,name:"crop_size"},{anchor:"transformers.ConvNextImageProcessorFast.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 by the specified scale <code>rescale_factor</code>. Can be overridden by the
<code>do_rescale</code> parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.ConvNextImageProcessorFast.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Scale factor to use if rescaling the image. Only has an effect if <code>do_rescale</code> is set to <code>True</code>. Can be
overridden by the <code>rescale_factor</code> parameter in the <code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.ConvNextImageProcessorFast.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. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code> method.`,name:"do_normalize"},{anchor:"transformers.ConvNextImageProcessorFast.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;
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. Can be
overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.ConvNextImageProcessorFast.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;
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.
Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.ConvNextImageProcessorFast.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_convert_rgb</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.ConvNextImageProcessorFast.return_tensors",description:"<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>, defaults to <code>self.return_tensors</code>) &#x2014;\nReturns stacked tensors if set to `pt, otherwise returns a list of tensors.",name:"return_tensors"},{anchor:"transformers.ConvNextImageProcessorFast.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>self.data_format</code>) &#x2014;
Only <code>ChannelDimension.FIRST</code> is supported. Added for compatibility with slow processors.`,name:"data_format"},{anchor:"transformers.ConvNextImageProcessorFast.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>self.input_data_format</code>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"},{anchor:"transformers.ConvNextImageProcessorFast.device",description:`<strong>device</strong> (<code>torch.device</code>, <em>optional</em>, defaults to <code>self.device</code>) &#x2014;
The device to process the images on. If unset, the device is inferred from the input images.`,name:"device"},{anchor:"transformers.ConvNextImageProcessorFast.crop_pct",description:`<strong>crop_pct</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Percentage of the image to crop. Only has an effect if size &lt; 384. Can be
overridden by <code>crop_pct</code> in the<code>preprocess</code> method.`,name:"crop_pct"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convnext/image_processing_convnext_fast.py#L60"}}),ke=new de({props:{name:"preprocess",anchor:"transformers.ConvNextImageProcessorFast.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), list['PIL.Image.Image'], list[numpy.ndarray], list['torch.Tensor']]"},{name:"**kwargs",val:": typing_extensions.Unpack[transformers.models.convnext.image_processing_convnext_fast.ConvNextFastImageProcessorKwargs]"}],parametersDescription:[{anchor:"transformers.ConvNextImageProcessorFast.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.ConvNextImageProcessorFast.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.ConvNextImageProcessorFast.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Describes the maximum input dimensions to the model.`,name:"size"},{anchor:"transformers.ConvNextImageProcessorFast.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code> or <code>InterpolationMode</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.ConvNextImageProcessorFast.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.ConvNextImageProcessorFast.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the output image after applying <code>center_crop</code>.`,name:"crop_size"},{anchor:"transformers.ConvNextImageProcessorFast.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.`,name:"do_rescale"},{anchor:"transformers.ConvNextImageProcessorFast.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.ConvNextImageProcessorFast.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.ConvNextImageProcessorFast.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 to use for normalization. Only has an effect if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.ConvNextImageProcessorFast.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 to use for normalization. Only has an effect if <code>do_normalize</code> is set to
<code>True</code>.`,name:"image_std"},{anchor:"transformers.ConvNextImageProcessorFast.preprocess.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_convert_rgb</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.ConvNextImageProcessorFast.preprocess.return_tensors",description:"<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>, defaults to <code>self.return_tensors</code>) &#x2014;\nReturns stacked tensors if set to `pt, otherwise returns a list of tensors.",name:"return_tensors"},{anchor:"transformers.ConvNextImageProcessorFast.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>self.data_format</code>) &#x2014;
Only <code>ChannelDimension.FIRST</code> is supported. Added for compatibility with slow processors.`,name:"data_format"},{anchor:"transformers.ConvNextImageProcessorFast.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>self.input_data_format</code>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"},{anchor:"transformers.ConvNextImageProcessorFast.preprocess.device",description:`<strong>device</strong> (<code>torch.device</code>, <em>optional</em>, defaults to <code>self.device</code>) &#x2014;
The device to process the images on. If unset, the device is inferred from the input images.`,name:"device"},{anchor:"transformers.ConvNextImageProcessorFast.preprocess.crop_pct",description:`<strong>crop_pct</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Percentage of the image to crop. Only has an effect if size &lt; 384. Can be
overridden by <code>crop_pct</code> in the<code>preprocess</code> method.`,name:"crop_pct"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convnext/image_processing_convnext_fast.py#L84"}}),Ne=new Ct({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[qt],pytorch:[Ft]},$$scope:{ctx:F}}}),Re=new $t({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ja/model_doc/convnext.md"}}),{c(){t=m("meta"),h=i(),o=m("p"),a=i(),b(_.$$.fragment),n=i(),b(v.$$.fragment),D=i(),N=m("p"),N.innerHTML=U,S=i(),j=m("p"),j.textContent=R,Z=i(),c=m("p"),c.innerHTML=z,E=i(),K=m("img"),V=i(),q=m("small"),q.innerHTML=X,me=i(),J=m("p"),J.innerHTML=ye,W=i(),b(H.$$.fragment),he=i(),Q=m("p"),Q.textContent=A,ee=i(),b(Y.$$.fragment),le=i(),ce=m("ul"),ce.innerHTML=pe,te=i(),ae=m("p"),ae.textContent=B,fe=i(),b(d.$$.fragment),I=i(),P=m("div"),b(k.$$.fragment),O=i(),ge=m("p"),ge.innerHTML=ue,Ie=i(),re=m("p"),re.innerHTML=je,u=i(),b(M.$$.fragment),oe=i(),b(L.$$.fragment),ne=i(),$e=m("div"),b(Te.$$.fragment),Fe=i(),b(ze.$$.fragment),Qe=i(),_e=m("div"),b(Ue.$$.fragment),st=i(),qe=m("p"),qe.textContent=dt,at=i(),we=m("div"),b(Pe.$$.fragment),rt=i(),Le=m("p"),Le.textContent=mt,Ae=i(),b(Ze.$$.fragment),Ye=i(),ve=m("div"),b(We.$$.fragment),it=i(),Je=m("p"),Je.textContent=pt,lt=i(),Me=m("div"),b(ke.$$.fragment),ct=i(),He=m("p"),He.textContent=ft,Oe=i(),b(Ne.$$.fragment),Ke=i(),b(Re.$$.fragment),et=i(),Ge=m("p"),this.h()},l(e){const g=xt("svelte-u9bgzb",document.head);t=p(g,"META",{name:!0,content:!0}),g.forEach(s),h=l(e),o=p(e,"P",{}),se(o).forEach(s),a=l(e),x(_.$$.fragment,e),n=l(e),x(v.$$.fragment,e),D=l(e),N=p(e,"P",{"data-svelte-h":!0}),w(N)!=="svelte-1luwy58"&&(N.innerHTML=U),S=l(e),j=p(e,"P",{"data-svelte-h":!0}),w(j)!=="svelte-1cv3nri"&&(j.textContent=R),Z=l(e),c=p(e,"P",{"data-svelte-h":!0}),w(c)!=="svelte-1ecpmdi"&&(c.innerHTML=z),E=l(e),K=p(e,"IMG",{src:!0,alt:!0,width:!0}),V=l(e),q=p(e,"SMALL",{"data-svelte-h":!0}),w(q)!=="svelte-1nlm37k"&&(q.innerHTML=X),me=l(e),J=p(e,"P",{"data-svelte-h":!0}),w(J)!=="svelte-1lpe6b6"&&(J.innerHTML=ye),W=l(e),x(H.$$.fragment,e),he=l(e),Q=p(e,"P",{"data-svelte-h":!0}),w(Q)!=="svelte-13uoa0b"&&(Q.textContent=A),ee=l(e),x(Y.$$.fragment,e),le=l(e),ce=p(e,"UL",{"data-svelte-h":!0}),w(ce)!=="svelte-hqg4o2"&&(ce.innerHTML=pe),te=l(e),ae=p(e,"P",{"data-svelte-h":!0}),w(ae)!=="svelte-17ytafw"&&(ae.textContent=B),fe=l(e),x(d.$$.fragment,e),I=l(e),P=p(e,"DIV",{class:!0});var be=se(P);x(k.$$.fragment,be),O=l(be),ge=p(be,"P",{"data-svelte-h":!0}),w(ge)!=="svelte-ln2z0c"&&(ge.innerHTML=ue),Ie=l(be),re=p(be,"P",{"data-svelte-h":!0}),w(re)!=="svelte-1s6wgpv"&&(re.innerHTML=je),u=l(be),x(M.$$.fragment,be),be.forEach(s),oe=l(e),x(L.$$.fragment,e),ne=l(e),$e=p(e,"DIV",{class:!0});var De=se($e);x(Te.$$.fragment,De),De.forEach(s),Fe=l(e),x(ze.$$.fragment,e),Qe=l(e),_e=p(e,"DIV",{class:!0});var Ee=se(_e);x(Ue.$$.fragment,Ee),st=l(Ee),qe=p(Ee,"P",{"data-svelte-h":!0}),w(qe)!=="svelte-12gun77"&&(qe.textContent=dt),at=l(Ee),we=p(Ee,"DIV",{class:!0});var ot=se(we);x(Pe.$$.fragment,ot),rt=l(ot),Le=p(ot,"P",{"data-svelte-h":!0}),w(Le)!=="svelte-1x3yxsa"&&(Le.textContent=mt),ot.forEach(s),Ee.forEach(s),Ae=l(e),x(Ze.$$.fragment,e),Ye=l(e),ve=p(e,"DIV",{class:!0});var Be=se(ve);x(We.$$.fragment,Be),it=l(Be),Je=p(Be,"P",{"data-svelte-h":!0}),w(Je)!=="svelte-1bn0s7p"&&(Je.textContent=pt),lt=l(Be),Me=p(Be,"DIV",{class:!0});var nt=se(Me);x(ke.$$.fragment,nt),ct=l(nt),He=p(nt,"P",{"data-svelte-h":!0}),w(He)!=="svelte-1x3yxsa"&&(He.textContent=ft),nt.forEach(s),Be.forEach(s),Oe=l(e),x(Ne.$$.fragment,e),Ke=l(e),x(Re.$$.fragment,e),et=l(e),Ge=p(e,"P",{}),se(Ge).forEach(s),this.h()},h(){G(t,"name","hf:doc:metadata"),G(t,"content",Jt),ut(K.src,ie="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/convnext_architecture.jpg")||G(K,"src",ie),G(K,"alt","描画"),G(K,"width","600"),G(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),G(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,g){f(document.head,t),r(e,h,g),r(e,o,g),r(e,a,g),C(_,e,g),r(e,n,g),C(v,e,g),r(e,D,g),r(e,N,g),r(e,S,g),r(e,j,g),r(e,Z,g),r(e,c,g),r(e,E,g),r(e,K,g),r(e,V,g),r(e,q,g),r(e,me,g),r(e,J,g),r(e,W,g),C(H,e,g),r(e,he,g),r(e,Q,g),r(e,ee,g),C(Y,e,g),r(e,le,g),r(e,ce,g),r(e,te,g),r(e,ae,g),r(e,fe,g),C(d,e,g),r(e,I,g),r(e,P,g),C(k,P,null),f(P,O),f(P,ge),f(P,Ie),f(P,re),f(P,u),C(M,P,null),r(e,oe,g),C(L,e,g),r(e,ne,g),r(e,$e,g),C(Te,$e,null),r(e,Fe,g),C(ze,e,g),r(e,Qe,g),r(e,_e,g),C(Ue,_e,null),f(_e,st),f(_e,qe),f(_e,at),f(_e,we),C(Pe,we,null),f(we,rt),f(we,Le),r(e,Ae,g),C(Ze,e,g),r(e,Ye,g),r(e,ve,g),C(We,ve,null),f(ve,it),f(ve,Je),f(ve,lt),f(ve,Me),C(ke,Me,null),f(Me,ct),f(Me,He),r(e,Oe,g),C(Ne,e,g),r(e,Ke,g),C(Re,e,g),r(e,et,g),r(e,Ge,g),tt=!0},p(e,[g]){const be={};g&2&&(be.$$scope={dirty:g,ctx:e}),M.$set(be);const De={};g&2&&(De.$$scope={dirty:g,ctx:e}),Ne.$set(De)},i(e){tt||(y(_.$$.fragment,e),y(v.$$.fragment,e),y(H.$$.fragment,e),y(Y.$$.fragment,e),y(d.$$.fragment,e),y(k.$$.fragment,e),y(M.$$.fragment,e),y(L.$$.fragment,e),y(Te.$$.fragment,e),y(ze.$$.fragment,e),y(Ue.$$.fragment,e),y(Pe.$$.fragment,e),y(Ze.$$.fragment,e),y(We.$$.fragment,e),y(ke.$$.fragment,e),y(Ne.$$.fragment,e),y(Re.$$.fragment,e),tt=!0)},o(e){$(_.$$.fragment,e),$(v.$$.fragment,e),$(H.$$.fragment,e),$(Y.$$.fragment,e),$(d.$$.fragment,e),$(k.$$.fragment,e),$(M.$$.fragment,e),$(L.$$.fragment,e),$(Te.$$.fragment,e),$(ze.$$.fragment,e),$(Ue.$$.fragment,e),$(Pe.$$.fragment,e),$(Ze.$$.fragment,e),$(We.$$.fragment,e),$(ke.$$.fragment,e),$(Ne.$$.fragment,e),$(Re.$$.fragment,e),tt=!1},d(e){e&&(s(h),s(o),s(a),s(n),s(D),s(N),s(S),s(j),s(Z),s(c),s(E),s(K),s(V),s(q),s(me),s(J),s(W),s(he),s(Q),s(ee),s(le),s(ce),s(te),s(ae),s(fe),s(I),s(P),s(oe),s(ne),s($e),s(Fe),s(Qe),s(_e),s(Ae),s(Ye),s(ve),s(Oe),s(Ke),s(et),s(Ge)),s(t),T(_,e),T(v,e),T(H,e),T(Y,e),T(d,e),T(k),T(M),T(L,e),T(Te),T(ze,e),T(Ue),T(Pe),T(Ze,e),T(We),T(ke),T(Ne,e),T(Re,e)}}}const Jt='{"title":"ConvNeXT","local":"convnext","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"ConvNextConfig","local":"transformers.ConvNextConfig","sections":[],"depth":2},{"title":"ConvNextFeatureExtractor","local":"transformers.ConvNextFeatureExtractor","sections":[],"depth":2},{"title":"ConvNextImageProcessor","local":"transformers.ConvNextImageProcessor","sections":[],"depth":2},{"title":"ConvNextImageProcessorFast","local":"transformers.ConvNextImageProcessorFast","sections":[],"depth":2},{"title":"ConvNextModel","local":"transformers.ConvNextModel","sections":[],"depth":2},{"title":"ConvNextForImageClassification","local":"transformers.ConvNextForImageClassification","sections":[],"depth":2},{"title":"TFConvNextModel","local":"transformers.TFConvNextModel","sections":[],"depth":2},{"title":"TFConvNextForImageClassification","local":"transformers.TFConvNextForImageClassification","sections":[],"depth":2}],"depth":1}';function Ht(F){return _t(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yt extends vt{constructor(t){super(),bt(this,t,Ht,Lt,ht,{})}}export{Yt as component};
