import{s as ke,o as Ge,n as ue}from"../chunks/scheduler.01eeda35.js";import{S as Ve,i as ze,g,s as l,r as _,A as Be,h as f,f as r,c as i,j as ie,u as y,x,k as re,y as d,a as p,v as w,d as M,t as $,w as T}from"../chunks/index.6dd51b66.js";import{T as Ue}from"../chunks/Tip.de9bae2b.js";import{D as he}from"../chunks/Docstring.cb556860.js";import{C as Je}from"../chunks/CodeBlock.19ec9b8c.js";import{F as He,M as We}from"../chunks/Markdown.3138439e.js";import{E as Fe}from"../chunks/ExampleCodeBlock.69db56ad.js";import{P as Ae}from"../chunks/PipelineTag.5efc345e.js";import{H as xe,E as Pe}from"../chunks/index.58fe8f9d.js";function Ee(j){let e,c="Example:",t,a,m;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJlZ05ldENvbmZpZyUyQyUyMFJlZ05ldE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFJlZ05ldCUyMHJlZ25ldC15LTQwJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFJlZ05ldENvbmZpZygpJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMHJlZ25ldC15LTQwJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBSZWdOZXRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RegNetConfig, RegNetModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a RegNet regnet-y-40 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = RegNetConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the regnet-y-40 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RegNetModel(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(){e=g("p"),e.textContent=c,t=l(),_(a.$$.fragment)},l(n){e=f(n,"P",{"data-svelte-h":!0}),x(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,N){p(n,e,N),p(n,t,N),w(a,n,N),m=!0},p:ue,i(n){m||(M(a.$$.fragment,n),m=!0)},o(n){$(a.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function Le(j){let e,c=`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(){e=g("p"),e.innerHTML=c},l(t){e=f(t,"P",{"data-svelte-h":!0}),x(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){p(t,e,a)},p:ue,d(t){t&&r(e)}}}function Xe(j){let e,c="Example:",t,a,m;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFJlZ05ldE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnJlZ25ldC15LTA0MCUyMiklMEFtb2RlbCUyMCUzRCUyMFJlZ05ldE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnJlZ25ldC15LTA0MCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, RegNetModel
<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/regnet-y-040&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RegNetModel.from_pretrained(<span class="hljs-string">&quot;facebook/regnet-y-040&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">1088</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`,wrap:!1}}),{c(){e=g("p"),e.textContent=c,t=l(),_(a.$$.fragment)},l(n){e=f(n,"P",{"data-svelte-h":!0}),x(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,N){p(n,e,N),p(n,t,N),w(a,n,N),m=!0},p:ue,i(n){m||(M(a.$$.fragment,n),m=!0)},o(n){$(a.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function Qe(j){let e,c=`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(){e=g("p"),e.innerHTML=c},l(t){e=f(t,"P",{"data-svelte-h":!0}),x(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){p(t,e,a)},p:ue,d(t){t&&r(e)}}}function Ye(j){let e,c="Example:",t,a,m;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFJlZ05ldEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGcmVnbmV0LXktMDQwJTIyKSUwQW1vZGVsJTIwJTNEJTIwUmVnTmV0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZyZWduZXQteS0wNDAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKS5pdGVtKCklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, RegNetForImageClassification
<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/regnet-y-040&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RegNetForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/regnet-y-040&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(){e=g("p"),e.textContent=c,t=l(),_(a.$$.fragment)},l(n){e=f(n,"P",{"data-svelte-h":!0}),x(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,N){p(n,e,N),p(n,t,N),w(a,n,N),m=!0},p:ue,i(n){m||(M(a.$$.fragment,n),m=!0)},o(n){$(a.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function qe(j){let e,c,t,a,m,n,N=`The bare RegNet 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 matters related to general usage and
behavior.`,de,R,H,se,V,ye='The <a href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetModel">RegNetModel</a> forward method, overrides the <code>__call__</code> special method.',ne,Z,pe,A,L,Q,K,v,P,ae,z,we=`RegNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,oe,I,be=`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 matters related to general usage and
behavior.`,Y,C,B,S,F,ee='The <a href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetForImageClassification">RegNetForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',D,k,te,X,q;return e=new xe({props:{title:"RegNetModel",local:"transformers.RegNetModel",headingTag:"h2"}}),a=new he({props:{name:"class transformers.RegNetModel",anchor:"transformers.RegNetModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RegNetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetConfig">RegNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/regnet/modeling_regnet.py#L325"}}),H=new he({props:{name:"forward",anchor:"transformers.RegNetModel.forward",parameters:[{name:"pixel_values",val:": Tensor"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RegNetModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/vilt#transformers.ViltFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.RegNetModel.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.RegNetModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/regnet/modeling_regnet.py#L340",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/en/model_doc/regnet#transformers.RegNetConfig"
>RegNetConfig</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>
`}}),Z=new Ue({props:{$$slots:{default:[Le]},$$scope:{ctx:j}}}),A=new Fe({props:{anchor:"transformers.RegNetModel.forward.example",$$slots:{default:[Xe]},$$scope:{ctx:j}}}),Q=new xe({props:{title:"RegNetForImageClassification",local:"transformers.RegNetForImageClassification",headingTag:"h2"}}),P=new he({props:{name:"class transformers.RegNetForImageClassification",anchor:"transformers.RegNetForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RegNetForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetConfig">RegNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/regnet/modeling_regnet.py#L376"}}),B=new he({props:{name:"forward",anchor:"transformers.RegNetForImageClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.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.RegNetForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/main/en/model_doc/vilt#transformers.ViltFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.RegNetForImageClassification.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.RegNetForImageClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RegNetForImageClassification.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 &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/regnet/modeling_regnet.py#L397",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetConfig"
>RegNetConfig</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/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),k=new Ue({props:{$$slots:{default:[Qe]},$$scope:{ctx:j}}}),X=new Fe({props:{anchor:"transformers.RegNetForImageClassification.forward.example",$$slots:{default:[Ye]},$$scope:{ctx:j}}}),{c(){_(e.$$.fragment),c=l(),t=g("div"),_(a.$$.fragment),m=l(),n=g("p"),n.innerHTML=N,de=l(),R=g("div"),_(H.$$.fragment),se=l(),V=g("p"),V.innerHTML=ye,ne=l(),_(Z.$$.fragment),pe=l(),_(A.$$.fragment),L=l(),_(Q.$$.fragment),K=l(),v=g("div"),_(P.$$.fragment),ae=l(),z=g("p"),z.textContent=we,oe=l(),I=g("p"),I.innerHTML=be,Y=l(),C=g("div"),_(B.$$.fragment),S=l(),F=g("p"),F.innerHTML=ee,D=l(),_(k.$$.fragment),te=l(),_(X.$$.fragment),this.h()},l(o){y(e.$$.fragment,o),c=i(o),t=f(o,"DIV",{class:!0});var u=ie(t);y(a.$$.fragment,u),m=i(u),n=f(u,"P",{"data-svelte-h":!0}),x(n)!=="svelte-8ru9mu"&&(n.innerHTML=N),de=i(u),R=f(u,"DIV",{class:!0});var J=ie(R);y(H.$$.fragment,J),se=i(J),V=f(J,"P",{"data-svelte-h":!0}),x(V)!=="svelte-7oyxd8"&&(V.innerHTML=ye),ne=i(J),y(Z.$$.fragment,J),pe=i(J),y(A.$$.fragment,J),J.forEach(r),u.forEach(r),L=i(o),y(Q.$$.fragment,o),K=i(o),v=f(o,"DIV",{class:!0});var U=ie(v);y(P.$$.fragment,U),ae=i(U),z=f(U,"P",{"data-svelte-h":!0}),x(z)!=="svelte-ipsb0r"&&(z.textContent=we),oe=i(U),I=f(U,"P",{"data-svelte-h":!0}),x(I)!=="svelte-1in5o75"&&(I.innerHTML=be),Y=i(U),C=f(U,"DIV",{class:!0});var W=ie(C);y(B.$$.fragment,W),S=i(W),F=f(W,"P",{"data-svelte-h":!0}),x(F)!=="svelte-idxxuu"&&(F.innerHTML=ee),D=i(W),y(k.$$.fragment,W),te=i(W),y(X.$$.fragment,W),W.forEach(r),U.forEach(r),this.h()},h(){re(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,u){w(e,o,u),p(o,c,u),p(o,t,u),w(a,t,null),d(t,m),d(t,n),d(t,de),d(t,R),w(H,R,null),d(R,se),d(R,V),d(R,ne),w(Z,R,null),d(R,pe),w(A,R,null),p(o,L,u),w(Q,o,u),p(o,K,u),p(o,v,u),w(P,v,null),d(v,ae),d(v,z),d(v,oe),d(v,I),d(v,Y),d(v,C),w(B,C,null),d(C,S),d(C,F),d(C,D),w(k,C,null),d(C,te),w(X,C,null),q=!0},p(o,u){const J={};u&2&&(J.$$scope={dirty:u,ctx:o}),Z.$set(J);const U={};u&2&&(U.$$scope={dirty:u,ctx:o}),A.$set(U);const W={};u&2&&(W.$$scope={dirty:u,ctx:o}),k.$set(W);const E={};u&2&&(E.$$scope={dirty:u,ctx:o}),X.$set(E)},i(o){q||(M(e.$$.fragment,o),M(a.$$.fragment,o),M(H.$$.fragment,o),M(Z.$$.fragment,o),M(A.$$.fragment,o),M(Q.$$.fragment,o),M(P.$$.fragment,o),M(B.$$.fragment,o),M(k.$$.fragment,o),M(X.$$.fragment,o),q=!0)},o(o){$(e.$$.fragment,o),$(a.$$.fragment,o),$(H.$$.fragment,o),$(Z.$$.fragment,o),$(A.$$.fragment,o),$(Q.$$.fragment,o),$(P.$$.fragment,o),$(B.$$.fragment,o),$(k.$$.fragment,o),$(X.$$.fragment,o),q=!1},d(o){o&&(r(c),r(t),r(L),r(K),r(v)),T(e,o),T(a),T(H),T(Z),T(A),T(Q,o),T(P),T(B),T(k),T(X)}}}function Se(j){let e,c;return e=new We({props:{$$slots:{default:[qe]},$$scope:{ctx:j}}}),{c(){_(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,a){w(e,t,a),c=!0},p(t,a){const m={};a&2&&(m.$$scope={dirty:a,ctx:t}),e.$set(m)},i(t){c||(M(e.$$.fragment,t),c=!0)},o(t){$(e.$$.fragment,t),c=!1},d(t){T(e,t)}}}function De(j){let e,c=`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(){e=g("p"),e.innerHTML=c},l(t){e=f(t,"P",{"data-svelte-h":!0}),x(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){p(t,e,a)},p:ue,d(t){t&&r(e)}}}function Oe(j){let e,c="Example:",t,a,m;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGUmVnTmV0TW9kZWwlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnJlZ25ldC15LTA0MCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUmVnTmV0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGcmVnbmV0LXktMDQwJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFRegNetModel
<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/regnet-y-040&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRegNetModel.from_pretrained(<span class="hljs-string">&quot;facebook/regnet-y-040&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(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
<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">1088</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`,wrap:!1}}),{c(){e=g("p"),e.textContent=c,t=l(),_(a.$$.fragment)},l(n){e=f(n,"P",{"data-svelte-h":!0}),x(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,N){p(n,e,N),p(n,t,N),w(a,n,N),m=!0},p:ue,i(n){m||(M(a.$$.fragment,n),m=!0)},o(n){$(a.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function Ke(j){let e,c=`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(){e=g("p"),e.innerHTML=c},l(t){e=f(t,"P",{"data-svelte-h":!0}),x(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){p(t,e,a)},p:ue,d(t){t&&r(e)}}}function et(j){let e,c="Example:",t,a,m;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGUmVnTmV0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZyZWduZXQteS0wNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlJlZ05ldEZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGcmVnbmV0LXktMDQwJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSklMEFwcmludChtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfbGFiZWwlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFRegNetForImageClassification
<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> 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/regnet-y-040&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRegNetForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/regnet-y-040&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </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 = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>))
<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(){e=g("p"),e.textContent=c,t=l(),_(a.$$.fragment)},l(n){e=f(n,"P",{"data-svelte-h":!0}),x(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,N){p(n,e,N),p(n,t,N),w(a,n,N),m=!0},p:ue,i(n){m||(M(a.$$.fragment,n),m=!0)},o(n){$(a.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function tt(j){let e,c,t,a,m,n,N=`The bare RegNet model outputting raw features without any specific head on top.
This model is a Tensorflow
<a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer" rel="nofollow">keras.layers.Layer</a> sub-class. Use it as a
regular Tensorflow Module and refer to the Tensorflow documentation for all matter related to general usage and
behavior.`,de,R,H,se,V,ye='The <a href="/docs/transformers/main/en/model_doc/regnet#transformers.TFRegNetModel">TFRegNetModel</a> forward method, overrides the <code>__call__</code> special method.',ne,Z,pe,A,L,Q,K,v,P,ae,z,we=`RegNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,oe,I,be=`This model is a Tensorflow
<a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer" rel="nofollow">keras.layers.Layer</a> sub-class. Use it as a
regular Tensorflow Module and refer to the Tensorflow documentation for all matter related to general usage and
behavior.`,Y,C,B,S,F,ee='The <a href="/docs/transformers/main/en/model_doc/regnet#transformers.TFRegNetForImageClassification">TFRegNetForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',D,k,te,X,q;return e=new xe({props:{title:"TFRegNetModel",local:"transformers.TFRegNetModel",headingTag:"h2"}}),a=new he({props:{name:"class transformers.TFRegNetModel",anchor:"transformers.TFRegNetModel",parameters:[{name:"config",val:": RegNetConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRegNetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetConfig">RegNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.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/regnet/modeling_tf_regnet.py#L484"}}),H=new he({props:{name:"call",anchor:"transformers.TFRegNetModel.call",parameters:[{name:"pixel_values",val:": Tensor"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFRegNetModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<code>ConveNextImageProcessor.__call__</code> for details.`,name:"pixel_values"},{anchor:"transformers.TFRegNetModel.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.`,name:"output_hidden_states"},{anchor:"transformers.TFRegNetModel.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/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/regnet/modeling_tf_regnet.py#L493",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndNoAttention</code> 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/en/model_doc/regnet#transformers.RegNetConfig"
>RegNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</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>tf.Tensor</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(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, 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_tf_outputs.TFBaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Z=new Ue({props:{$$slots:{default:[De]},$$scope:{ctx:j}}}),A=new Fe({props:{anchor:"transformers.TFRegNetModel.call.example",$$slots:{default:[Oe]},$$scope:{ctx:j}}}),Q=new xe({props:{title:"TFRegNetForImageClassification",local:"transformers.TFRegNetForImageClassification",headingTag:"h2"}}),P=new he({props:{name:"class transformers.TFRegNetForImageClassification",anchor:"transformers.TFRegNetForImageClassification",parameters:[{name:"config",val:": RegNetConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRegNetForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetConfig">RegNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.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/regnet/modeling_tf_regnet.py#L538"}}),B=new he({props:{name:"call",anchor:"transformers.TFRegNetForImageClassification.call",parameters:[{name:"pixel_values",val:": typing.Optional[tensorflow.python.framework.tensor.Tensor] = None"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.tensor.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFRegNetForImageClassification.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<code>ConveNextImageProcessor.__call__</code> for details.`,name:"pixel_values"},{anchor:"transformers.TFRegNetForImageClassification.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.`,name:"output_hidden_states"},{anchor:"transformers.TFRegNetForImageClassification.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/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFRegNetForImageClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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 &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/regnet/modeling_tf_regnet.py#L556",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetConfig"
>RegNetConfig</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/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),k=new Ue({props:{$$slots:{default:[Ke]},$$scope:{ctx:j}}}),X=new Fe({props:{anchor:"transformers.TFRegNetForImageClassification.call.example",$$slots:{default:[et]},$$scope:{ctx:j}}}),{c(){_(e.$$.fragment),c=l(),t=g("div"),_(a.$$.fragment),m=l(),n=g("p"),n.innerHTML=N,de=l(),R=g("div"),_(H.$$.fragment),se=l(),V=g("p"),V.innerHTML=ye,ne=l(),_(Z.$$.fragment),pe=l(),_(A.$$.fragment),L=l(),_(Q.$$.fragment),K=l(),v=g("div"),_(P.$$.fragment),ae=l(),z=g("p"),z.textContent=we,oe=l(),I=g("p"),I.innerHTML=be,Y=l(),C=g("div"),_(B.$$.fragment),S=l(),F=g("p"),F.innerHTML=ee,D=l(),_(k.$$.fragment),te=l(),_(X.$$.fragment),this.h()},l(o){y(e.$$.fragment,o),c=i(o),t=f(o,"DIV",{class:!0});var u=ie(t);y(a.$$.fragment,u),m=i(u),n=f(u,"P",{"data-svelte-h":!0}),x(n)!=="svelte-xzl4r8"&&(n.innerHTML=N),de=i(u),R=f(u,"DIV",{class:!0});var J=ie(R);y(H.$$.fragment,J),se=i(J),V=f(J,"P",{"data-svelte-h":!0}),x(V)!=="svelte-1imc2ag"&&(V.innerHTML=ye),ne=i(J),y(Z.$$.fragment,J),pe=i(J),y(A.$$.fragment,J),J.forEach(r),u.forEach(r),L=i(o),y(Q.$$.fragment,o),K=i(o),v=f(o,"DIV",{class:!0});var U=ie(v);y(P.$$.fragment,U),ae=i(U),z=f(U,"P",{"data-svelte-h":!0}),x(z)!=="svelte-ipsb0r"&&(z.textContent=we),oe=i(U),I=f(U,"P",{"data-svelte-h":!0}),x(I)!=="svelte-1g64psv"&&(I.innerHTML=be),Y=i(U),C=f(U,"DIV",{class:!0});var W=ie(C);y(B.$$.fragment,W),S=i(W),F=f(W,"P",{"data-svelte-h":!0}),x(F)!=="svelte-dozala"&&(F.innerHTML=ee),D=i(W),y(k.$$.fragment,W),te=i(W),y(X.$$.fragment,W),W.forEach(r),U.forEach(r),this.h()},h(){re(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,u){w(e,o,u),p(o,c,u),p(o,t,u),w(a,t,null),d(t,m),d(t,n),d(t,de),d(t,R),w(H,R,null),d(R,se),d(R,V),d(R,ne),w(Z,R,null),d(R,pe),w(A,R,null),p(o,L,u),w(Q,o,u),p(o,K,u),p(o,v,u),w(P,v,null),d(v,ae),d(v,z),d(v,oe),d(v,I),d(v,Y),d(v,C),w(B,C,null),d(C,S),d(C,F),d(C,D),w(k,C,null),d(C,te),w(X,C,null),q=!0},p(o,u){const J={};u&2&&(J.$$scope={dirty:u,ctx:o}),Z.$set(J);const U={};u&2&&(U.$$scope={dirty:u,ctx:o}),A.$set(U);const W={};u&2&&(W.$$scope={dirty:u,ctx:o}),k.$set(W);const E={};u&2&&(E.$$scope={dirty:u,ctx:o}),X.$set(E)},i(o){q||(M(e.$$.fragment,o),M(a.$$.fragment,o),M(H.$$.fragment,o),M(Z.$$.fragment,o),M(A.$$.fragment,o),M(Q.$$.fragment,o),M(P.$$.fragment,o),M(B.$$.fragment,o),M(k.$$.fragment,o),M(X.$$.fragment,o),q=!0)},o(o){$(e.$$.fragment,o),$(a.$$.fragment,o),$(H.$$.fragment,o),$(Z.$$.fragment,o),$(A.$$.fragment,o),$(Q.$$.fragment,o),$(P.$$.fragment,o),$(B.$$.fragment,o),$(k.$$.fragment,o),$(X.$$.fragment,o),q=!1},d(o){o&&(r(c),r(t),r(L),r(K),r(v)),T(e,o),T(a),T(H),T(Z),T(A),T(Q,o),T(P),T(B),T(k),T(X)}}}function st(j){let e,c;return e=new We({props:{$$slots:{default:[tt]},$$scope:{ctx:j}}}),{c(){_(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,a){w(e,t,a),c=!0},p(t,a){const m={};a&2&&(m.$$scope={dirty:a,ctx:t}),e.$set(m)},i(t){c||(M(e.$$.fragment,t),c=!0)},o(t){$(e.$$.fragment,t),c=!1},d(t){T(e,t)}}}function nt(j){let e,c=`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(){e=g("p"),e.innerHTML=c},l(t){e=f(t,"P",{"data-svelte-h":!0}),x(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){p(t,e,a)},p:ue,d(t){t&&r(e)}}}function at(j){let e,c="Examples:",t,a,m;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEZsYXhSZWdOZXRNb2RlbCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZyZWduZXQteS0wNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4UmVnTmV0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGcmVnbmV0LXktMDQwJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, FlaxRegNetModel
<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/regnet-y-040&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRegNetModel.from_pretrained(<span class="hljs-string">&quot;facebook/regnet-y-040&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;np&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(){e=g("p"),e.textContent=c,t=l(),_(a.$$.fragment)},l(n){e=f(n,"P",{"data-svelte-h":!0}),x(e)!=="svelte-kvfsh7"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,N){p(n,e,N),p(n,t,N),w(a,n,N),m=!0},p:ue,i(n){m||(M(a.$$.fragment,n),m=!0)},o(n){$(a.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function ot(j){let e,c=`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(){e=g("p"),e.innerHTML=c},l(t){e=f(t,"P",{"data-svelte-h":!0}),x(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){p(t,e,a)},p:ue,d(t){t&&r(e)}}}function rt(j){let e,c="Example:",t,a,m;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEZsYXhSZWdOZXRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwamF4JTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnJlZ25ldC15LTA0MCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhSZWdOZXRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnJlZ25ldC15LTA0MCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyUwQSUwQSUyMyUyMG1vZGVsJTIwcHJlZGljdHMlMjBvbmUlMjBvZiUyMHRoZSUyMDEwMDAlMjBJbWFnZU5ldCUyMGNsYXNzZXMlMEFwcmVkaWN0ZWRfY2xhc3NfaWR4JTIwJTNEJTIwamF4Lm51bXB5LmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpJTBBcHJpbnQoJTIyUHJlZGljdGVkJTIwY2xhc3MlM0ElMjIlMkMlMjBtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfY2xhc3NfaWR4Lml0ZW0oKSU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, FlaxRegNetForImageClassification
<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> jax
<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/regnet-y-040&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRegNetForImageClassification.from_pretrained(<span class="hljs-string">&quot;facebook/regnet-y-040&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(images=image, return_tensors=<span class="hljs-string">&quot;np&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 = jax.numpy.argmax(logits, axis=-<span class="hljs-number">1</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[predicted_class_idx.item()])`,wrap:!1}}),{c(){e=g("p"),e.textContent=c,t=l(),_(a.$$.fragment)},l(n){e=f(n,"P",{"data-svelte-h":!0}),x(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,N){p(n,e,N),p(n,t,N),w(a,n,N),m=!0},p:ue,i(n){m||(M(a.$$.fragment,n),m=!0)},o(n){$(a.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function lt(j){let e,c,t,a,m,n,N="The bare RegNet model outputting raw features without any specific head on top.",de,R,H=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,se,V,ye=`This model is also a
<a href="https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html" rel="nofollow">flax.linen.Module</a> subclass. Use it as
a regular Flax linen Module and refer to the Flax documentation for all matter related to general usage and
behavior.`,ne,Z,pe="Finally, this model supports inherent JAX features such as:",A,L,Q='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',K,v,P,ae,z,we="The <code>FlaxRegNetPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",oe,I,be,Y,C,B,S,F,ee,D,k,te=`RegNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,X,q,o=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,u,J,U=`This model is also a
<a href="https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html" rel="nofollow">flax.linen.Module</a> subclass. Use it as
a regular Flax linen Module and refer to the Flax documentation for all matter related to general usage and
behavior.`,W,E,$e="Finally, this model supports inherent JAX features such as:",Ne,me,Ze='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',je,O,Te,Ce,le,Re="The <code>FlaxRegNetPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",_e,ge,Me,fe,ve;return e=new xe({props:{title:"FlaxRegNetModel",local:"transformers.FlaxRegNetModel",headingTag:"h2"}}),a=new he({props:{name:"class transformers.FlaxRegNetModel",anchor:"transformers.FlaxRegNetModel",parameters:[{name:"config",val:": RegNetConfig"},{name:"input_shape",val:" = (1, 224, 224, 3)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRegNetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetConfig">RegNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRegNetModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/regnet/modeling_flax_regnet.py#L686"}}),P=new he({props:{name:"__call__",anchor:"transformers.FlaxRegNetModel.__call__",parameters:[{name:"pixel_values",val:""},{name:"params",val:": dict = None"},{name:"train",val:": bool = False"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/regnet/modeling_flax_regnet.py#L597",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</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 (<code>&lt;class 'transformers.models.regnet.configuration_regnet.RegNetConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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>jnp.ndarray</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>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>jnp.ndarray</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/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),I=new Ue({props:{$$slots:{default:[nt]},$$scope:{ctx:j}}}),Y=new Fe({props:{anchor:"transformers.FlaxRegNetModel.__call__.example",$$slots:{default:[at]},$$scope:{ctx:j}}}),B=new xe({props:{title:"FlaxRegNetForImageClassification",local:"transformers.FlaxRegNetForImageClassification",headingTag:"h2"}}),ee=new he({props:{name:"class transformers.FlaxRegNetForImageClassification",anchor:"transformers.FlaxRegNetForImageClassification",parameters:[{name:"config",val:": RegNetConfig"},{name:"input_shape",val:" = (1, 224, 224, 3)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRegNetForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetConfig">RegNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxRegNetForImageClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/regnet/modeling_flax_regnet.py#L776"}}),Te=new he({props:{name:"__call__",anchor:"transformers.FlaxRegNetForImageClassification.__call__",parameters:[{name:"pixel_values",val:""},{name:"params",val:": dict = None"},{name:"train",val:": bool = False"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/regnet/modeling_flax_regnet.py#L597",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.modeling_flax_outputs.FlaxImageClassifierOutputWithNoAttention</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 (<code>&lt;class 'transformers.models.regnet.configuration_regnet.RegNetConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when</li>
<li><strong><code>config.output_hidden_states=True</code>):</strong>
Tuple of <code>jnp.ndarray</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><code>transformers.modeling_flax_outputs.FlaxImageClassifierOutputWithNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ge=new Ue({props:{$$slots:{default:[ot]},$$scope:{ctx:j}}}),fe=new Fe({props:{anchor:"transformers.FlaxRegNetForImageClassification.__call__.example",$$slots:{default:[rt]},$$scope:{ctx:j}}}),{c(){_(e.$$.fragment),c=l(),t=g("div"),_(a.$$.fragment),m=l(),n=g("p"),n.textContent=N,de=l(),R=g("p"),R.innerHTML=H,se=l(),V=g("p"),V.innerHTML=ye,ne=l(),Z=g("p"),Z.textContent=pe,A=l(),L=g("ul"),L.innerHTML=Q,K=l(),v=g("div"),_(P.$$.fragment),ae=l(),z=g("p"),z.innerHTML=we,oe=l(),_(I.$$.fragment),be=l(),_(Y.$$.fragment),C=l(),_(B.$$.fragment),S=l(),F=g("div"),_(ee.$$.fragment),D=l(),k=g("p"),k.textContent=te,X=l(),q=g("p"),q.innerHTML=o,u=l(),J=g("p"),J.innerHTML=U,W=l(),E=g("p"),E.textContent=$e,Ne=l(),me=g("ul"),me.innerHTML=Ze,je=l(),O=g("div"),_(Te.$$.fragment),Ce=l(),le=g("p"),le.innerHTML=Re,_e=l(),_(ge.$$.fragment),Me=l(),_(fe.$$.fragment),this.h()},l(b){y(e.$$.fragment,b),c=i(b),t=f(b,"DIV",{class:!0});var s=ie(t);y(a.$$.fragment,s),m=i(s),n=f(s,"P",{"data-svelte-h":!0}),x(n)!=="svelte-1lrc7eh"&&(n.textContent=N),de=i(s),R=f(s,"P",{"data-svelte-h":!0}),x(R)!=="svelte-3daxed"&&(R.innerHTML=H),se=i(s),V=f(s,"P",{"data-svelte-h":!0}),x(V)!=="svelte-10nfsf3"&&(V.innerHTML=ye),ne=i(s),Z=f(s,"P",{"data-svelte-h":!0}),x(Z)!=="svelte-1pplc4a"&&(Z.textContent=pe),A=i(s),L=f(s,"UL",{"data-svelte-h":!0}),x(L)!=="svelte-1w7z84m"&&(L.innerHTML=Q),K=i(s),v=f(s,"DIV",{class:!0});var h=ie(v);y(P.$$.fragment,h),ae=i(h),z=f(h,"P",{"data-svelte-h":!0}),x(z)!=="svelte-1xwpegk"&&(z.innerHTML=we),oe=i(h),y(I.$$.fragment,h),be=i(h),y(Y.$$.fragment,h),h.forEach(r),s.forEach(r),C=i(b),y(B.$$.fragment,b),S=i(b),F=f(b,"DIV",{class:!0});var G=ie(F);y(ee.$$.fragment,G),D=i(G),k=f(G,"P",{"data-svelte-h":!0}),x(k)!=="svelte-ipsb0r"&&(k.textContent=te),X=i(G),q=f(G,"P",{"data-svelte-h":!0}),x(q)!=="svelte-3daxed"&&(q.innerHTML=o),u=i(G),J=f(G,"P",{"data-svelte-h":!0}),x(J)!=="svelte-10nfsf3"&&(J.innerHTML=U),W=i(G),E=f(G,"P",{"data-svelte-h":!0}),x(E)!=="svelte-1pplc4a"&&(E.textContent=$e),Ne=i(G),me=f(G,"UL",{"data-svelte-h":!0}),x(me)!=="svelte-1w7z84m"&&(me.innerHTML=Ze),je=i(G),O=f(G,"DIV",{class:!0});var ce=ie(O);y(Te.$$.fragment,ce),Ce=i(ce),le=f(ce,"P",{"data-svelte-h":!0}),x(le)!=="svelte-1xwpegk"&&(le.innerHTML=Re),_e=i(ce),y(ge.$$.fragment,ce),Me=i(ce),y(fe.$$.fragment,ce),ce.forEach(r),G.forEach(r),this.h()},h(){re(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),re(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(b,s){w(e,b,s),p(b,c,s),p(b,t,s),w(a,t,null),d(t,m),d(t,n),d(t,de),d(t,R),d(t,se),d(t,V),d(t,ne),d(t,Z),d(t,A),d(t,L),d(t,K),d(t,v),w(P,v,null),d(v,ae),d(v,z),d(v,oe),w(I,v,null),d(v,be),w(Y,v,null),p(b,C,s),w(B,b,s),p(b,S,s),p(b,F,s),w(ee,F,null),d(F,D),d(F,k),d(F,X),d(F,q),d(F,u),d(F,J),d(F,W),d(F,E),d(F,Ne),d(F,me),d(F,je),d(F,O),w(Te,O,null),d(O,Ce),d(O,le),d(O,_e),w(ge,O,null),d(O,Me),w(fe,O,null),ve=!0},p(b,s){const h={};s&2&&(h.$$scope={dirty:s,ctx:b}),I.$set(h);const G={};s&2&&(G.$$scope={dirty:s,ctx:b}),Y.$set(G);const ce={};s&2&&(ce.$$scope={dirty:s,ctx:b}),ge.$set(ce);const Ie={};s&2&&(Ie.$$scope={dirty:s,ctx:b}),fe.$set(Ie)},i(b){ve||(M(e.$$.fragment,b),M(a.$$.fragment,b),M(P.$$.fragment,b),M(I.$$.fragment,b),M(Y.$$.fragment,b),M(B.$$.fragment,b),M(ee.$$.fragment,b),M(Te.$$.fragment,b),M(ge.$$.fragment,b),M(fe.$$.fragment,b),ve=!0)},o(b){$(e.$$.fragment,b),$(a.$$.fragment,b),$(P.$$.fragment,b),$(I.$$.fragment,b),$(Y.$$.fragment,b),$(B.$$.fragment,b),$(ee.$$.fragment,b),$(Te.$$.fragment,b),$(ge.$$.fragment,b),$(fe.$$.fragment,b),ve=!1},d(b){b&&(r(c),r(t),r(C),r(S),r(F)),T(e,b),T(a),T(P),T(I),T(Y),T(B,b),T(ee),T(Te),T(ge),T(fe)}}}function it(j){let e,c;return e=new We({props:{$$slots:{default:[lt]},$$scope:{ctx:j}}}),{c(){_(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,a){w(e,t,a),c=!0},p(t,a){const m={};a&2&&(m.$$scope={dirty:a,ctx:t}),e.$set(m)},i(t){c||(M(e.$$.fragment,t),c=!0)},o(t){$(e.$$.fragment,t),c=!1},d(t){T(e,t)}}}function dt(j){let e,c,t,a,m,n,N,de=`<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/> <img alt="TensorFlow" src="https://img.shields.io/badge/TensorFlow-FF6F00?style=flat&amp;logo=tensorflow&amp;logoColor=white"/> <img alt="Flax" src="https://img.shields.io/badge/Flax-29a79b.svg?style=flat&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAMAAAANxBKoAAAC7lBMVEUAAADg5vYHPVgAoJH+/v76+v39/f9JbLP///9+AIgAnY3///+mcqzt8fXy9fgkXa3Ax9709fr+///9/f8qXq49qp5AaLGMwrv8/P0eW60VWawxYq8yqJzG2dytt9Wyu9elzci519Lf3O3S2efY3OrY0+Xp7PT///////+dqNCexMc6Z7AGpJeGvbenstPZ5ejQ1OfJzOLa7ejh4+/r8fT29vpccbklWK8PVa0AS6ghW63O498vYa+lsdKz1NDRt9Kw1c672tbD3tnAxt7R6OHp5vDe7OrDyuDn6vLl6/EAQKak0MgATakkppo3ZK/Bz9y8w9yzu9jey97axdvHzeG21NHH4trTwthKZrVGZLSUSpuPQJiGAI+GAI8SWKydycLL4d7f2OTi1+S9xNzL0ePT6OLGzeEAo5U0qJw/aLEAo5JFa7JBabEAp5Y4qZ2QxLyKmsm3kL2xoMOehrRNb7RIbbOZgrGre68AUqwAqZqNN5aKJ5N/lMq+qsd8kMa4pcWzh7muhLMEV69juq2kbKqgUaOTR5uMMZWLLZSGAI5VAIdEAH+ovNDHuNCnxcy3qcaYx8K8msGplrx+wLahjbYdXrV6vbMvYK9DrZ8QrZ8tqJuFms+Sos6sw8ecy8RffsNVeMCvmb43aLltv7Q4Y7EZWK4QWa1gt6meZKUdr6GOAZVeA4xPAISyveLUwtivxtKTpNJ2jcqfvcltiMiwwcfAoMVxhL+Kx7xjdrqTe60tsaNQs6KaRKACrJ6UTZwkqpqTL5pkHY4AloSgsd2ptNXPvNOOncuxxsqFl8lmg8apt8FJcr9EbryGxLqlkrkrY7dRa7ZGZLQ5t6iXUZ6PPpgVpZeJCJFKAIGareTa0+KJod3H0deY2M+esM25usmYu8d2zsJOdcBVvrCLbqcAOaaHaKQAMaScWqKBXqCXMJ2RHpiLF5NmJZAdAHN2kta11dKu1M+DkcZLdb+Mcql3TppyRJdzQ5ZtNZNlIY+DF4+voCOQAAAAZ3RSTlMABAT+MEEJ/RH+/TP+Zlv+pUo6Ifz8+fco/fz6+evr39S9nJmOilQaF/7+/f38+smmoYp6b1T+/v7++vj189zU0tDJxsGzsrKSfv34+Pf27dDOysG9t6+n/vv6+vr59uzr1tG+tZ6Qg9Ym3QAABR5JREFUSMeNlVVUG1EQhpcuxEspXqS0SKEtxQp1d3d332STTRpIQhIISQgJhODu7lAoDoUCpe7u7u7+1puGpqnCPOyZvffbOXPm/PsP9JfQgyCC+tmTABTOcbxDz/heENS7/1F+9nhvkHePG0wNDLbGWwdXL+rbLWvpmZHXD8+gMfBjTh+aSe6Gnn7lwQIOTR0c8wfX3PWgv7avbdKwf/ZoBp1Gp/PvuvXW3vw5ib7emnTW4OR+3D4jB9vjNJ/7gNvfWWeH/TO/JyYrsiKCRjVEZA3UB+96kON+DxOQ/NLE8PE5iUYgIXjFnCOlxEQMaSGVxjg4gxOnEycGz8bptuNjVx08LscIgrzH3umcn+KKtiBIyvzOO2O99aAdR8cF19oZalnCtvREUw79tCd5sow1g1UKM6kXqUx4T8wsi3sTjJ3yzDmmhenLXLpo8u45eG5y4Vvbk6kkC4LLtJMowkSQxmk4ggVJEG+7c6QpHT8vvW9X7/o7+3ELmiJi2mEzZJiz8cT6TBlanBk70cB5GGIGC1gRDdZ00yADLW1FL6gqhtvNXNG5S9gdSrk4M1qu7JAsmYshzDS4peoMrU/gT7qQdqYGZaYhxZmVbGJAm/CS/HloWyhRUlknQ9KYcExTwS80d3VNOxUZJpITYyspl0LbhArhpZCD9cRWEQuhYkNGMHToQ/2Cs6swJlb39CsllxdXX6IUKh/H5jbnSsPKjgmoaFQ1f8wRLR0UnGE/RcDEjj2jXG1WVTwUs8+zxfcrVO+vSsuOpVKxCfYZiQ0/aPKuxQbQ8lIz+DClxC8u+snlcJ7Yr1z1JPqUH0V+GDXbOwAib931Y4Imaq0NTIXPXY+N5L18GJ37SVWu+hwXff8l72Ds9XuwYIBaXPq6Shm4l+Vl/5QiOlV+uTk6YR9PxKsI9xNJny31ygK1e+nIRC1N97EGkFPI+jCpiHe5PCEy7oWqWSwRrpOvhFzcbTWMbm3ZJAOn1rUKpYIt/lDhW/5RHHteeWFN60qo98YJuoq1nK3uW5AabyspC1BcIEpOhft+SZAShYoLSvnmSfnYADUERP5jJn2h5XtsgCRuhYQqAvwTwn33+YWEKUI72HX5AtfSAZDe8F2DtPPm77afhl0EkthzuCQU0BWApgQIH9+KB0JhopMM7bJrdTRoleM2JAVNMyPF+wdoaz+XJpGoVAQ7WXUkcV7gT3oUZyi/ISIJAVKhgNp+4b4veCFhYVJw4locdSjZCp9cPUhLF9EZ3KKzURepMEtCDPP3VcWFx4UIiZIklIpFNfHpdEafIF2aRmOcrUmjohbT2WUllbmRvgfbythbQO3222fpDJoufaQPncYYuqoGtUEsCJZL6/3PR5b4syeSjZMQG/T2maGANlXT2v8S4AULWaUkCxfLyW8iW4kdka+nEMjxpL2NCwsYNBp+Q61PF43zyDg9Bm9+3NNySn78jMZUUkumqE4Gp7JmFOdP1vc8PpRrzj9+wPinCy8K1PiJ4aYbnTYpCCbDkBSbzhu2QJ1Gd82t8jI8TH51+OzvXoWbnXUOBkNW+0mWFwGcGOUVpU81/n3TOHb5oMt2FgYGjzau0Nif0Ss7Q3XB33hjjQHjHA5E5aOyIQc8CBrLdQSs3j92VG+3nNEjbkbdbBr9zm04ruvw37vh0QKOdeGIkckc80fX3KH/h7PT4BOjgCty8VZ5ux1MoO5Cf5naca2LAsEgehI+drX8o/0Nu+W0m6K/I9gGPd/dfx/EN/wN62AhsBWuAAAAAElFTkSuQmCC
"/>`,R,H,se,V,ye='The RegNet model was proposed in <a href="https://arxiv.org/abs/2003.13678" rel="nofollow">Designing Network Design Spaces</a> by Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, Piotr Dollár.',ne,Z,pe="The authors design search spaces to perform Neural Architecture Search (NAS). They first start from a high dimensional search space and iteratively reduce the search space by empirically applying constraints based on the best-performing models sampled by the current search space.",A,L,Q="The abstract from the paper is the following:",K,v,P="<em>In this work, we present a new network design paradigm. Our goal is to help advance the understanding of network design and discover design principles that generalize across settings. Instead of focusing on designing individual network instances, we design network design spaces that parametrize populations of networks. The overall process is analogous to classic manual design of networks, but elevated to the design space level. Using our methodology we explore the structure aspect of network design and arrive at a low-dimensional design space consisting of simple, regular networks that we call RegNet. The core insight of the RegNet parametrization is surprisingly simple: widths and depths of good networks can be explained by a quantized linear function. We analyze the RegNet design space and arrive at interesting findings that do not match the current practice of network design. The RegNet design space provides simple and fast networks that work well across a wide range of flop regimes. Under comparable training settings and flops, the RegNet models outperform the popular EfficientNet models while being up to 5x faster on GPUs.</em>",ae,z,we=`This model was contributed by <a href="https://huggingface.co/Francesco" rel="nofollow">Francesco</a>. The TensorFlow version of the model
was contributed by <a href="https://huggingface.co/sayakpaul" rel="nofollow">sayakpaul</a> and <a href="https://huggingface.co/ariG23498" rel="nofollow">ariG23498</a>.
The original code can be found <a href="https://github.com/facebookresearch/pycls" rel="nofollow">here</a>.`,oe,I,be=`The huge 10B model from <a href="https://arxiv.org/abs/2103.01988" rel="nofollow">Self-supervised Pretraining of Visual Features in the Wild</a>,
trained on  one billion Instagram images, is available on the <a href="https://huggingface.co/facebook/regnet-y-10b-seer" rel="nofollow">hub</a>`,Y,C,B,S,F="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with RegNet.",ee,D,k,te,X='<li><a href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetForImageClassification">RegNetForImageClassification</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification" rel="nofollow">example script</a> and <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb" rel="nofollow">notebook</a>.</li> <li>See also: <a href="../tasks/image_classification">Image classification task guide</a></li>',q,o,u="If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",J,U,W,E,$e,Ne,me,Ze=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/regnet#transformers.RegNetModel">RegNetModel</a>. It is used to instantiate a RegNet
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 RegNet
<a href="https://huggingface.co/facebook/regnet-y-040" rel="nofollow">facebook/regnet-y-040</a> architecture.`,je,O,Te=`Configuration objects inherit from <a href="/docs/transformers/main/en/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/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ce,le,Re,_e,ge,Me,fe,ve,b;return m=new xe({props:{title:"RegNet",local:"regnet",headingTag:"h1"}}),H=new xe({props:{title:"Overview",local:"overview",headingTag:"h2"}}),C=new xe({props:{title:"Resources",local:"resources",headingTag:"h2"}}),D=new Ae({props:{pipeline:"image-classification"}}),U=new xe({props:{title:"RegNetConfig",local:"transformers.RegNetConfig",headingTag:"h2"}}),$e=new he({props:{name:"class transformers.RegNetConfig",anchor:"transformers.RegNetConfig",parameters:[{name:"num_channels",val:" = 3"},{name:"embedding_size",val:" = 32"},{name:"hidden_sizes",val:" = [128, 192, 512, 1088]"},{name:"depths",val:" = [2, 6, 12, 2]"},{name:"groups_width",val:" = 64"},{name:"layer_type",val:" = 'y'"},{name:"hidden_act",val:" = 'relu'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RegNetConfig.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.RegNetConfig.embedding_size",description:`<strong>embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Dimensionality (hidden size) for the embedding layer.`,name:"embedding_size"},{anchor:"transformers.RegNetConfig.hidden_sizes",description:`<strong>hidden_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[256, 512, 1024, 2048]</code>) &#x2014;
Dimensionality (hidden size) at each stage.`,name:"hidden_sizes"},{anchor:"transformers.RegNetConfig.depths",description:`<strong>depths</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 4, 6, 3]</code>) &#x2014;
Depth (number of layers) for each stage.`,name:"depths"},{anchor:"transformers.RegNetConfig.layer_type",description:`<strong>layer_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;y&quot;</code>) &#x2014;
The layer to use, it can be either <code>&quot;x&quot; or </code>&#x201C;y&#x201D;<code>. An </code>x<code>layer is a ResNet&apos;s BottleNeck layer with</code>reduction<code>fixed to</code>1<code>. While a </code>y<code>layer is a</code>x\` but with squeeze and excitation. Please refer to the
paper for a detailed explanation of how these layers were constructed.`,name:"layer_type"},{anchor:"transformers.RegNetConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function 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.RegNetConfig.downsample_in_first_stage",description:`<strong>downsample_in_first_stage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, the first stage will downsample the inputs using a <code>stride</code> of 2.`,name:"downsample_in_first_stage"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/regnet/configuration_regnet.py#L24"}}),le=new Fe({props:{anchor:"transformers.RegNetConfig.example",$$slots:{default:[Ee]},$$scope:{ctx:j}}}),_e=new He({props:{pytorch:!0,tensorflow:!0,jax:!0,$$slots:{jax:[it],tensorflow:[st],pytorch:[Se]},$$scope:{ctx:j}}}),Me=new Pe({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/regnet.md"}}),{c(){e=g("meta"),c=l(),t=g("p"),a=l(),_(m.$$.fragment),n=l(),N=g("div"),N.innerHTML=de,R=l(),_(H.$$.fragment),se=l(),V=g("p"),V.innerHTML=ye,ne=l(),Z=g("p"),Z.textContent=pe,A=l(),L=g("p"),L.textContent=Q,K=l(),v=g("p"),v.innerHTML=P,ae=l(),z=g("p"),z.innerHTML=we,oe=l(),I=g("p"),I.innerHTML=be,Y=l(),_(C.$$.fragment),B=l(),S=g("p"),S.textContent=F,ee=l(),_(D.$$.fragment),k=l(),te=g("ul"),te.innerHTML=X,q=l(),o=g("p"),o.textContent=u,J=l(),_(U.$$.fragment),W=l(),E=g("div"),_($e.$$.fragment),Ne=l(),me=g("p"),me.innerHTML=Ze,je=l(),O=g("p"),O.innerHTML=Te,Ce=l(),_(le.$$.fragment),Re=l(),_(_e.$$.fragment),ge=l(),_(Me.$$.fragment),fe=l(),ve=g("p"),this.h()},l(s){const h=Be("svelte-u9bgzb",document.head);e=f(h,"META",{name:!0,content:!0}),h.forEach(r),c=i(s),t=f(s,"P",{}),ie(t).forEach(r),a=i(s),y(m.$$.fragment,s),n=i(s),N=f(s,"DIV",{class:!0,"data-svelte-h":!0}),x(N)!=="svelte-1px1zvi"&&(N.innerHTML=de),R=i(s),y(H.$$.fragment,s),se=i(s),V=f(s,"P",{"data-svelte-h":!0}),x(V)!=="svelte-vy13p6"&&(V.innerHTML=ye),ne=i(s),Z=f(s,"P",{"data-svelte-h":!0}),x(Z)!=="svelte-1y5hyhh"&&(Z.textContent=pe),A=i(s),L=f(s,"P",{"data-svelte-h":!0}),x(L)!=="svelte-vfdo9a"&&(L.textContent=Q),K=i(s),v=f(s,"P",{"data-svelte-h":!0}),x(v)!=="svelte-1judo2o"&&(v.innerHTML=P),ae=i(s),z=f(s,"P",{"data-svelte-h":!0}),x(z)!=="svelte-vuzov4"&&(z.innerHTML=we),oe=i(s),I=f(s,"P",{"data-svelte-h":!0}),x(I)!=="svelte-1bagpig"&&(I.innerHTML=be),Y=i(s),y(C.$$.fragment,s),B=i(s),S=f(s,"P",{"data-svelte-h":!0}),x(S)!=="svelte-15k7oqe"&&(S.textContent=F),ee=i(s),y(D.$$.fragment,s),k=i(s),te=f(s,"UL",{"data-svelte-h":!0}),x(te)!=="svelte-19u4l08"&&(te.innerHTML=X),q=i(s),o=f(s,"P",{"data-svelte-h":!0}),x(o)!=="svelte-1xesile"&&(o.textContent=u),J=i(s),y(U.$$.fragment,s),W=i(s),E=f(s,"DIV",{class:!0});var G=ie(E);y($e.$$.fragment,G),Ne=i(G),me=f(G,"P",{"data-svelte-h":!0}),x(me)!=="svelte-1qp6bqk"&&(me.innerHTML=Ze),je=i(G),O=f(G,"P",{"data-svelte-h":!0}),x(O)!=="svelte-o55m63"&&(O.innerHTML=Te),Ce=i(G),y(le.$$.fragment,G),G.forEach(r),Re=i(s),y(_e.$$.fragment,s),ge=i(s),y(Me.$$.fragment,s),fe=i(s),ve=f(s,"P",{}),ie(ve).forEach(r),this.h()},h(){re(e,"name","hf:doc:metadata"),re(e,"content",ct),re(N,"class","flex flex-wrap space-x-1"),re(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(s,h){d(document.head,e),p(s,c,h),p(s,t,h),p(s,a,h),w(m,s,h),p(s,n,h),p(s,N,h),p(s,R,h),w(H,s,h),p(s,se,h),p(s,V,h),p(s,ne,h),p(s,Z,h),p(s,A,h),p(s,L,h),p(s,K,h),p(s,v,h),p(s,ae,h),p(s,z,h),p(s,oe,h),p(s,I,h),p(s,Y,h),w(C,s,h),p(s,B,h),p(s,S,h),p(s,ee,h),w(D,s,h),p(s,k,h),p(s,te,h),p(s,q,h),p(s,o,h),p(s,J,h),w(U,s,h),p(s,W,h),p(s,E,h),w($e,E,null),d(E,Ne),d(E,me),d(E,je),d(E,O),d(E,Ce),w(le,E,null),p(s,Re,h),w(_e,s,h),p(s,ge,h),w(Me,s,h),p(s,fe,h),p(s,ve,h),b=!0},p(s,[h]){const G={};h&2&&(G.$$scope={dirty:h,ctx:s}),le.$set(G);const ce={};h&2&&(ce.$$scope={dirty:h,ctx:s}),_e.$set(ce)},i(s){b||(M(m.$$.fragment,s),M(H.$$.fragment,s),M(C.$$.fragment,s),M(D.$$.fragment,s),M(U.$$.fragment,s),M($e.$$.fragment,s),M(le.$$.fragment,s),M(_e.$$.fragment,s),M(Me.$$.fragment,s),b=!0)},o(s){$(m.$$.fragment,s),$(H.$$.fragment,s),$(C.$$.fragment,s),$(D.$$.fragment,s),$(U.$$.fragment,s),$($e.$$.fragment,s),$(le.$$.fragment,s),$(_e.$$.fragment,s),$(Me.$$.fragment,s),b=!1},d(s){s&&(r(c),r(t),r(a),r(n),r(N),r(R),r(se),r(V),r(ne),r(Z),r(A),r(L),r(K),r(v),r(ae),r(z),r(oe),r(I),r(Y),r(B),r(S),r(ee),r(k),r(te),r(q),r(o),r(J),r(W),r(E),r(Re),r(ge),r(fe),r(ve)),r(e),T(m,s),T(H,s),T(C,s),T(D,s),T(U,s),T($e),T(le),T(_e,s),T(Me,s)}}}const ct='{"title":"RegNet","local":"regnet","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"RegNetConfig","local":"transformers.RegNetConfig","sections":[],"depth":2},{"title":"RegNetModel","local":"transformers.RegNetModel","sections":[],"depth":2},{"title":"RegNetForImageClassification","local":"transformers.RegNetForImageClassification","sections":[],"depth":2},{"title":"TFRegNetModel","local":"transformers.TFRegNetModel","sections":[],"depth":2},{"title":"TFRegNetForImageClassification","local":"transformers.TFRegNetForImageClassification","sections":[],"depth":2},{"title":"FlaxRegNetModel","local":"transformers.FlaxRegNetModel","sections":[],"depth":2},{"title":"FlaxRegNetForImageClassification","local":"transformers.FlaxRegNetForImageClassification","sections":[],"depth":2}],"depth":1}';function pt(j){return Ge(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Mt extends Ve{constructor(e){super(),ze(this,e,pt,dt,ke,{})}}export{Mt as component};
