import{s as ke,f as Be,o as ze,n as ge}from"../chunks/scheduler.25b97de1.js";import{S as Ge,i as Ve,g as f,s as l,r as b,A as Xe,h,f as r,c as i,j as de,u as y,x as N,k as se,y as d,a as m,v as $,d as w,t as M,w as T}from"../chunks/index.d9030fc9.js";import{T as Ie}from"../chunks/Tip.baa67368.js";import{D as ue}from"../chunks/Docstring.e257edda.js";import{C as Je}from"../chunks/CodeBlock.e6cd0d95.js";import{F as He,M as Ue}from"../chunks/Markdown.7217f838.js";import{E as Fe}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{P as Pe}from"../chunks/PipelineTag.5f100392.js";import{H as Ne,E as Le}from"../chunks/EditOnGithub.91d95064.js";function Qe(C){let e,c="Example:",t,a,p;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJlc05ldENvbmZpZyUyQyUyMFJlc05ldE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFJlc05ldCUyMHJlc25ldC01MCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBSZXNOZXRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwcmVzbmV0LTUwJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBSZXNOZXRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ResNetConfig, ResNetModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ResNet resnet-50 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ResNetConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the resnet-50 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ResNetModel(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=f("p"),e.textContent=c,t=l(),b(a.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,j){m(n,e,j),m(n,t,j),$(a,n,j),p=!0},p:ge,i(n){p||(w(a.$$.fragment,n),p=!0)},o(n){M(a.$$.fragment,n),p=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function Ee(C){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=f("p"),e.innerHTML=c},l(t){e=h(t,"P",{"data-svelte-h":!0}),N(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){m(t,e,a)},p:ge,d(t){t&&r(e)}}}function Ye(C){let e,c="Example:",t,a,p;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFJlc05ldE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZyZXNuZXQtNTAlMjIpJTBBbW9kZWwlMjAlM0QlMjBSZXNOZXRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGcmVzbmV0LTUwJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBbGlzdChsYXN0X2hpZGRlbl9zdGF0ZXMuc2hhcGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ResNetModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/resnet-50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ResNetModel.from_pretrained(<span class="hljs-string">&quot;microsoft/resnet-50&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">2048</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`,wrap:!1}}),{c(){e=f("p"),e.textContent=c,t=l(),b(a.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,j){m(n,e,j),m(n,t,j),$(a,n,j),p=!0},p:ge,i(n){p||(w(a.$$.fragment,n),p=!0)},o(n){M(a.$$.fragment,n),p=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function qe(C){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=f("p"),e.innerHTML=c},l(t){e=h(t,"P",{"data-svelte-h":!0}),N(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){m(t,e,a)},p:ge,d(t){t&&r(e)}}}function Ae(C){let e,c="Example:",t,a,p;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFJlc05ldEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnJlc25ldC01MCUyMiklMEFtb2RlbCUyMCUzRCUyMFJlc05ldEZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnJlc25ldC01MCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpLml0ZW0oKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, ResNetForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/resnet-50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ResNetForImageClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/resnet-50&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])
tiger cat`,wrap:!1}}),{c(){e=f("p"),e.textContent=c,t=l(),b(a.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,j){m(n,e,j),m(n,t,j),$(a,n,j),p=!0},p:ge,i(n){p||(w(a.$$.fragment,n),p=!0)},o(n){M(a.$$.fragment,n),p=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function Se(C){let e,c,t,a,p,n,j=`The bare ResNet 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.`,ne,x,E,ae,z,ye='The <a href="/docs/transformers/main/en/model_doc/resnet#transformers.ResNetModel">ResNetModel</a> forward method, overrides the <code>__call__</code> special method.',oe,Z,me,X,L,Y,K,v,H,re,G,$e=`ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,le,W,_e=`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,R,V,S,F,ee='The <a href="/docs/transformers/main/en/model_doc/resnet#transformers.ResNetForImageClassification">ResNetForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',D,k,te,Q,A;return e=new Ne({props:{title:"ResNetModel",local:"transformers.ResNetModel",headingTag:"h2"}}),a=new ue({props:{name:"class transformers.ResNetModel",anchor:"transformers.ResNetModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ResNetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/resnet#transformers.ResNetConfig">ResNetConfig</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/resnet/modeling_resnet.py#L307"}}),E=new ue({props:{name:"forward",anchor:"transformers.ResNetModel.forward",parameters:[{name:"pixel_values",val:": Tensor"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ResNetModel.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/imagegpt#transformers.ImageGPTFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ResNetModel.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.ResNetModel.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/resnet/modeling_resnet.py#L321",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/resnet#transformers.ResNetConfig"
>ResNetConfig</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 Ie({props:{$$slots:{default:[Ee]},$$scope:{ctx:C}}}),X=new Fe({props:{anchor:"transformers.ResNetModel.forward.example",$$slots:{default:[Ye]},$$scope:{ctx:C}}}),Y=new Ne({props:{title:"ResNetForImageClassification",local:"transformers.ResNetForImageClassification",headingTag:"h2"}}),H=new ue({props:{name:"class transformers.ResNetForImageClassification",anchor:"transformers.ResNetForImageClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ResNetForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/resnet#transformers.ResNetConfig">ResNetConfig</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/resnet/modeling_resnet.py#L357"}}),V=new ue({props:{name:"forward",anchor:"transformers.ResNetForImageClassification.forward",parameters:[{name:"pixel_values",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.ResNetForImageClassification.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/imagegpt#transformers.ImageGPTFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.ResNetForImageClassification.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.ResNetForImageClassification.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.ResNetForImageClassification.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/resnet/modeling_resnet.py#L377",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/resnet#transformers.ResNetConfig"
>ResNetConfig</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 Ie({props:{$$slots:{default:[qe]},$$scope:{ctx:C}}}),Q=new Fe({props:{anchor:"transformers.ResNetForImageClassification.forward.example",$$slots:{default:[Ae]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment),c=l(),t=f("div"),b(a.$$.fragment),p=l(),n=f("p"),n.innerHTML=j,ne=l(),x=f("div"),b(E.$$.fragment),ae=l(),z=f("p"),z.innerHTML=ye,oe=l(),b(Z.$$.fragment),me=l(),b(X.$$.fragment),L=l(),b(Y.$$.fragment),K=l(),v=f("div"),b(H.$$.fragment),re=l(),G=f("p"),G.textContent=$e,le=l(),W=f("p"),W.innerHTML=_e,q=l(),R=f("div"),b(V.$$.fragment),S=l(),F=f("p"),F.innerHTML=ee,D=l(),b(k.$$.fragment),te=l(),b(Q.$$.fragment),this.h()},l(o){y(e.$$.fragment,o),c=i(o),t=h(o,"DIV",{class:!0});var g=de(t);y(a.$$.fragment,g),p=i(g),n=h(g,"P",{"data-svelte-h":!0}),N(n)!=="svelte-6r8zbj"&&(n.innerHTML=j),ne=i(g),x=h(g,"DIV",{class:!0});var J=de(x);y(E.$$.fragment,J),ae=i(J),z=h(J,"P",{"data-svelte-h":!0}),N(z)!=="svelte-1ymnyw8"&&(z.innerHTML=ye),oe=i(J),y(Z.$$.fragment,J),me=i(J),y(X.$$.fragment,J),J.forEach(r),g.forEach(r),L=i(o),y(Y.$$.fragment,o),K=i(o),v=h(o,"DIV",{class:!0});var I=de(v);y(H.$$.fragment,I),re=i(I),G=h(I,"P",{"data-svelte-h":!0}),N(G)!=="svelte-d6857j"&&(G.textContent=$e),le=i(I),W=h(I,"P",{"data-svelte-h":!0}),N(W)!=="svelte-1gjh92c"&&(W.innerHTML=_e),q=i(I),R=h(I,"DIV",{class:!0});var U=de(R);y(V.$$.fragment,U),S=i(U),F=h(U,"P",{"data-svelte-h":!0}),N(F)!=="svelte-jwi8wa"&&(F.innerHTML=ee),D=i(U),y(k.$$.fragment,U),te=i(U),y(Q.$$.fragment,U),U.forEach(r),I.forEach(r),this.h()},h(){se(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(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,g){$(e,o,g),m(o,c,g),m(o,t,g),$(a,t,null),d(t,p),d(t,n),d(t,ne),d(t,x),$(E,x,null),d(x,ae),d(x,z),d(x,oe),$(Z,x,null),d(x,me),$(X,x,null),m(o,L,g),$(Y,o,g),m(o,K,g),m(o,v,g),$(H,v,null),d(v,re),d(v,G),d(v,le),d(v,W),d(v,q),d(v,R),$(V,R,null),d(R,S),d(R,F),d(R,D),$(k,R,null),d(R,te),$(Q,R,null),A=!0},p(o,g){const J={};g&2&&(J.$$scope={dirty:g,ctx:o}),Z.$set(J);const I={};g&2&&(I.$$scope={dirty:g,ctx:o}),X.$set(I);const U={};g&2&&(U.$$scope={dirty:g,ctx:o}),k.$set(U);const P={};g&2&&(P.$$scope={dirty:g,ctx:o}),Q.$set(P)},i(o){A||(w(e.$$.fragment,o),w(a.$$.fragment,o),w(E.$$.fragment,o),w(Z.$$.fragment,o),w(X.$$.fragment,o),w(Y.$$.fragment,o),w(H.$$.fragment,o),w(V.$$.fragment,o),w(k.$$.fragment,o),w(Q.$$.fragment,o),A=!0)},o(o){M(e.$$.fragment,o),M(a.$$.fragment,o),M(E.$$.fragment,o),M(Z.$$.fragment,o),M(X.$$.fragment,o),M(Y.$$.fragment,o),M(H.$$.fragment,o),M(V.$$.fragment,o),M(k.$$.fragment,o),M(Q.$$.fragment,o),A=!1},d(o){o&&(r(c),r(t),r(L),r(K),r(v)),T(e,o),T(a),T(E),T(Z),T(X),T(Y,o),T(H),T(V),T(k),T(Q)}}}function De(C){let e,c;return e=new Ue({props:{$$slots:{default:[Se]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,a){$(e,t,a),c=!0},p(t,a){const p={};a&2&&(p.$$scope={dirty:a,ctx:t}),e.$set(p)},i(t){c||(w(e.$$.fragment,t),c=!0)},o(t){M(e.$$.fragment,t),c=!1},d(t){T(e,t)}}}function Oe(C){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=f("p"),e.innerHTML=c},l(t){e=h(t,"P",{"data-svelte-h":!0}),N(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){m(t,e,a)},p:ge,d(t){t&&r(e)}}}function Ke(C){let e,c="Example:",t,a,p;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGUmVzTmV0TW9kZWwlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZyZXNuZXQtNTAlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlJlc05ldE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZyZXNuZXQtNTAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFResNetModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;huggingface/cats-image&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/resnet-50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFResNetModel.from_pretrained(<span class="hljs-string">&quot;microsoft/resnet-50&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">2048</span>, <span class="hljs-number">7</span>, <span class="hljs-number">7</span>]`,wrap:!1}}),{c(){e=f("p"),e.textContent=c,t=l(),b(a.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,j){m(n,e,j),m(n,t,j),$(a,n,j),p=!0},p:ge,i(n){p||(w(a.$$.fragment,n),p=!0)},o(n){M(a.$$.fragment,n),p=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function et(C){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=f("p"),e.innerHTML=c},l(t){e=h(t,"P",{"data-svelte-h":!0}),N(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){m(t,e,a)},p:ge,d(t){t&&r(e)}}}function tt(C){let e,c="Example:",t,a,p;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGUmVzTmV0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGcmVzbmV0LTUwJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZSZXNOZXRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZyZXNuZXQtNTAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, TFResNetForImageClassification
<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>)
<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;microsoft/resnet-50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFResNetForImageClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/resnet-50&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])
tiger cat`,wrap:!1}}),{c(){e=f("p"),e.textContent=c,t=l(),b(a.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,j){m(n,e,j),m(n,t,j),$(a,n,j),p=!0},p:ge,i(n){p||(w(a.$$.fragment,n),p=!0)},o(n){M(a.$$.fragment,n),p=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function st(C){let e,c,t,a,p,n,j=`The bare ResNet 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.`,ne,x,E,ae,z,ye='The <a href="/docs/transformers/main/en/model_doc/resnet#transformers.TFResNetModel">TFResNetModel</a> forward method, overrides the <code>__call__</code> special method.',oe,Z,me,X,L,Y,K,v,H,re,G,$e=`ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,le,W,_e=`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.`,q,R,V,S,F,ee='The <a href="/docs/transformers/main/en/model_doc/resnet#transformers.TFResNetForImageClassification">TFResNetForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',D,k,te,Q,A;return e=new Ne({props:{title:"TFResNetModel",local:"transformers.TFResNetModel",headingTag:"h2"}}),a=new ue({props:{name:"class transformers.TFResNetModel",anchor:"transformers.TFResNetModel",parameters:[{name:"config",val:": ResNetConfig"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFResNetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/resnet#transformers.ResNetConfig">ResNetConfig</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/resnet/modeling_tf_resnet.py#L473"}}),E=new ue({props:{name:"call",anchor:"transformers.TFResNetModel.call",parameters:[{name:"pixel_values",val:": Tensor"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFResNetModel.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
<a href="/docs/transformers/main/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFResNetModel.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.TFResNetModel.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/resnet/modeling_tf_resnet.py#L482",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/resnet#transformers.ResNetConfig"
>ResNetConfig</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 Ie({props:{$$slots:{default:[Oe]},$$scope:{ctx:C}}}),X=new Fe({props:{anchor:"transformers.TFResNetModel.call.example",$$slots:{default:[Ke]},$$scope:{ctx:C}}}),Y=new Ne({props:{title:"TFResNetForImageClassification",local:"transformers.TFResNetForImageClassification",headingTag:"h2"}}),H=new ue({props:{name:"class transformers.TFResNetForImageClassification",anchor:"transformers.TFResNetForImageClassification",parameters:[{name:"config",val:": ResNetConfig"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFResNetForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/resnet#transformers.ResNetConfig">ResNetConfig</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/resnet/modeling_tf_resnet.py#L520"}}),V=new ue({props:{name:"call",anchor:"transformers.TFResNetForImageClassification.call",parameters:[{name:"pixel_values",val:": Tensor = None"},{name:"labels",val:": Tensor = None"},{name:"output_hidden_states",val:": bool = None"},{name:"return_dict",val:": bool = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFResNetForImageClassification.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
<a href="/docs/transformers/main/en/model_doc/imagegpt#transformers.ImageGPTFeatureExtractor.__call__">ConvNextImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFResNetForImageClassification.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.TFResNetForImageClassification.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.TFResNetForImageClassification.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/resnet/modeling_tf_resnet.py#L545",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.modeling_tf_outputs.TFImageClassifierOutputWithNoAttention</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/resnet#transformers.ResNetConfig"
>ResNetConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>tf.Tensor</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>tf.Tensor</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(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 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_tf_outputs.TFImageClassifierOutputWithNoAttention</code> or <code>tuple(tf.Tensor)</code></p>
`}}),k=new Ie({props:{$$slots:{default:[et]},$$scope:{ctx:C}}}),Q=new Fe({props:{anchor:"transformers.TFResNetForImageClassification.call.example",$$slots:{default:[tt]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment),c=l(),t=f("div"),b(a.$$.fragment),p=l(),n=f("p"),n.innerHTML=j,ne=l(),x=f("div"),b(E.$$.fragment),ae=l(),z=f("p"),z.innerHTML=ye,oe=l(),b(Z.$$.fragment),me=l(),b(X.$$.fragment),L=l(),b(Y.$$.fragment),K=l(),v=f("div"),b(H.$$.fragment),re=l(),G=f("p"),G.textContent=$e,le=l(),W=f("p"),W.innerHTML=_e,q=l(),R=f("div"),b(V.$$.fragment),S=l(),F=f("p"),F.innerHTML=ee,D=l(),b(k.$$.fragment),te=l(),b(Q.$$.fragment),this.h()},l(o){y(e.$$.fragment,o),c=i(o),t=h(o,"DIV",{class:!0});var g=de(t);y(a.$$.fragment,g),p=i(g),n=h(g,"P",{"data-svelte-h":!0}),N(n)!=="svelte-17z1fj4"&&(n.innerHTML=j),ne=i(g),x=h(g,"DIV",{class:!0});var J=de(x);y(E.$$.fragment,J),ae=i(J),z=h(J,"P",{"data-svelte-h":!0}),N(z)!=="svelte-1qebby4"&&(z.innerHTML=ye),oe=i(J),y(Z.$$.fragment,J),me=i(J),y(X.$$.fragment,J),J.forEach(r),g.forEach(r),L=i(o),y(Y.$$.fragment,o),K=i(o),v=h(o,"DIV",{class:!0});var I=de(v);y(H.$$.fragment,I),re=i(I),G=h(I,"P",{"data-svelte-h":!0}),N(G)!=="svelte-d6857j"&&(G.textContent=$e),le=i(I),W=h(I,"P",{"data-svelte-h":!0}),N(W)!=="svelte-1cv6u9r"&&(W.innerHTML=_e),q=i(I),R=h(I,"DIV",{class:!0});var U=de(R);y(V.$$.fragment,U),S=i(U),F=h(U,"P",{"data-svelte-h":!0}),N(F)!=="svelte-1gte4wq"&&(F.innerHTML=ee),D=i(U),y(k.$$.fragment,U),te=i(U),y(Q.$$.fragment,U),U.forEach(r),I.forEach(r),this.h()},h(){se(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(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,g){$(e,o,g),m(o,c,g),m(o,t,g),$(a,t,null),d(t,p),d(t,n),d(t,ne),d(t,x),$(E,x,null),d(x,ae),d(x,z),d(x,oe),$(Z,x,null),d(x,me),$(X,x,null),m(o,L,g),$(Y,o,g),m(o,K,g),m(o,v,g),$(H,v,null),d(v,re),d(v,G),d(v,le),d(v,W),d(v,q),d(v,R),$(V,R,null),d(R,S),d(R,F),d(R,D),$(k,R,null),d(R,te),$(Q,R,null),A=!0},p(o,g){const J={};g&2&&(J.$$scope={dirty:g,ctx:o}),Z.$set(J);const I={};g&2&&(I.$$scope={dirty:g,ctx:o}),X.$set(I);const U={};g&2&&(U.$$scope={dirty:g,ctx:o}),k.$set(U);const P={};g&2&&(P.$$scope={dirty:g,ctx:o}),Q.$set(P)},i(o){A||(w(e.$$.fragment,o),w(a.$$.fragment,o),w(E.$$.fragment,o),w(Z.$$.fragment,o),w(X.$$.fragment,o),w(Y.$$.fragment,o),w(H.$$.fragment,o),w(V.$$.fragment,o),w(k.$$.fragment,o),w(Q.$$.fragment,o),A=!0)},o(o){M(e.$$.fragment,o),M(a.$$.fragment,o),M(E.$$.fragment,o),M(Z.$$.fragment,o),M(X.$$.fragment,o),M(Y.$$.fragment,o),M(H.$$.fragment,o),M(V.$$.fragment,o),M(k.$$.fragment,o),M(Q.$$.fragment,o),A=!1},d(o){o&&(r(c),r(t),r(L),r(K),r(v)),T(e,o),T(a),T(E),T(Z),T(X),T(Y,o),T(H),T(V),T(k),T(Q)}}}function nt(C){let e,c;return e=new Ue({props:{$$slots:{default:[st]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,a){$(e,t,a),c=!0},p(t,a){const p={};a&2&&(p.$$scope={dirty:a,ctx:t}),e.$set(p)},i(t){c||(w(e.$$.fragment,t),c=!0)},o(t){M(e.$$.fragment,t),c=!1},d(t){T(e,t)}}}function at(C){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=f("p"),e.innerHTML=c},l(t){e=h(t,"P",{"data-svelte-h":!0}),N(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){m(t,e,a)},p:ge,d(t){t&&r(e)}}}function ot(C){let e,c="Examples:",t,a,p;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEZsYXhSZXNOZXRNb2RlbCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGcmVzbmV0LTUwJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheFJlc05ldE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZyZXNuZXQtNTAlMjIpJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, FlaxResNetModel
<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;microsoft/resnet-50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxResNetModel.from_pretrained(<span class="hljs-string">&quot;microsoft/resnet-50&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=f("p"),e.textContent=c,t=l(),b(a.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-kvfsh7"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,j){m(n,e,j),m(n,t,j),$(a,n,j),p=!0},p:ge,i(n){p||(w(a.$$.fragment,n),p=!0)},o(n){M(a.$$.fragment,n),p=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function rt(C){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=f("p"),e.innerHTML=c},l(t){e=h(t,"P",{"data-svelte-h":!0}),N(e)!=="svelte-fincs2"&&(e.innerHTML=c)},m(t,a){m(t,e,a)},p:ge,d(t){t&&r(e)}}}function lt(C){let e,c="Example:",t,a,p;return a=new Je({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEZsYXhSZXNOZXRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwamF4JTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZyZXNuZXQtNTAlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4UmVzTmV0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGcmVzbmV0LTUwJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9jbGFzc19pZHglMjAlM0QlMjBqYXgubnVtcHkuYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEFwcmludCglMjJQcmVkaWN0ZWQlMjBjbGFzcyUzQSUyMiUyQyUyMG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZHguaXRlbSgpJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, FlaxResNetForImageClassification
<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;microsoft/resnet-50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxResNetForImageClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/resnet-50&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=f("p"),e.textContent=c,t=l(),b(a.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(a.$$.fragment,n)},m(n,j){m(n,e,j),m(n,t,j),$(a,n,j),p=!0},p:ge,i(n){p||(w(a.$$.fragment,n),p=!0)},o(n){M(a.$$.fragment,n),p=!1},d(n){n&&(r(e),r(t)),T(a,n)}}}function it(C){let e,c,t,a,p,n,j="The bare ResNet model outputting raw features without any specific head on top.",ne,x,E=`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)`,ae,z,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.`,oe,Z,me="Finally, this model supports inherent JAX features such as:",X,L,Y='<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,H,re,G,$e="The <code>FlaxResNetPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",le,W,_e,q,R,V,S,F,ee,D,k,te=`ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,Q,A,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)`,g,J,I=`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.`,U,P,Me="Finally, this model supports inherent JAX features such as:",je,pe,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>',xe,O,Te,Ce,ie,Re="The <code>FlaxResNetPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",be,fe,we,he,ve;return e=new Ne({props:{title:"FlaxResNetModel",local:"transformers.FlaxResNetModel",headingTag:"h2"}}),a=new ue({props:{name:"class transformers.FlaxResNetModel",anchor:"transformers.FlaxResNetModel",parameters:[{name:"config",val:": ResNetConfig"},{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.FlaxResNetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/resnet#transformers.ResNetConfig">ResNetConfig</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.FlaxResNetModel.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/resnet/modeling_flax_resnet.py#L576"}}),H=new ue({props:{name:"__call__",anchor:"transformers.FlaxResNetModel.__call__",parameters:[{name:"pixel_values",val:""},{name:"params",val:": dict = None"},{name:"train",val:": bool = False"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/resnet/modeling_flax_resnet.py#L488",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPoolingAndNoAttention</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.resnet.configuration_resnet.ResNetConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>last_hidden_state</strong> (<code>jnp.ndarray</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.</li>
<li><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state after a pooling operation on the spatial dimensions.</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 <code>config.output_hidden_states=True</code>) — 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 layer) of shape <code>(batch_size, num_channels, height, width)</code>. Hidden-states of the
model at the output of each layer plus the optional initial embedding outputs.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),W=new Ie({props:{$$slots:{default:[at]},$$scope:{ctx:C}}}),q=new Fe({props:{anchor:"transformers.FlaxResNetModel.__call__.example",$$slots:{default:[ot]},$$scope:{ctx:C}}}),V=new Ne({props:{title:"FlaxResNetForImageClassification",local:"transformers.FlaxResNetForImageClassification",headingTag:"h2"}}),ee=new ue({props:{name:"class transformers.FlaxResNetForImageClassification",anchor:"transformers.FlaxResNetForImageClassification",parameters:[{name:"config",val:": ResNetConfig"},{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.FlaxResNetForImageClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/resnet#transformers.ResNetConfig">ResNetConfig</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.FlaxResNetForImageClassification.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/resnet/modeling_flax_resnet.py#L660"}}),Te=new ue({props:{name:"__call__",anchor:"transformers.FlaxResNetForImageClassification.__call__",parameters:[{name:"pixel_values",val:""},{name:"params",val:": dict = None"},{name:"train",val:": bool = False"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/resnet/modeling_flax_resnet.py#L488",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.resnet.configuration_resnet.ResNetConfig'&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>
`}}),fe=new Ie({props:{$$slots:{default:[rt]},$$scope:{ctx:C}}}),he=new Fe({props:{anchor:"transformers.FlaxResNetForImageClassification.__call__.example",$$slots:{default:[lt]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment),c=l(),t=f("div"),b(a.$$.fragment),p=l(),n=f("p"),n.textContent=j,ne=l(),x=f("p"),x.innerHTML=E,ae=l(),z=f("p"),z.innerHTML=ye,oe=l(),Z=f("p"),Z.textContent=me,X=l(),L=f("ul"),L.innerHTML=Y,K=l(),v=f("div"),b(H.$$.fragment),re=l(),G=f("p"),G.innerHTML=$e,le=l(),b(W.$$.fragment),_e=l(),b(q.$$.fragment),R=l(),b(V.$$.fragment),S=l(),F=f("div"),b(ee.$$.fragment),D=l(),k=f("p"),k.textContent=te,Q=l(),A=f("p"),A.innerHTML=o,g=l(),J=f("p"),J.innerHTML=I,U=l(),P=f("p"),P.textContent=Me,je=l(),pe=f("ul"),pe.innerHTML=Ze,xe=l(),O=f("div"),b(Te.$$.fragment),Ce=l(),ie=f("p"),ie.innerHTML=Re,be=l(),b(fe.$$.fragment),we=l(),b(he.$$.fragment),this.h()},l(_){y(e.$$.fragment,_),c=i(_),t=h(_,"DIV",{class:!0});var s=de(t);y(a.$$.fragment,s),p=i(s),n=h(s,"P",{"data-svelte-h":!0}),N(n)!=="svelte-1eswup9"&&(n.textContent=j),ne=i(s),x=h(s,"P",{"data-svelte-h":!0}),N(x)!=="svelte-3daxed"&&(x.innerHTML=E),ae=i(s),z=h(s,"P",{"data-svelte-h":!0}),N(z)!=="svelte-10nfsf3"&&(z.innerHTML=ye),oe=i(s),Z=h(s,"P",{"data-svelte-h":!0}),N(Z)!=="svelte-1pplc4a"&&(Z.textContent=me),X=i(s),L=h(s,"UL",{"data-svelte-h":!0}),N(L)!=="svelte-1w7z84m"&&(L.innerHTML=Y),K=i(s),v=h(s,"DIV",{class:!0});var u=de(v);y(H.$$.fragment,u),re=i(u),G=h(u,"P",{"data-svelte-h":!0}),N(G)!=="svelte-1cjaw40"&&(G.innerHTML=$e),le=i(u),y(W.$$.fragment,u),_e=i(u),y(q.$$.fragment,u),u.forEach(r),s.forEach(r),R=i(_),y(V.$$.fragment,_),S=i(_),F=h(_,"DIV",{class:!0});var B=de(F);y(ee.$$.fragment,B),D=i(B),k=h(B,"P",{"data-svelte-h":!0}),N(k)!=="svelte-d6857j"&&(k.textContent=te),Q=i(B),A=h(B,"P",{"data-svelte-h":!0}),N(A)!=="svelte-3daxed"&&(A.innerHTML=o),g=i(B),J=h(B,"P",{"data-svelte-h":!0}),N(J)!=="svelte-10nfsf3"&&(J.innerHTML=I),U=i(B),P=h(B,"P",{"data-svelte-h":!0}),N(P)!=="svelte-1pplc4a"&&(P.textContent=Me),je=i(B),pe=h(B,"UL",{"data-svelte-h":!0}),N(pe)!=="svelte-1w7z84m"&&(pe.innerHTML=Ze),xe=i(B),O=h(B,"DIV",{class:!0});var ce=de(O);y(Te.$$.fragment,ce),Ce=i(ce),ie=h(ce,"P",{"data-svelte-h":!0}),N(ie)!=="svelte-1cjaw40"&&(ie.innerHTML=Re),be=i(ce),y(fe.$$.fragment,ce),we=i(ce),y(he.$$.fragment,ce),ce.forEach(r),B.forEach(r),this.h()},h(){se(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),se(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(_,s){$(e,_,s),m(_,c,s),m(_,t,s),$(a,t,null),d(t,p),d(t,n),d(t,ne),d(t,x),d(t,ae),d(t,z),d(t,oe),d(t,Z),d(t,X),d(t,L),d(t,K),d(t,v),$(H,v,null),d(v,re),d(v,G),d(v,le),$(W,v,null),d(v,_e),$(q,v,null),m(_,R,s),$(V,_,s),m(_,S,s),m(_,F,s),$(ee,F,null),d(F,D),d(F,k),d(F,Q),d(F,A),d(F,g),d(F,J),d(F,U),d(F,P),d(F,je),d(F,pe),d(F,xe),d(F,O),$(Te,O,null),d(O,Ce),d(O,ie),d(O,be),$(fe,O,null),d(O,we),$(he,O,null),ve=!0},p(_,s){const u={};s&2&&(u.$$scope={dirty:s,ctx:_}),W.$set(u);const B={};s&2&&(B.$$scope={dirty:s,ctx:_}),q.$set(B);const ce={};s&2&&(ce.$$scope={dirty:s,ctx:_}),fe.$set(ce);const We={};s&2&&(We.$$scope={dirty:s,ctx:_}),he.$set(We)},i(_){ve||(w(e.$$.fragment,_),w(a.$$.fragment,_),w(H.$$.fragment,_),w(W.$$.fragment,_),w(q.$$.fragment,_),w(V.$$.fragment,_),w(ee.$$.fragment,_),w(Te.$$.fragment,_),w(fe.$$.fragment,_),w(he.$$.fragment,_),ve=!0)},o(_){M(e.$$.fragment,_),M(a.$$.fragment,_),M(H.$$.fragment,_),M(W.$$.fragment,_),M(q.$$.fragment,_),M(V.$$.fragment,_),M(ee.$$.fragment,_),M(Te.$$.fragment,_),M(fe.$$.fragment,_),M(he.$$.fragment,_),ve=!1},d(_){_&&(r(c),r(t),r(R),r(S),r(F)),T(e,_),T(a),T(H),T(W),T(q),T(V,_),T(ee),T(Te),T(fe),T(he)}}}function dt(C){let e,c;return e=new Ue({props:{$$slots:{default:[it]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,a){$(e,t,a),c=!0},p(t,a){const p={};a&2&&(p.$$scope={dirty:a,ctx:t}),e.$set(p)},i(t){c||(w(e.$$.fragment,t),c=!0)},o(t){M(e.$$.fragment,t),c=!1},d(t){T(e,t)}}}function ct(C){let e,c,t,a,p,n,j,ne,x,E='The ResNet model was proposed in <a href="https://arxiv.org/abs/1512.03385" rel="nofollow">Deep Residual Learning for Image Recognition</a> by Kaiming He, Xiangyu Zhang, Shaoqing Ren and Jian Sun. Our implementation follows the small changes made by <a href="https://catalog.ngc.nvidia.com/orgs/nvidia/resources/resnet_50_v1_5_for_pytorch" rel="nofollow">Nvidia</a>, we apply the <code>stride=2</code> for downsampling in bottleneck’s <code>3x3</code> conv and not in the first <code>1x1</code>. This is generally known as “ResNet v1.5”.',ae,z,ye="ResNet introduced residual connections, they allow to train networks with an unseen number of layers (up to 1000). ResNet won the 2015 ILSVRC & COCO competition, one important milestone in deep computer vision.",oe,Z,me="The abstract from the paper is the following:",X,L,Y=`<em>Deeper neural networks are more difficult to train. We present a residual learning framework to ease the training of networks that are substantially deeper than those used previously. We explicitly reformulate the layers as learning residual functions with reference to the layer inputs, instead of learning unreferenced functions. We provide comprehensive empirical evidence showing that these residual networks are easier to optimize, and can gain accuracy from considerably increased depth. On the ImageNet dataset we evaluate residual nets with a depth of up to 152 layers---8x deeper than VGG nets but still having lower complexity. An ensemble of these residual nets achieves 3.57% error on the ImageNet test set. This result won the 1st place on the ILSVRC 2015 classification task. We also present analysis on CIFAR-10 with 100 and 1000 layers.
The depth of representations is of central importance for many visual recognition tasks. Solely due to our extremely deep representations, we obtain a 28% relative improvement on the COCO object detection dataset. Deep residual nets are foundations of our submissions to ILSVRC &amp; COCO 2015 competitions, where we also won the 1st places on the tasks of ImageNet detection, ImageNet localization, COCO detection, and COCO segmentation.</em>`,K,v,H='The figure below illustrates the architecture of ResNet. Taken from the <a href="https://arxiv.org/abs/1512.03385" rel="nofollow">original paper</a>.',re,G,$e,le,W,_e='This model was contributed by <a href="https://huggingface.co/Francesco" rel="nofollow">Francesco</a>. The TensorFlow version of this model was added by <a href="https://huggingface.co/amyeroberts" rel="nofollow">amyeroberts</a>. The original code can be found <a href="https://github.com/KaimingHe/deep-residual-networks" rel="nofollow">here</a>.',q,R,V,S,F="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ResNet.",ee,D,k,te,Q='<li><a href="/docs/transformers/main/en/model_doc/resnet#transformers.ResNetForImageClassification">ResNetForImageClassification</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>',A,o,g="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,I,U,P,Me,je,pe,Ze=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/resnet#transformers.ResNetModel">ResNetModel</a>. It is used to instantiate an
ResNet 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 ResNet
<a href="https://huggingface.co/microsoft/resnet-50" rel="nofollow">microsoft/resnet-50</a> architecture.`,xe,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,ie,Re,be,fe,we,he,ve,_;return p=new Ne({props:{title:"ResNet",local:"resnet",headingTag:"h1"}}),j=new Ne({props:{title:"Overview",local:"overview",headingTag:"h2"}}),R=new Ne({props:{title:"Resources",local:"resources",headingTag:"h2"}}),D=new Pe({props:{pipeline:"image-classification"}}),I=new Ne({props:{title:"ResNetConfig",local:"transformers.ResNetConfig",headingTag:"h2"}}),Me=new ue({props:{name:"class transformers.ResNetConfig",anchor:"transformers.ResNetConfig",parameters:[{name:"num_channels",val:" = 3"},{name:"embedding_size",val:" = 64"},{name:"hidden_sizes",val:" = [256, 512, 1024, 2048]"},{name:"depths",val:" = [3, 4, 6, 3]"},{name:"layer_type",val:" = 'bottleneck'"},{name:"hidden_act",val:" = 'relu'"},{name:"downsample_in_first_stage",val:" = False"},{name:"downsample_in_bottleneck",val:" = False"},{name:"out_features",val:" = None"},{name:"out_indices",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ResNetConfig.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.ResNetConfig.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.ResNetConfig.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.ResNetConfig.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.ResNetConfig.layer_type",description:`<strong>layer_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;bottleneck&quot;</code>) &#x2014;
The layer to use, it can be either <code>&quot;basic&quot;</code> (used for smaller models, like resnet-18 or resnet-34) or
<code>&quot;bottleneck&quot;</code> (used for larger models like resnet-50 and above).`,name:"layer_type"},{anchor:"transformers.ResNetConfig.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.ResNetConfig.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"},{anchor:"transformers.ResNetConfig.downsample_in_bottleneck",description:`<strong>downsample_in_bottleneck</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, the first conv 1x1 in ResNetBottleNeckLayer will downsample the inputs using a <code>stride</code> of 2.`,name:"downsample_in_bottleneck"},{anchor:"transformers.ResNetConfig.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.ResNetConfig.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/resnet/configuration_resnet.py#L31"}}),ie=new Fe({props:{anchor:"transformers.ResNetConfig.example",$$slots:{default:[Qe]},$$scope:{ctx:C}}}),be=new He({props:{pytorch:!0,tensorflow:!0,jax:!0,$$slots:{jax:[dt],tensorflow:[nt],pytorch:[De]},$$scope:{ctx:C}}}),we=new Le({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/resnet.md"}}),{c(){e=f("meta"),c=l(),t=f("p"),a=l(),b(p.$$.fragment),n=l(),b(j.$$.fragment),ne=l(),x=f("p"),x.innerHTML=E,ae=l(),z=f("p"),z.textContent=ye,oe=l(),Z=f("p"),Z.textContent=me,X=l(),L=f("p"),L.innerHTML=Y,K=l(),v=f("p"),v.innerHTML=H,re=l(),G=f("img"),le=l(),W=f("p"),W.innerHTML=_e,q=l(),b(R.$$.fragment),V=l(),S=f("p"),S.textContent=F,ee=l(),b(D.$$.fragment),k=l(),te=f("ul"),te.innerHTML=Q,A=l(),o=f("p"),o.textContent=g,J=l(),b(I.$$.fragment),U=l(),P=f("div"),b(Me.$$.fragment),je=l(),pe=f("p"),pe.innerHTML=Ze,xe=l(),O=f("p"),O.innerHTML=Te,Ce=l(),b(ie.$$.fragment),Re=l(),b(be.$$.fragment),fe=l(),b(we.$$.fragment),he=l(),ve=f("p"),this.h()},l(s){const u=Xe("svelte-u9bgzb",document.head);e=h(u,"META",{name:!0,content:!0}),u.forEach(r),c=i(s),t=h(s,"P",{}),de(t).forEach(r),a=i(s),y(p.$$.fragment,s),n=i(s),y(j.$$.fragment,s),ne=i(s),x=h(s,"P",{"data-svelte-h":!0}),N(x)!=="svelte-ybpvez"&&(x.innerHTML=E),ae=i(s),z=h(s,"P",{"data-svelte-h":!0}),N(z)!=="svelte-1khrbjk"&&(z.textContent=ye),oe=i(s),Z=h(s,"P",{"data-svelte-h":!0}),N(Z)!=="svelte-vfdo9a"&&(Z.textContent=me),X=i(s),L=h(s,"P",{"data-svelte-h":!0}),N(L)!=="svelte-xwc7kf"&&(L.innerHTML=Y),K=i(s),v=h(s,"P",{"data-svelte-h":!0}),N(v)!=="svelte-17i7uin"&&(v.innerHTML=H),re=i(s),G=h(s,"IMG",{width:!0,src:!0}),le=i(s),W=h(s,"P",{"data-svelte-h":!0}),N(W)!=="svelte-1evl8l5"&&(W.innerHTML=_e),q=i(s),y(R.$$.fragment,s),V=i(s),S=h(s,"P",{"data-svelte-h":!0}),N(S)!=="svelte-1ageb22"&&(S.textContent=F),ee=i(s),y(D.$$.fragment,s),k=i(s),te=h(s,"UL",{"data-svelte-h":!0}),N(te)!=="svelte-1emh1d0"&&(te.innerHTML=Q),A=i(s),o=h(s,"P",{"data-svelte-h":!0}),N(o)!=="svelte-1xesile"&&(o.textContent=g),J=i(s),y(I.$$.fragment,s),U=i(s),P=h(s,"DIV",{class:!0});var B=de(P);y(Me.$$.fragment,B),je=i(B),pe=h(B,"P",{"data-svelte-h":!0}),N(pe)!=="svelte-yj39lo"&&(pe.innerHTML=Ze),xe=i(B),O=h(B,"P",{"data-svelte-h":!0}),N(O)!=="svelte-o55m63"&&(O.innerHTML=Te),Ce=i(B),y(ie.$$.fragment,B),B.forEach(r),Re=i(s),y(be.$$.fragment,s),fe=i(s),y(we.$$.fragment,s),he=i(s),ve=h(s,"P",{}),de(ve).forEach(r),this.h()},h(){se(e,"name","hf:doc:metadata"),se(e,"content",mt),se(G,"width","600"),Be(G.src,$e="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/resnet_architecture.png")||se(G,"src",$e),se(P,"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,u){d(document.head,e),m(s,c,u),m(s,t,u),m(s,a,u),$(p,s,u),m(s,n,u),$(j,s,u),m(s,ne,u),m(s,x,u),m(s,ae,u),m(s,z,u),m(s,oe,u),m(s,Z,u),m(s,X,u),m(s,L,u),m(s,K,u),m(s,v,u),m(s,re,u),m(s,G,u),m(s,le,u),m(s,W,u),m(s,q,u),$(R,s,u),m(s,V,u),m(s,S,u),m(s,ee,u),$(D,s,u),m(s,k,u),m(s,te,u),m(s,A,u),m(s,o,u),m(s,J,u),$(I,s,u),m(s,U,u),m(s,P,u),$(Me,P,null),d(P,je),d(P,pe),d(P,xe),d(P,O),d(P,Ce),$(ie,P,null),m(s,Re,u),$(be,s,u),m(s,fe,u),$(we,s,u),m(s,he,u),m(s,ve,u),_=!0},p(s,[u]){const B={};u&2&&(B.$$scope={dirty:u,ctx:s}),ie.$set(B);const ce={};u&2&&(ce.$$scope={dirty:u,ctx:s}),be.$set(ce)},i(s){_||(w(p.$$.fragment,s),w(j.$$.fragment,s),w(R.$$.fragment,s),w(D.$$.fragment,s),w(I.$$.fragment,s),w(Me.$$.fragment,s),w(ie.$$.fragment,s),w(be.$$.fragment,s),w(we.$$.fragment,s),_=!0)},o(s){M(p.$$.fragment,s),M(j.$$.fragment,s),M(R.$$.fragment,s),M(D.$$.fragment,s),M(I.$$.fragment,s),M(Me.$$.fragment,s),M(ie.$$.fragment,s),M(be.$$.fragment,s),M(we.$$.fragment,s),_=!1},d(s){s&&(r(c),r(t),r(a),r(n),r(ne),r(x),r(ae),r(z),r(oe),r(Z),r(X),r(L),r(K),r(v),r(re),r(G),r(le),r(W),r(q),r(V),r(S),r(ee),r(k),r(te),r(A),r(o),r(J),r(U),r(P),r(Re),r(fe),r(he),r(ve)),r(e),T(p,s),T(j,s),T(R,s),T(D,s),T(I,s),T(Me),T(ie),T(be,s),T(we,s)}}}const mt='{"title":"ResNet","local":"resnet","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"ResNetConfig","local":"transformers.ResNetConfig","sections":[],"depth":2},{"title":"ResNetModel","local":"transformers.ResNetModel","sections":[],"depth":2},{"title":"ResNetForImageClassification","local":"transformers.ResNetForImageClassification","sections":[],"depth":2},{"title":"TFResNetModel","local":"transformers.TFResNetModel","sections":[],"depth":2},{"title":"TFResNetForImageClassification","local":"transformers.TFResNetForImageClassification","sections":[],"depth":2},{"title":"FlaxResNetModel","local":"transformers.FlaxResNetModel","sections":[],"depth":2},{"title":"FlaxResNetForImageClassification","local":"transformers.FlaxResNetForImageClassification","sections":[],"depth":2}],"depth":1}';function pt(C){return ze(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Mt extends Ge{constructor(e){super(),Ve(this,e,pt,ct,ke,{})}}export{Mt as component};
