import{s as ke,f as Be,o as ze,n as ge}from"../chunks/scheduler.25b97de1.js";import{S as Ve,i as Ge,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 p,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 Fe}from"../chunks/CodeBlock.e6cd0d95.js";import{F as He,M as Ue}from"../chunks/Markdown.7217f838.js";import{E as Je}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,o,m;return o=new Fe({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(o.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(o.$$.fragment,n)},m(n,j){p(n,e,j),p(n,t,j),$(o,n,j),m=!0},p:ge,i(n){m||(w(o.$$.fragment,n),m=!0)},o(n){M(o.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(o,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,o){p(t,e,o)},p:ge,d(t){t&&r(e)}}}function Ye(C){let e,c="Example:",t,o,m;return o=new Fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFJlc05ldE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZyZXNuZXQtNTAlMjIpJTBBbW9kZWwlMjAlM0QlMjBSZXNOZXRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGcmVzbmV0LTUwJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMGltYWdlX3Byb2Nlc3NvcihpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBbGlzdChsYXN0X2hpZGRlbl9zdGF0ZXMuc2hhcGUp",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>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;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(o.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(o.$$.fragment,n)},m(n,j){p(n,e,j),p(n,t,j),$(o,n,j),m=!0},p:ge,i(n){m||(w(o.$$.fragment,n),m=!0)},o(n){M(o.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(o,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,o){p(t,e,o)},p:ge,d(t){t&&r(e)}}}function Ae(C){let e,c="Example:",t,o,m;return o=new Fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFJlc05ldEZvckltYWdlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaHVnZ2luZ2ZhY2UlMkZjYXRzLWltYWdlJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWltYWdlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlNUIlMjJpbWFnZSUyMiU1RCU1QjAlNUQlMEElMEFpbWFnZV9wcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnJlc25ldC01MCUyMiklMEFtb2RlbCUyMCUzRCUyMFJlc05ldEZvckltYWdlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnJlc25ldC01MCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpLml0ZW0oKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",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>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;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(o.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(o.$$.fragment,n)},m(n,j){p(n,e,j),p(n,t,j),$(o,n,j),m=!0},p:ge,i(n){m||(w(o.$$.fragment,n),m=!0)},o(n){M(o.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(o,n)}}}function Se(C){let e,c,t,o,m,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,oe,z,ye='The <a href="/docs/transformers/pr_31098/en/model_doc/resnet#transformers.ResNetModel">ResNetModel</a> forward method, overrides the <code>__call__</code> special method.',ae,Z,pe,X,L,Y,K,v,H,re,V,$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,G,S,J,ee='The <a href="/docs/transformers/pr_31098/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"}}),o=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/pr_31098/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/pr_31098/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/vr_31098/src/transformers/models/resnet/modeling_resnet.py#L315"}}),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/pr_31098/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_31098/en/model_doc/layoutlmv3#transformers.LayoutLMv3FeatureExtractor.__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/pr_31098/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/models/resnet/modeling_resnet.py#L329",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/pr_31098/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 Je({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/pr_31098/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/pr_31098/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/vr_31098/src/transformers/models/resnet/modeling_resnet.py#L365"}}),G=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/pr_31098/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_31098/en/model_doc/layoutlmv3#transformers.LayoutLMv3FeatureExtractor.__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/pr_31098/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/vr_31098/src/transformers/models/resnet/modeling_resnet.py#L385",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31098/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/pr_31098/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/pr_31098/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 Je({props:{anchor:"transformers.ResNetForImageClassification.forward.example",$$slots:{default:[Ae]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment),c=l(),t=f("div"),b(o.$$.fragment),m=l(),n=f("p"),n.innerHTML=j,ne=l(),x=f("div"),b(E.$$.fragment),oe=l(),z=f("p"),z.innerHTML=ye,ae=l(),b(Z.$$.fragment),pe=l(),b(X.$$.fragment),L=l(),b(Y.$$.fragment),K=l(),v=f("div"),b(H.$$.fragment),re=l(),V=f("p"),V.textContent=$e,le=l(),W=f("p"),W.innerHTML=_e,q=l(),R=f("div"),b(G.$$.fragment),S=l(),J=f("p"),J.innerHTML=ee,D=l(),b(k.$$.fragment),te=l(),b(Q.$$.fragment),this.h()},l(a){y(e.$$.fragment,a),c=i(a),t=h(a,"DIV",{class:!0});var g=de(t);y(o.$$.fragment,g),m=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 F=de(x);y(E.$$.fragment,F),oe=i(F),z=h(F,"P",{"data-svelte-h":!0}),N(z)!=="svelte-1dqsu23"&&(z.innerHTML=ye),ae=i(F),y(Z.$$.fragment,F),pe=i(F),y(X.$$.fragment,F),F.forEach(r),g.forEach(r),L=i(a),y(Y.$$.fragment,a),K=i(a),v=h(a,"DIV",{class:!0});var I=de(v);y(H.$$.fragment,I),re=i(I),V=h(I,"P",{"data-svelte-h":!0}),N(V)!=="svelte-d6857j"&&(V.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(G.$$.fragment,U),S=i(U),J=h(U,"P",{"data-svelte-h":!0}),N(J)!=="svelte-je3kzp"&&(J.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(a,g){$(e,a,g),p(a,c,g),p(a,t,g),$(o,t,null),d(t,m),d(t,n),d(t,ne),d(t,x),$(E,x,null),d(x,oe),d(x,z),d(x,ae),$(Z,x,null),d(x,pe),$(X,x,null),p(a,L,g),$(Y,a,g),p(a,K,g),p(a,v,g),$(H,v,null),d(v,re),d(v,V),d(v,le),d(v,W),d(v,q),d(v,R),$(G,R,null),d(R,S),d(R,J),d(R,D),$(k,R,null),d(R,te),$(Q,R,null),A=!0},p(a,g){const F={};g&2&&(F.$$scope={dirty:g,ctx:a}),Z.$set(F);const I={};g&2&&(I.$$scope={dirty:g,ctx:a}),X.$set(I);const U={};g&2&&(U.$$scope={dirty:g,ctx:a}),k.$set(U);const P={};g&2&&(P.$$scope={dirty:g,ctx:a}),Q.$set(P)},i(a){A||(w(e.$$.fragment,a),w(o.$$.fragment,a),w(E.$$.fragment,a),w(Z.$$.fragment,a),w(X.$$.fragment,a),w(Y.$$.fragment,a),w(H.$$.fragment,a),w(G.$$.fragment,a),w(k.$$.fragment,a),w(Q.$$.fragment,a),A=!0)},o(a){M(e.$$.fragment,a),M(o.$$.fragment,a),M(E.$$.fragment,a),M(Z.$$.fragment,a),M(X.$$.fragment,a),M(Y.$$.fragment,a),M(H.$$.fragment,a),M(G.$$.fragment,a),M(k.$$.fragment,a),M(Q.$$.fragment,a),A=!1},d(a){a&&(r(c),r(t),r(L),r(K),r(v)),T(e,a),T(o),T(E),T(Z),T(X),T(Y,a),T(H),T(G),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,o){$(e,t,o),c=!0},p(t,o){const m={};o&2&&(m.$$scope={dirty:o,ctx:t}),e.$set(m)},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,o){p(t,e,o)},p:ge,d(t){t&&r(e)}}}function Ke(C){let e,c="Example:",t,o,m;return o=new Fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGUmVzTmV0TW9kZWwlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmh1Z2dpbmdmYWNlJTJGY2F0cy1pbWFnZSUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFpbWFnZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0ZXN0JTIyJTVEJTVCJTIyaW1hZ2UlMjIlNUQlNUIwJTVEJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZyZXNuZXQtNTAlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlJlc05ldE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZyZXNuZXQtNTAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGVzLnNoYXBlKQ==",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>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;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(o.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(o.$$.fragment,n)},m(n,j){p(n,e,j),p(n,t,j),$(o,n,j),m=!0},p:ge,i(n){m||(w(o.$$.fragment,n),m=!0)},o(n){M(o.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(o,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,o){p(t,e,o)},p:ge,d(t){t&&r(e)}}}function tt(C){let e,c="Example:",t,o,m;return o=new Fe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFRGUmVzTmV0Rm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJodWdnaW5nZmFjZSUyRmNhdHMtaW1hZ2UlMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBaW1hZ2UlMjAlM0QlMjBkYXRhc2V0JTVCJTIydGVzdCUyMiU1RCU1QiUyMmltYWdlJTIyJTVEJTVCMCU1RCUwQSUwQWltYWdlX3Byb2Nlc3NvciUyMCUzRCUyMEF1dG9JbWFnZVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGcmVzbmV0LTUwJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZSZXNOZXRGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZyZXNuZXQtNTAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwaW1hZ2VfcHJvY2Vzc29yKGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwbW9kZWwlMjBwcmVkaWN0cyUyMG9uZSUyMG9mJTIwdGhlJTIwMTAwMCUyMEltYWdlTmV0JTIwY2xhc3NlcyUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpKSUwQXByaW50KG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9sYWJlbCU1RCk=",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>, trust_remote_code=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>image = dataset[<span class="hljs-string">&quot;test&quot;</span>][<span class="hljs-string">&quot;image&quot;</span>][<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;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(o.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(o.$$.fragment,n)},m(n,j){p(n,e,j),p(n,t,j),$(o,n,j),m=!0},p:ge,i(n){m||(w(o.$$.fragment,n),m=!0)},o(n){M(o.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(o,n)}}}function st(C){let e,c,t,o,m,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,oe,z,ye='The <a href="/docs/transformers/pr_31098/en/model_doc/resnet#transformers.TFResNetModel">TFResNetModel</a> forward method, overrides the <code>__call__</code> special method.',ae,Z,pe,X,L,Y,K,v,H,re,V,$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,G,S,J,ee='The <a href="/docs/transformers/pr_31098/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"}}),o=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/pr_31098/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/pr_31098/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/vr_31098/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/pr_31098/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_31098/en/model_doc/layoutlmv3#transformers.LayoutLMv3FeatureExtractor.__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/pr_31098/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/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/pr_31098/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 Je({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/pr_31098/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/pr_31098/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/vr_31098/src/transformers/models/resnet/modeling_tf_resnet.py#L520"}}),G=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/pr_31098/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/pr_31098/en/model_doc/layoutlmv3#transformers.LayoutLMv3FeatureExtractor.__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/pr_31098/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/vr_31098/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/pr_31098/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 Je({props:{anchor:"transformers.TFResNetForImageClassification.call.example",$$slots:{default:[tt]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment),c=l(),t=f("div"),b(o.$$.fragment),m=l(),n=f("p"),n.innerHTML=j,ne=l(),x=f("div"),b(E.$$.fragment),oe=l(),z=f("p"),z.innerHTML=ye,ae=l(),b(Z.$$.fragment),pe=l(),b(X.$$.fragment),L=l(),b(Y.$$.fragment),K=l(),v=f("div"),b(H.$$.fragment),re=l(),V=f("p"),V.textContent=$e,le=l(),W=f("p"),W.innerHTML=_e,q=l(),R=f("div"),b(G.$$.fragment),S=l(),J=f("p"),J.innerHTML=ee,D=l(),b(k.$$.fragment),te=l(),b(Q.$$.fragment),this.h()},l(a){y(e.$$.fragment,a),c=i(a),t=h(a,"DIV",{class:!0});var g=de(t);y(o.$$.fragment,g),m=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 F=de(x);y(E.$$.fragment,F),oe=i(F),z=h(F,"P",{"data-svelte-h":!0}),N(z)!=="svelte-29jnd3"&&(z.innerHTML=ye),ae=i(F),y(Z.$$.fragment,F),pe=i(F),y(X.$$.fragment,F),F.forEach(r),g.forEach(r),L=i(a),y(Y.$$.fragment,a),K=i(a),v=h(a,"DIV",{class:!0});var I=de(v);y(H.$$.fragment,I),re=i(I),V=h(I,"P",{"data-svelte-h":!0}),N(V)!=="svelte-d6857j"&&(V.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(G.$$.fragment,U),S=i(U),J=h(U,"P",{"data-svelte-h":!0}),N(J)!=="svelte-19ye4ut"&&(J.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(a,g){$(e,a,g),p(a,c,g),p(a,t,g),$(o,t,null),d(t,m),d(t,n),d(t,ne),d(t,x),$(E,x,null),d(x,oe),d(x,z),d(x,ae),$(Z,x,null),d(x,pe),$(X,x,null),p(a,L,g),$(Y,a,g),p(a,K,g),p(a,v,g),$(H,v,null),d(v,re),d(v,V),d(v,le),d(v,W),d(v,q),d(v,R),$(G,R,null),d(R,S),d(R,J),d(R,D),$(k,R,null),d(R,te),$(Q,R,null),A=!0},p(a,g){const F={};g&2&&(F.$$scope={dirty:g,ctx:a}),Z.$set(F);const I={};g&2&&(I.$$scope={dirty:g,ctx:a}),X.$set(I);const U={};g&2&&(U.$$scope={dirty:g,ctx:a}),k.$set(U);const P={};g&2&&(P.$$scope={dirty:g,ctx:a}),Q.$set(P)},i(a){A||(w(e.$$.fragment,a),w(o.$$.fragment,a),w(E.$$.fragment,a),w(Z.$$.fragment,a),w(X.$$.fragment,a),w(Y.$$.fragment,a),w(H.$$.fragment,a),w(G.$$.fragment,a),w(k.$$.fragment,a),w(Q.$$.fragment,a),A=!0)},o(a){M(e.$$.fragment,a),M(o.$$.fragment,a),M(E.$$.fragment,a),M(Z.$$.fragment,a),M(X.$$.fragment,a),M(Y.$$.fragment,a),M(H.$$.fragment,a),M(G.$$.fragment,a),M(k.$$.fragment,a),M(Q.$$.fragment,a),A=!1},d(a){a&&(r(c),r(t),r(L),r(K),r(v)),T(e,a),T(o),T(E),T(Z),T(X),T(Y,a),T(H),T(G),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,o){$(e,t,o),c=!0},p(t,o){const m={};o&2&&(m.$$scope={dirty:o,ctx:t}),e.$set(m)},i(t){c||(w(e.$$.fragment,t),c=!0)},o(t){M(e.$$.fragment,t),c=!1},d(t){T(e,t)}}}function ot(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,o){p(t,e,o)},p:ge,d(t){t&&r(e)}}}function at(C){let e,c="Examples:",t,o,m;return o=new Fe({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(o.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-kvfsh7"&&(e.textContent=c),t=i(n),y(o.$$.fragment,n)},m(n,j){p(n,e,j),p(n,t,j),$(o,n,j),m=!0},p:ge,i(n){m||(w(o.$$.fragment,n),m=!0)},o(n){M(o.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(o,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,o){p(t,e,o)},p:ge,d(t){t&&r(e)}}}function lt(C){let e,c="Example:",t,o,m;return o=new Fe({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(o.$$.fragment)},l(n){e=h(n,"P",{"data-svelte-h":!0}),N(e)!=="svelte-11lpom8"&&(e.textContent=c),t=i(n),y(o.$$.fragment,n)},m(n,j){p(n,e,j),p(n,t,j),$(o,n,j),m=!0},p:ge,i(n){m||(w(o.$$.fragment,n),m=!0)},o(n){M(o.$$.fragment,n),m=!1},d(n){n&&(r(e),r(t)),T(o,n)}}}function it(C){let e,c,t,o,m,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/pr_31098/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)`,oe,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.`,ae,Z,pe="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,V,$e="The <code>FlaxResNetPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",le,W,_e,q,R,G,S,J,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,a=`This model inherits from <a href="/docs/transformers/pr_31098/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,F,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,me,Ze='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',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"}}),o=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/pr_31098/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/pr_31098/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/pr_31098/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_31098/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/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/vr_31098/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:[ot]},$$scope:{ctx:C}}}),q=new Je({props:{anchor:"transformers.FlaxResNetModel.__call__.example",$$slots:{default:[at]},$$scope:{ctx:C}}}),G=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/pr_31098/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/pr_31098/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/pr_31098/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/pr_31098/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/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/vr_31098/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 Je({props:{anchor:"transformers.FlaxResNetForImageClassification.__call__.example",$$slots:{default:[lt]},$$scope:{ctx:C}}}),{c(){b(e.$$.fragment),c=l(),t=f("div"),b(o.$$.fragment),m=l(),n=f("p"),n.textContent=j,ne=l(),x=f("p"),x.innerHTML=E,oe=l(),z=f("p"),z.innerHTML=ye,ae=l(),Z=f("p"),Z.textContent=pe,X=l(),L=f("ul"),L.innerHTML=Y,K=l(),v=f("div"),b(H.$$.fragment),re=l(),V=f("p"),V.innerHTML=$e,le=l(),b(W.$$.fragment),_e=l(),b(q.$$.fragment),R=l(),b(G.$$.fragment),S=l(),J=f("div"),b(ee.$$.fragment),D=l(),k=f("p"),k.textContent=te,Q=l(),A=f("p"),A.innerHTML=a,g=l(),F=f("p"),F.innerHTML=I,U=l(),P=f("p"),P.textContent=Me,je=l(),me=f("ul"),me.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(o.$$.fragment,s),m=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-xp77ds"&&(x.innerHTML=E),oe=i(s),z=h(s,"P",{"data-svelte-h":!0}),N(z)!=="svelte-10nfsf3"&&(z.innerHTML=ye),ae=i(s),Z=h(s,"P",{"data-svelte-h":!0}),N(Z)!=="svelte-1pplc4a"&&(Z.textContent=pe),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),V=h(u,"P",{"data-svelte-h":!0}),N(V)!=="svelte-1cjaw40"&&(V.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(G.$$.fragment,_),S=i(_),J=h(_,"DIV",{class:!0});var B=de(J);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-xp77ds"&&(A.innerHTML=a),g=i(B),F=h(B,"P",{"data-svelte-h":!0}),N(F)!=="svelte-10nfsf3"&&(F.innerHTML=I),U=i(B),P=h(B,"P",{"data-svelte-h":!0}),N(P)!=="svelte-1pplc4a"&&(P.textContent=Me),je=i(B),me=h(B,"UL",{"data-svelte-h":!0}),N(me)!=="svelte-1w7z84m"&&(me.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(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(_,s){$(e,_,s),p(_,c,s),p(_,t,s),$(o,t,null),d(t,m),d(t,n),d(t,ne),d(t,x),d(t,oe),d(t,z),d(t,ae),d(t,Z),d(t,X),d(t,L),d(t,K),d(t,v),$(H,v,null),d(v,re),d(v,V),d(v,le),$(W,v,null),d(v,_e),$(q,v,null),p(_,R,s),$(G,_,s),p(_,S,s),p(_,J,s),$(ee,J,null),d(J,D),d(J,k),d(J,Q),d(J,A),d(J,g),d(J,F),d(J,U),d(J,P),d(J,je),d(J,me),d(J,xe),d(J,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(o.$$.fragment,_),w(H.$$.fragment,_),w(W.$$.fragment,_),w(q.$$.fragment,_),w(G.$$.fragment,_),w(ee.$$.fragment,_),w(Te.$$.fragment,_),w(fe.$$.fragment,_),w(he.$$.fragment,_),ve=!0)},o(_){M(e.$$.fragment,_),M(o.$$.fragment,_),M(H.$$.fragment,_),M(W.$$.fragment,_),M(q.$$.fragment,_),M(G.$$.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(J)),T(e,_),T(o),T(H),T(W),T(q),T(G,_),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,o){$(e,t,o),c=!0},p(t,o){const m={};o&2&&(m.$$scope={dirty:o,ctx:t}),e.$set(m)},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,o,m,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”.',oe,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.",ae,Z,pe="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,V,$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,G,S,J="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/pr_31098/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,a,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.",F,I,U,P,Me,je,me,Ze=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_31098/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/pr_31098/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/pr_31098/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ce,ie,Re,be,fe,we,he,ve,_;return m=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/vr_31098/src/transformers/models/resnet/configuration_resnet.py#L31"}}),ie=new Je({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"),o=l(),b(m.$$.fragment),n=l(),b(j.$$.fragment),ne=l(),x=f("p"),x.innerHTML=E,oe=l(),z=f("p"),z.textContent=ye,ae=l(),Z=f("p"),Z.textContent=pe,X=l(),L=f("p"),L.innerHTML=Y,K=l(),v=f("p"),v.innerHTML=H,re=l(),V=f("img"),le=l(),W=f("p"),W.innerHTML=_e,q=l(),b(R.$$.fragment),G=l(),S=f("p"),S.textContent=J,ee=l(),b(D.$$.fragment),k=l(),te=f("ul"),te.innerHTML=Q,A=l(),a=f("p"),a.textContent=g,F=l(),b(I.$$.fragment),U=l(),P=f("div"),b(Me.$$.fragment),je=l(),me=f("p"),me.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),o=i(s),y(m.$$.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),oe=i(s),z=h(s,"P",{"data-svelte-h":!0}),N(z)!=="svelte-1khrbjk"&&(z.textContent=ye),ae=i(s),Z=h(s,"P",{"data-svelte-h":!0}),N(Z)!=="svelte-vfdo9a"&&(Z.textContent=pe),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),V=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),G=i(s),S=h(s,"P",{"data-svelte-h":!0}),N(S)!=="svelte-1ageb22"&&(S.textContent=J),ee=i(s),y(D.$$.fragment,s),k=i(s),te=h(s,"UL",{"data-svelte-h":!0}),N(te)!=="svelte-dkfdm7"&&(te.innerHTML=Q),A=i(s),a=h(s,"P",{"data-svelte-h":!0}),N(a)!=="svelte-1xesile"&&(a.textContent=g),F=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),me=h(B,"P",{"data-svelte-h":!0}),N(me)!=="svelte-8w5lov"&&(me.innerHTML=Ze),xe=i(B),O=h(B,"P",{"data-svelte-h":!0}),N(O)!=="svelte-1eopo2z"&&(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",pt),se(V,"width","600"),Be(V.src,$e="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/resnet_architecture.png")||se(V,"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),p(s,c,u),p(s,t,u),p(s,o,u),$(m,s,u),p(s,n,u),$(j,s,u),p(s,ne,u),p(s,x,u),p(s,oe,u),p(s,z,u),p(s,ae,u),p(s,Z,u),p(s,X,u),p(s,L,u),p(s,K,u),p(s,v,u),p(s,re,u),p(s,V,u),p(s,le,u),p(s,W,u),p(s,q,u),$(R,s,u),p(s,G,u),p(s,S,u),p(s,ee,u),$(D,s,u),p(s,k,u),p(s,te,u),p(s,A,u),p(s,a,u),p(s,F,u),$(I,s,u),p(s,U,u),p(s,P,u),$(Me,P,null),d(P,je),d(P,me),d(P,xe),d(P,O),d(P,Ce),$(ie,P,null),p(s,Re,u),$(be,s,u),p(s,fe,u),$(we,s,u),p(s,he,u),p(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(m.$$.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(m.$$.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(o),r(n),r(ne),r(x),r(oe),r(z),r(ae),r(Z),r(X),r(L),r(K),r(v),r(re),r(V),r(le),r(W),r(q),r(G),r(S),r(ee),r(k),r(te),r(A),r(a),r(F),r(U),r(P),r(Re),r(fe),r(he),r(ve)),r(e),T(m,s),T(j,s),T(R,s),T(D,s),T(I,s),T(Me),T(ie),T(be,s),T(we,s)}}}const pt='{"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 Mt extends Ve{constructor(e){super(),Ge(this,e,mt,ct,ke,{})}}export{Mt as component};
