import{s as ke,f as Be,o as ze,n as ue}from"../chunks/scheduler.9bc65507.js";import{S as Ve,i as Ge,g as h,s as i,r as b,A as Xe,h as g,f as l,c as d,j as de,u as y,x as v,k as se,y as c,a as p,v as $,d as w,t as M,w as T}from"../chunks/index.707bf1b6.js";import{T as Ie}from"../chunks/Tip.c2ecdbf4.js";import{D as ge}from"../chunks/Docstring.17db21ae.js";import{C as Je}from"../chunks/CodeBlock.54a9f38d.js";import{F as He,M as Ue}from"../chunks/Markdown.8ab98a13.js";import{E as Fe}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{P as Pe}from"../chunks/PipelineTag.44585822.js";import{H as ve}from"../chunks/Heading.342b1fa6.js";function Le(C){let e,m="Example:",t,n,f;return n=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=h("p"),e.textContent=m,t=i(),b(n.$$.fragment)},l(s){e=g(s,"P",{"data-svelte-h":!0}),v(e)!=="svelte-11lpom8"&&(e.textContent=m),t=d(s),y(n.$$.fragment,s)},m(s,N){p(s,e,N),p(s,t,N),$(n,s,N),f=!0},p:ue,i(s){f||(w(n.$$.fragment,s),f=!0)},o(s){M(n.$$.fragment,s),f=!1},d(s){s&&(l(e),l(t)),T(n,s)}}}function Qe(C){let e,m=`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=h("p"),e.innerHTML=m},l(t){e=g(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,n){p(t,e,n)},p:ue,d(t){t&&l(e)}}}function Ee(C){let e,m="Example:",t,n,f;return n=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=h("p"),e.textContent=m,t=i(),b(n.$$.fragment)},l(s){e=g(s,"P",{"data-svelte-h":!0}),v(e)!=="svelte-11lpom8"&&(e.textContent=m),t=d(s),y(n.$$.fragment,s)},m(s,N){p(s,e,N),p(s,t,N),$(n,s,N),f=!0},p:ue,i(s){f||(w(n.$$.fragment,s),f=!0)},o(s){M(n.$$.fragment,s),f=!1},d(s){s&&(l(e),l(t)),T(n,s)}}}function Ye(C){let e,m=`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=h("p"),e.innerHTML=m},l(t){e=g(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,n){p(t,e,n)},p:ue,d(t){t&&l(e)}}}function qe(C){let e,m="Example:",t,n,f;return n=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=h("p"),e.textContent=m,t=i(),b(n.$$.fragment)},l(s){e=g(s,"P",{"data-svelte-h":!0}),v(e)!=="svelte-11lpom8"&&(e.textContent=m),t=d(s),y(n.$$.fragment,s)},m(s,N){p(s,e,N),p(s,t,N),$(n,s,N),f=!0},p:ue,i(s){f||(w(n.$$.fragment,s),f=!0)},o(s){M(n.$$.fragment,s),f=!1},d(s){s&&(l(e),l(t)),T(n,s)}}}function Ae(C){let e,m,t,n,f,s,N=`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,Q,ae,B,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,G,P,E,O,_,X,re,z,$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.`,Y,R,V,A,F,K='The <a href="/docs/transformers/main/en/model_doc/resnet#transformers.ResNetForImageClassification">ResNetForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',S,k,ee,L,q;return e=new ve({props:{title:"ResNetModel",local:"transformers.ResNetModel",headingTag:"h2"}}),n=new ge({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#L315"}}),Q=new ge({props:{name:"forward",anchor:"transformers.ResNetModel.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.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/dpt#transformers.DPTFeatureExtractor.__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#L325",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:[Qe]},$$scope:{ctx:C}}}),G=new Fe({props:{anchor:"transformers.ResNetModel.forward.example",$$slots:{default:[Ee]},$$scope:{ctx:C}}}),E=new ve({props:{title:"ResNetForImageClassification",local:"transformers.ResNetForImageClassification",headingTag:"h2"}}),X=new ge({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#L368"}}),V=new ge({props:{name:"forward",anchor:"transformers.ResNetForImageClassification.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.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/dpt#transformers.DPTFeatureExtractor.__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#L381",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:[Ye]},$$scope:{ctx:C}}}),L=new Fe({props:{anchor:"transformers.ResNetForImageClassification.forward.example",$$slots:{default:[qe]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment),m=i(),t=h("div"),b(n.$$.fragment),f=i(),s=h("p"),s.innerHTML=N,ne=i(),x=h("div"),b(Q.$$.fragment),ae=i(),B=h("p"),B.innerHTML=ye,oe=i(),b(Z.$$.fragment),me=i(),b(G.$$.fragment),P=i(),b(E.$$.fragment),O=i(),_=h("div"),b(X.$$.fragment),re=i(),z=h("p"),z.textContent=$e,le=i(),W=h("p"),W.innerHTML=_e,Y=i(),R=h("div"),b(V.$$.fragment),A=i(),F=h("p"),F.innerHTML=K,S=i(),b(k.$$.fragment),ee=i(),b(L.$$.fragment),this.h()},l(o){y(e.$$.fragment,o),m=d(o),t=g(o,"DIV",{class:!0});var u=de(t);y(n.$$.fragment,u),f=d(u),s=g(u,"P",{"data-svelte-h":!0}),v(s)!=="svelte-6r8zbj"&&(s.innerHTML=N),ne=d(u),x=g(u,"DIV",{class:!0});var J=de(x);y(Q.$$.fragment,J),ae=d(J),B=g(J,"P",{"data-svelte-h":!0}),v(B)!=="svelte-1ymnyw8"&&(B.innerHTML=ye),oe=d(J),y(Z.$$.fragment,J),me=d(J),y(G.$$.fragment,J),J.forEach(l),u.forEach(l),P=d(o),y(E.$$.fragment,o),O=d(o),_=g(o,"DIV",{class:!0});var I=de(_);y(X.$$.fragment,I),re=d(I),z=g(I,"P",{"data-svelte-h":!0}),v(z)!=="svelte-d6857j"&&(z.textContent=$e),le=d(I),W=g(I,"P",{"data-svelte-h":!0}),v(W)!=="svelte-1gjh92c"&&(W.innerHTML=_e),Y=d(I),R=g(I,"DIV",{class:!0});var U=de(R);y(V.$$.fragment,U),A=d(U),F=g(U,"P",{"data-svelte-h":!0}),v(F)!=="svelte-jwi8wa"&&(F.innerHTML=K),S=d(U),y(k.$$.fragment,U),ee=d(U),y(L.$$.fragment,U),U.forEach(l),I.forEach(l),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(_,"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){$(e,o,u),p(o,m,u),p(o,t,u),$(n,t,null),c(t,f),c(t,s),c(t,ne),c(t,x),$(Q,x,null),c(x,ae),c(x,B),c(x,oe),$(Z,x,null),c(x,me),$(G,x,null),p(o,P,u),$(E,o,u),p(o,O,u),p(o,_,u),$(X,_,null),c(_,re),c(_,z),c(_,le),c(_,W),c(_,Y),c(_,R),$(V,R,null),c(R,A),c(R,F),c(R,S),$(k,R,null),c(R,ee),$(L,R,null),q=!0},p(o,u){const J={};u&2&&(J.$$scope={dirty:u,ctx:o}),Z.$set(J);const I={};u&2&&(I.$$scope={dirty:u,ctx:o}),G.$set(I);const U={};u&2&&(U.$$scope={dirty:u,ctx:o}),k.$set(U);const H={};u&2&&(H.$$scope={dirty:u,ctx:o}),L.$set(H)},i(o){q||(w(e.$$.fragment,o),w(n.$$.fragment,o),w(Q.$$.fragment,o),w(Z.$$.fragment,o),w(G.$$.fragment,o),w(E.$$.fragment,o),w(X.$$.fragment,o),w(V.$$.fragment,o),w(k.$$.fragment,o),w(L.$$.fragment,o),q=!0)},o(o){M(e.$$.fragment,o),M(n.$$.fragment,o),M(Q.$$.fragment,o),M(Z.$$.fragment,o),M(G.$$.fragment,o),M(E.$$.fragment,o),M(X.$$.fragment,o),M(V.$$.fragment,o),M(k.$$.fragment,o),M(L.$$.fragment,o),q=!1},d(o){o&&(l(m),l(t),l(P),l(O),l(_)),T(e,o),T(n),T(Q),T(Z),T(G),T(E,o),T(X),T(V),T(k),T(L)}}}function Se(C){let e,m;return e=new Ue({props:{$$slots:{default:[Ae]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,n){$(e,t,n),m=!0},p(t,n){const f={};n&2&&(f.$$scope={dirty:n,ctx:t}),e.$set(f)},i(t){m||(w(e.$$.fragment,t),m=!0)},o(t){M(e.$$.fragment,t),m=!1},d(t){T(e,t)}}}function De(C){let e,m=`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=h("p"),e.innerHTML=m},l(t){e=g(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,n){p(t,e,n)},p:ue,d(t){t&&l(e)}}}function Oe(C){let e,m="Example:",t,n,f;return n=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=h("p"),e.textContent=m,t=i(),b(n.$$.fragment)},l(s){e=g(s,"P",{"data-svelte-h":!0}),v(e)!=="svelte-11lpom8"&&(e.textContent=m),t=d(s),y(n.$$.fragment,s)},m(s,N){p(s,e,N),p(s,t,N),$(n,s,N),f=!0},p:ue,i(s){f||(w(n.$$.fragment,s),f=!0)},o(s){M(n.$$.fragment,s),f=!1},d(s){s&&(l(e),l(t)),T(n,s)}}}function Ke(C){let e,m=`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=h("p"),e.innerHTML=m},l(t){e=g(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,n){p(t,e,n)},p:ue,d(t){t&&l(e)}}}function et(C){let e,m="Example:",t,n,f;return n=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=h("p"),e.textContent=m,t=i(),b(n.$$.fragment)},l(s){e=g(s,"P",{"data-svelte-h":!0}),v(e)!=="svelte-11lpom8"&&(e.textContent=m),t=d(s),y(n.$$.fragment,s)},m(s,N){p(s,e,N),p(s,t,N),$(n,s,N),f=!0},p:ue,i(s){f||(w(n.$$.fragment,s),f=!0)},o(s){M(n.$$.fragment,s),f=!1},d(s){s&&(l(e),l(t)),T(n,s)}}}function tt(C){let e,m,t,n,f,s,N=`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">tf.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,Q,ae,B,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,G,P,E,O,_,X,re,z,$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">tf.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,R,V,A,F,K='The <a href="/docs/transformers/main/en/model_doc/resnet#transformers.TFResNetForImageClassification">TFResNetForImageClassification</a> forward method, overrides the <code>__call__</code> special method.',S,k,ee,L,q;return e=new ve({props:{title:"TFResNetModel",local:"transformers.TFResNetModel",headingTag:"h2"}}),n=new ge({props:{name:"class transformers.TFResNetModel",anchor:"transformers.TFResNetModel",parameters:[{name:"*args",val:""},{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#L372"}}),Q=new ge({props:{name:"call",anchor:"transformers.TFResNetModel.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.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/dpt#transformers.DPTFeatureExtractor.__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#L377",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:[De]},$$scope:{ctx:C}}}),G=new Fe({props:{anchor:"transformers.TFResNetModel.call.example",$$slots:{default:[Oe]},$$scope:{ctx:C}}}),E=new ve({props:{title:"TFResNetForImageClassification",local:"transformers.TFResNetForImageClassification",headingTag:"h2"}}),X=new ge({props:{name:"class transformers.TFResNetForImageClassification",anchor:"transformers.TFResNetForImageClassification",parameters:[{name:"*args",val:""},{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#L414"}}),V=new ge({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/dpt#transformers.DPTFeatureExtractor.__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#L431",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:[Ke]},$$scope:{ctx:C}}}),L=new Fe({props:{anchor:"transformers.TFResNetForImageClassification.call.example",$$slots:{default:[et]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment),m=i(),t=h("div"),b(n.$$.fragment),f=i(),s=h("p"),s.innerHTML=N,ne=i(),x=h("div"),b(Q.$$.fragment),ae=i(),B=h("p"),B.innerHTML=ye,oe=i(),b(Z.$$.fragment),me=i(),b(G.$$.fragment),P=i(),b(E.$$.fragment),O=i(),_=h("div"),b(X.$$.fragment),re=i(),z=h("p"),z.textContent=$e,le=i(),W=h("p"),W.innerHTML=_e,Y=i(),R=h("div"),b(V.$$.fragment),A=i(),F=h("p"),F.innerHTML=K,S=i(),b(k.$$.fragment),ee=i(),b(L.$$.fragment),this.h()},l(o){y(e.$$.fragment,o),m=d(o),t=g(o,"DIV",{class:!0});var u=de(t);y(n.$$.fragment,u),f=d(u),s=g(u,"P",{"data-svelte-h":!0}),v(s)!=="svelte-1egd8ne"&&(s.innerHTML=N),ne=d(u),x=g(u,"DIV",{class:!0});var J=de(x);y(Q.$$.fragment,J),ae=d(J),B=g(J,"P",{"data-svelte-h":!0}),v(B)!=="svelte-1qebby4"&&(B.innerHTML=ye),oe=d(J),y(Z.$$.fragment,J),me=d(J),y(G.$$.fragment,J),J.forEach(l),u.forEach(l),P=d(o),y(E.$$.fragment,o),O=d(o),_=g(o,"DIV",{class:!0});var I=de(_);y(X.$$.fragment,I),re=d(I),z=g(I,"P",{"data-svelte-h":!0}),v(z)!=="svelte-d6857j"&&(z.textContent=$e),le=d(I),W=g(I,"P",{"data-svelte-h":!0}),v(W)!=="svelte-k94fih"&&(W.innerHTML=_e),Y=d(I),R=g(I,"DIV",{class:!0});var U=de(R);y(V.$$.fragment,U),A=d(U),F=g(U,"P",{"data-svelte-h":!0}),v(F)!=="svelte-1gte4wq"&&(F.innerHTML=K),S=d(U),y(k.$$.fragment,U),ee=d(U),y(L.$$.fragment,U),U.forEach(l),I.forEach(l),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(_,"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){$(e,o,u),p(o,m,u),p(o,t,u),$(n,t,null),c(t,f),c(t,s),c(t,ne),c(t,x),$(Q,x,null),c(x,ae),c(x,B),c(x,oe),$(Z,x,null),c(x,me),$(G,x,null),p(o,P,u),$(E,o,u),p(o,O,u),p(o,_,u),$(X,_,null),c(_,re),c(_,z),c(_,le),c(_,W),c(_,Y),c(_,R),$(V,R,null),c(R,A),c(R,F),c(R,S),$(k,R,null),c(R,ee),$(L,R,null),q=!0},p(o,u){const J={};u&2&&(J.$$scope={dirty:u,ctx:o}),Z.$set(J);const I={};u&2&&(I.$$scope={dirty:u,ctx:o}),G.$set(I);const U={};u&2&&(U.$$scope={dirty:u,ctx:o}),k.$set(U);const H={};u&2&&(H.$$scope={dirty:u,ctx:o}),L.$set(H)},i(o){q||(w(e.$$.fragment,o),w(n.$$.fragment,o),w(Q.$$.fragment,o),w(Z.$$.fragment,o),w(G.$$.fragment,o),w(E.$$.fragment,o),w(X.$$.fragment,o),w(V.$$.fragment,o),w(k.$$.fragment,o),w(L.$$.fragment,o),q=!0)},o(o){M(e.$$.fragment,o),M(n.$$.fragment,o),M(Q.$$.fragment,o),M(Z.$$.fragment,o),M(G.$$.fragment,o),M(E.$$.fragment,o),M(X.$$.fragment,o),M(V.$$.fragment,o),M(k.$$.fragment,o),M(L.$$.fragment,o),q=!1},d(o){o&&(l(m),l(t),l(P),l(O),l(_)),T(e,o),T(n),T(Q),T(Z),T(G),T(E,o),T(X),T(V),T(k),T(L)}}}function st(C){let e,m;return e=new Ue({props:{$$slots:{default:[tt]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,n){$(e,t,n),m=!0},p(t,n){const f={};n&2&&(f.$$scope={dirty:n,ctx:t}),e.$set(f)},i(t){m||(w(e.$$.fragment,t),m=!0)},o(t){M(e.$$.fragment,t),m=!1},d(t){T(e,t)}}}function nt(C){let e,m=`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=h("p"),e.innerHTML=m},l(t){e=g(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,n){p(t,e,n)},p:ue,d(t){t&&l(e)}}}function at(C){let e,m="Examples:",t,n,f;return n=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=h("p"),e.textContent=m,t=i(),b(n.$$.fragment)},l(s){e=g(s,"P",{"data-svelte-h":!0}),v(e)!=="svelte-kvfsh7"&&(e.textContent=m),t=d(s),y(n.$$.fragment,s)},m(s,N){p(s,e,N),p(s,t,N),$(n,s,N),f=!0},p:ue,i(s){f||(w(n.$$.fragment,s),f=!0)},o(s){M(n.$$.fragment,s),f=!1},d(s){s&&(l(e),l(t)),T(n,s)}}}function ot(C){let e,m=`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=h("p"),e.innerHTML=m},l(t){e=g(t,"P",{"data-svelte-h":!0}),v(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,n){p(t,e,n)},p:ue,d(t){t&&l(e)}}}function rt(C){let e,m="Example:",t,n,f;return n=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=h("p"),e.textContent=m,t=i(),b(n.$$.fragment)},l(s){e=g(s,"P",{"data-svelte-h":!0}),v(e)!=="svelte-11lpom8"&&(e.textContent=m),t=d(s),y(n.$$.fragment,s)},m(s,N){p(s,e,N),p(s,t,N),$(n,s,N),f=!0},p:ue,i(s){f||(w(n.$$.fragment,s),f=!0)},o(s){M(n.$$.fragment,s),f=!1},d(s){s&&(l(e),l(t)),T(n,s)}}}function lt(C){let e,m,t,n,f,s,N="The bare ResNet model outputting raw features without any specific head on top.",ne,x,Q=`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,B,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:",G,P,E='<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>',O,_,X,re,z,$e="The <code>FlaxResNetPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",le,W,_e,Y,R,V,A,F,K,S,k,ee=`ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`,L,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,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,H,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,D,Te,Ce,ie,Re="The <code>FlaxResNetPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",be,fe,Ne,he,a;return e=new ve({props:{title:"FlaxResNetModel",local:"transformers.FlaxResNetModel",headingTag:"h2"}}),n=new ge({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#L580"}}),X=new ge({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:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = 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:[nt]},$$scope:{ctx:C}}}),Y=new Fe({props:{anchor:"transformers.FlaxResNetModel.__call__.example",$$slots:{default:[at]},$$scope:{ctx:C}}}),V=new ve({props:{title:"FlaxResNetForImageClassification",local:"transformers.FlaxResNetForImageClassification",headingTag:"h2"}}),K=new ge({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#L667"}}),Te=new ge({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:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = 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:[ot]},$$scope:{ctx:C}}}),he=new Fe({props:{anchor:"transformers.FlaxResNetForImageClassification.__call__.example",$$slots:{default:[rt]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment),m=i(),t=h("div"),b(n.$$.fragment),f=i(),s=h("p"),s.textContent=N,ne=i(),x=h("p"),x.innerHTML=Q,ae=i(),B=h("p"),B.innerHTML=ye,oe=i(),Z=h("p"),Z.textContent=me,G=i(),P=h("ul"),P.innerHTML=E,O=i(),_=h("div"),b(X.$$.fragment),re=i(),z=h("p"),z.innerHTML=$e,le=i(),b(W.$$.fragment),_e=i(),b(Y.$$.fragment),R=i(),b(V.$$.fragment),A=i(),F=h("div"),b(K.$$.fragment),S=i(),k=h("p"),k.textContent=ee,L=i(),q=h("p"),q.innerHTML=o,u=i(),J=h("p"),J.innerHTML=I,U=i(),H=h("p"),H.textContent=Me,je=i(),pe=h("ul"),pe.innerHTML=Ze,xe=i(),D=h("div"),b(Te.$$.fragment),Ce=i(),ie=h("p"),ie.innerHTML=Re,be=i(),b(fe.$$.fragment),Ne=i(),b(he.$$.fragment),this.h()},l(r){y(e.$$.fragment,r),m=d(r),t=g(r,"DIV",{class:!0});var j=de(t);y(n.$$.fragment,j),f=d(j),s=g(j,"P",{"data-svelte-h":!0}),v(s)!=="svelte-1eswup9"&&(s.textContent=N),ne=d(j),x=g(j,"P",{"data-svelte-h":!0}),v(x)!=="svelte-3daxed"&&(x.innerHTML=Q),ae=d(j),B=g(j,"P",{"data-svelte-h":!0}),v(B)!=="svelte-10nfsf3"&&(B.innerHTML=ye),oe=d(j),Z=g(j,"P",{"data-svelte-h":!0}),v(Z)!=="svelte-1pplc4a"&&(Z.textContent=me),G=d(j),P=g(j,"UL",{"data-svelte-h":!0}),v(P)!=="svelte-1w7z84m"&&(P.innerHTML=E),O=d(j),_=g(j,"DIV",{class:!0});var ce=de(_);y(X.$$.fragment,ce),re=d(ce),z=g(ce,"P",{"data-svelte-h":!0}),v(z)!=="svelte-1cjaw40"&&(z.innerHTML=$e),le=d(ce),y(W.$$.fragment,ce),_e=d(ce),y(Y.$$.fragment,ce),ce.forEach(l),j.forEach(l),R=d(r),y(V.$$.fragment,r),A=d(r),F=g(r,"DIV",{class:!0});var te=de(F);y(K.$$.fragment,te),S=d(te),k=g(te,"P",{"data-svelte-h":!0}),v(k)!=="svelte-d6857j"&&(k.textContent=ee),L=d(te),q=g(te,"P",{"data-svelte-h":!0}),v(q)!=="svelte-3daxed"&&(q.innerHTML=o),u=d(te),J=g(te,"P",{"data-svelte-h":!0}),v(J)!=="svelte-10nfsf3"&&(J.innerHTML=I),U=d(te),H=g(te,"P",{"data-svelte-h":!0}),v(H)!=="svelte-1pplc4a"&&(H.textContent=Me),je=d(te),pe=g(te,"UL",{"data-svelte-h":!0}),v(pe)!=="svelte-1w7z84m"&&(pe.innerHTML=Ze),xe=d(te),D=g(te,"DIV",{class:!0});var we=de(D);y(Te.$$.fragment,we),Ce=d(we),ie=g(we,"P",{"data-svelte-h":!0}),v(ie)!=="svelte-1cjaw40"&&(ie.innerHTML=Re),be=d(we),y(fe.$$.fragment,we),Ne=d(we),y(he.$$.fragment,we),we.forEach(l),te.forEach(l),this.h()},h(){se(_,"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(D,"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(r,j){$(e,r,j),p(r,m,j),p(r,t,j),$(n,t,null),c(t,f),c(t,s),c(t,ne),c(t,x),c(t,ae),c(t,B),c(t,oe),c(t,Z),c(t,G),c(t,P),c(t,O),c(t,_),$(X,_,null),c(_,re),c(_,z),c(_,le),$(W,_,null),c(_,_e),$(Y,_,null),p(r,R,j),$(V,r,j),p(r,A,j),p(r,F,j),$(K,F,null),c(F,S),c(F,k),c(F,L),c(F,q),c(F,u),c(F,J),c(F,U),c(F,H),c(F,je),c(F,pe),c(F,xe),c(F,D),$(Te,D,null),c(D,Ce),c(D,ie),c(D,be),$(fe,D,null),c(D,Ne),$(he,D,null),a=!0},p(r,j){const ce={};j&2&&(ce.$$scope={dirty:j,ctx:r}),W.$set(ce);const te={};j&2&&(te.$$scope={dirty:j,ctx:r}),Y.$set(te);const we={};j&2&&(we.$$scope={dirty:j,ctx:r}),fe.$set(we);const We={};j&2&&(We.$$scope={dirty:j,ctx:r}),he.$set(We)},i(r){a||(w(e.$$.fragment,r),w(n.$$.fragment,r),w(X.$$.fragment,r),w(W.$$.fragment,r),w(Y.$$.fragment,r),w(V.$$.fragment,r),w(K.$$.fragment,r),w(Te.$$.fragment,r),w(fe.$$.fragment,r),w(he.$$.fragment,r),a=!0)},o(r){M(e.$$.fragment,r),M(n.$$.fragment,r),M(X.$$.fragment,r),M(W.$$.fragment,r),M(Y.$$.fragment,r),M(V.$$.fragment,r),M(K.$$.fragment,r),M(Te.$$.fragment,r),M(fe.$$.fragment,r),M(he.$$.fragment,r),a=!1},d(r){r&&(l(m),l(t),l(R),l(A),l(F)),T(e,r),T(n),T(X),T(W),T(Y),T(V,r),T(K),T(Te),T(fe),T(he)}}}function it(C){let e,m;return e=new Ue({props:{$$slots:{default:[lt]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,n){$(e,t,n),m=!0},p(t,n){const f={};n&2&&(f.$$scope={dirty:n,ctx:t}),e.$set(f)},i(t){m||(w(e.$$.fragment,t),m=!0)},o(t){M(e.$$.fragment,t),m=!1},d(t){T(e,t)}}}function dt(C){let e,m,t,n,f,s,N,ne,x,Q='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,B,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:",G,P,E=`<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>`,O,_,X='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,z,$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>.',Y,R,V,A,F="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with ResNet.",K,S,k,ee,L='<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>',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,I,U,H,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,D,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,Ne,he;return f=new ve({props:{title:"ResNet",local:"resnet",headingTag:"h1"}}),N=new ve({props:{title:"Overview",local:"overview",headingTag:"h2"}}),R=new ve({props:{title:"Resources",local:"resources",headingTag:"h2"}}),S=new Pe({props:{pipeline:"image-classification"}}),I=new ve({props:{title:"ResNetConfig",local:"transformers.ResNetConfig",headingTag:"h2"}}),Me=new ge({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.`,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.`,name:"out_indices"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/resnet/configuration_resnet.py#L35"}}),ie=new Fe({props:{anchor:"transformers.ResNetConfig.example",$$slots:{default:[Le]},$$scope:{ctx:C}}}),be=new He({props:{pytorch:!0,tensorflow:!0,jax:!0,$$slots:{jax:[it],tensorflow:[st],pytorch:[Se]},$$scope:{ctx:C}}}),{c(){e=h("meta"),m=i(),t=h("p"),n=i(),b(f.$$.fragment),s=i(),b(N.$$.fragment),ne=i(),x=h("p"),x.innerHTML=Q,ae=i(),B=h("p"),B.textContent=ye,oe=i(),Z=h("p"),Z.textContent=me,G=i(),P=h("p"),P.innerHTML=E,O=i(),_=h("p"),_.innerHTML=X,re=i(),z=h("img"),le=i(),W=h("p"),W.innerHTML=_e,Y=i(),b(R.$$.fragment),V=i(),A=h("p"),A.textContent=F,K=i(),b(S.$$.fragment),k=i(),ee=h("ul"),ee.innerHTML=L,q=i(),o=h("p"),o.textContent=u,J=i(),b(I.$$.fragment),U=i(),H=h("div"),b(Me.$$.fragment),je=i(),pe=h("p"),pe.innerHTML=Ze,xe=i(),D=h("p"),D.innerHTML=Te,Ce=i(),b(ie.$$.fragment),Re=i(),b(be.$$.fragment),fe=i(),Ne=h("p"),this.h()},l(a){const r=Xe("svelte-u9bgzb",document.head);e=g(r,"META",{name:!0,content:!0}),r.forEach(l),m=d(a),t=g(a,"P",{}),de(t).forEach(l),n=d(a),y(f.$$.fragment,a),s=d(a),y(N.$$.fragment,a),ne=d(a),x=g(a,"P",{"data-svelte-h":!0}),v(x)!=="svelte-ybpvez"&&(x.innerHTML=Q),ae=d(a),B=g(a,"P",{"data-svelte-h":!0}),v(B)!=="svelte-1khrbjk"&&(B.textContent=ye),oe=d(a),Z=g(a,"P",{"data-svelte-h":!0}),v(Z)!=="svelte-vfdo9a"&&(Z.textContent=me),G=d(a),P=g(a,"P",{"data-svelte-h":!0}),v(P)!=="svelte-xwc7kf"&&(P.innerHTML=E),O=d(a),_=g(a,"P",{"data-svelte-h":!0}),v(_)!=="svelte-17i7uin"&&(_.innerHTML=X),re=d(a),z=g(a,"IMG",{width:!0,src:!0}),le=d(a),W=g(a,"P",{"data-svelte-h":!0}),v(W)!=="svelte-1evl8l5"&&(W.innerHTML=_e),Y=d(a),y(R.$$.fragment,a),V=d(a),A=g(a,"P",{"data-svelte-h":!0}),v(A)!=="svelte-1ageb22"&&(A.textContent=F),K=d(a),y(S.$$.fragment,a),k=d(a),ee=g(a,"UL",{"data-svelte-h":!0}),v(ee)!=="svelte-1emh1d0"&&(ee.innerHTML=L),q=d(a),o=g(a,"P",{"data-svelte-h":!0}),v(o)!=="svelte-1xesile"&&(o.textContent=u),J=d(a),y(I.$$.fragment,a),U=d(a),H=g(a,"DIV",{class:!0});var j=de(H);y(Me.$$.fragment,j),je=d(j),pe=g(j,"P",{"data-svelte-h":!0}),v(pe)!=="svelte-yj39lo"&&(pe.innerHTML=Ze),xe=d(j),D=g(j,"P",{"data-svelte-h":!0}),v(D)!=="svelte-o55m63"&&(D.innerHTML=Te),Ce=d(j),y(ie.$$.fragment,j),j.forEach(l),Re=d(a),y(be.$$.fragment,a),fe=d(a),Ne=g(a,"P",{}),de(Ne).forEach(l),this.h()},h(){se(e,"name","hf:doc:metadata"),se(e,"content",ct),se(z,"width","600"),Be(z.src,$e="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/resnet_architecture.png")||se(z,"src",$e),se(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(a,r){c(document.head,e),p(a,m,r),p(a,t,r),p(a,n,r),$(f,a,r),p(a,s,r),$(N,a,r),p(a,ne,r),p(a,x,r),p(a,ae,r),p(a,B,r),p(a,oe,r),p(a,Z,r),p(a,G,r),p(a,P,r),p(a,O,r),p(a,_,r),p(a,re,r),p(a,z,r),p(a,le,r),p(a,W,r),p(a,Y,r),$(R,a,r),p(a,V,r),p(a,A,r),p(a,K,r),$(S,a,r),p(a,k,r),p(a,ee,r),p(a,q,r),p(a,o,r),p(a,J,r),$(I,a,r),p(a,U,r),p(a,H,r),$(Me,H,null),c(H,je),c(H,pe),c(H,xe),c(H,D),c(H,Ce),$(ie,H,null),p(a,Re,r),$(be,a,r),p(a,fe,r),p(a,Ne,r),he=!0},p(a,[r]){const j={};r&2&&(j.$$scope={dirty:r,ctx:a}),ie.$set(j);const ce={};r&2&&(ce.$$scope={dirty:r,ctx:a}),be.$set(ce)},i(a){he||(w(f.$$.fragment,a),w(N.$$.fragment,a),w(R.$$.fragment,a),w(S.$$.fragment,a),w(I.$$.fragment,a),w(Me.$$.fragment,a),w(ie.$$.fragment,a),w(be.$$.fragment,a),he=!0)},o(a){M(f.$$.fragment,a),M(N.$$.fragment,a),M(R.$$.fragment,a),M(S.$$.fragment,a),M(I.$$.fragment,a),M(Me.$$.fragment,a),M(ie.$$.fragment,a),M(be.$$.fragment,a),he=!1},d(a){a&&(l(m),l(t),l(n),l(s),l(ne),l(x),l(ae),l(B),l(oe),l(Z),l(G),l(P),l(O),l(_),l(re),l(z),l(le),l(W),l(Y),l(V),l(A),l(K),l(k),l(ee),l(q),l(o),l(J),l(U),l(H),l(Re),l(fe),l(Ne)),l(e),T(f,a),T(N,a),T(R,a),T(S,a),T(I,a),T(Me),T(ie),T(be,a)}}}const ct='{"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 mt(C){return ze(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wt extends Ve{constructor(e){super(),Ge(this,e,mt,dt,ke,{})}}export{wt as component};
