import{S as Ar,i as Mr,s as qr,e as a,k as u,w as $,t as l,M as Or,c as r,d as s,m as g,a as n,x as b,h as i,b as c,N as Dr,G as e,g as _,y as N,q as y,o as T,B as R,v as Sr,L as es}from"../../chunks/vendor-hf-doc-builder.js";import{T as As}from"../../chunks/Tip-hf-doc-builder.js";import{D as Q}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ts}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ot}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Yt}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function zr(C){let d,w,h,p,v;return p=new ts({props:{code:`from transformers import ResNetConfig, ResNetModel

# Initializing a ResNet resnet-50 style configuration
configuration = ResNetConfig()

# Initializing a model (with random weights) from the resnet-50 style configuration
model = ResNetModel(configuration)

# Accessing the model configuration
configuration = model.config`,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`}}),{c(){d=a("p"),w=l("Example:"),h=u(),$(p.$$.fragment)},l(o){d=r(o,"P",{});var f=n(d);w=i(f,"Example:"),f.forEach(s),h=g(o),b(p.$$.fragment,o)},m(o,f){_(o,d,f),e(d,w),_(o,h,f),N(p,o,f),v=!0},p:es,i(o){v||(y(p.$$.fragment,o),v=!0)},o(o){T(p.$$.fragment,o),v=!1},d(o){o&&s(d),o&&s(h),R(p,o)}}}function Lr(C){let d,w,h,p,v;return{c(){d=a("p"),w=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),p=l("Module"),v=l(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(o){d=r(o,"P",{});var f=n(d);w=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(f,"CODE",{});var F=n(h);p=i(F,"Module"),F.forEach(s),v=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(s)},m(o,f){_(o,d,f),e(d,w),e(d,h),e(h,p),e(d,v)},d(o){o&&s(d)}}}function Wr(C){let d,w,h,p,v;return p=new ts({props:{code:`from transformers import AutoImageProcessor, ResNetModel
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = AutoImageProcessor.from_pretrained("microsoft/resnet-50")
model = ResNetModel.from_pretrained("microsoft/resnet-50")

inputs = feature_extractor(image, return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,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>feature_extractor = 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 = feature_extractor(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>]`}}),{c(){d=a("p"),w=l("Example:"),h=u(),$(p.$$.fragment)},l(o){d=r(o,"P",{});var f=n(d);w=i(f,"Example:"),f.forEach(s),h=g(o),b(p.$$.fragment,o)},m(o,f){_(o,d,f),e(d,w),_(o,h,f),N(p,o,f),v=!0},p:es,i(o){v||(y(p.$$.fragment,o),v=!0)},o(o){T(p.$$.fragment,o),v=!1},d(o){o&&s(d),o&&s(h),R(p,o)}}}function Vr(C){let d,w,h,p,v;return{c(){d=a("p"),w=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),p=l("Module"),v=l(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(o){d=r(o,"P",{});var f=n(d);w=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(f,"CODE",{});var F=n(h);p=i(F,"Module"),F.forEach(s),v=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(s)},m(o,f){_(o,d,f),e(d,w),e(d,h),e(h,p),e(d,v)},d(o){o&&s(d)}}}function Hr(C){let d,w,h,p,v;return p=new ts({props:{code:`from transformers import AutoImageProcessor, ResNetForImageClassification
import torch
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = AutoImageProcessor.from_pretrained("microsoft/resnet-50")
model = ResNetForImageClassification.from_pretrained("microsoft/resnet-50")

inputs = feature_extractor(image, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# model predicts one of the 1000 ImageNet classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])`,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>feature_extractor = 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 = feature_extractor(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`}}),{c(){d=a("p"),w=l("Example:"),h=u(),$(p.$$.fragment)},l(o){d=r(o,"P",{});var f=n(d);w=i(f,"Example:"),f.forEach(s),h=g(o),b(p.$$.fragment,o)},m(o,f){_(o,d,f),e(d,w),_(o,h,f),N(p,o,f),v=!0},p:es,i(o){v||(y(p.$$.fragment,o),v=!0)},o(o){T(p.$$.fragment,o),v=!1},d(o){o&&s(d),o&&s(h),R(p,o)}}}function Ur(C){let d,w,h,p,v;return{c(){d=a("p"),w=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),p=l("Module"),v=l(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(o){d=r(o,"P",{});var f=n(d);w=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(f,"CODE",{});var F=n(h);p=i(F,"Module"),F.forEach(s),v=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(s)},m(o,f){_(o,d,f),e(d,w),e(d,h),e(h,p),e(d,v)},d(o){o&&s(d)}}}function Br(C){let d,w,h,p,v;return p=new ts({props:{code:`from transformers import AutoImageProcessor, TFResNetModel
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = AutoImageProcessor.from_pretrained("microsoft/resnet-50")
model = TFResNetModel.from_pretrained("microsoft/resnet-50")

inputs = feature_extractor(image, return_tensors="tf")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,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>feature_extractor = 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 = feature_extractor(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>]`}}),{c(){d=a("p"),w=l("Example:"),h=u(),$(p.$$.fragment)},l(o){d=r(o,"P",{});var f=n(d);w=i(f,"Example:"),f.forEach(s),h=g(o),b(p.$$.fragment,o)},m(o,f){_(o,d,f),e(d,w),_(o,h,f),N(p,o,f),v=!0},p:es,i(o){v||(y(p.$$.fragment,o),v=!0)},o(o){T(p.$$.fragment,o),v=!1},d(o){o&&s(d),o&&s(h),R(p,o)}}}function Gr(C){let d,w,h,p,v;return{c(){d=a("p"),w=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),p=l("Module"),v=l(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(o){d=r(o,"P",{});var f=n(d);w=i(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(f,"CODE",{});var F=n(h);p=i(F,"Module"),F.forEach(s),v=i(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(s)},m(o,f){_(o,d,f),e(d,w),e(d,h),e(h,p),e(d,v)},d(o){o&&s(d)}}}function Jr(C){let d,w,h,p,v;return p=new ts({props:{code:`from transformers import AutoImageProcessor, TFResNetForImageClassification
import tensorflow as tf
from datasets import load_dataset

dataset = load_dataset("huggingface/cats-image")
image = dataset["test"]["image"][0]

feature_extractor = AutoImageProcessor.from_pretrained("microsoft/resnet-50")
model = TFResNetForImageClassification.from_pretrained("microsoft/resnet-50")

inputs = feature_extractor(image, return_tensors="tf")
logits = model(**inputs).logits

# model predicts one of the 1000 ImageNet classes
predicted_label = int(tf.math.argmax(logits, axis=-1))
print(model.config.id2label[predicted_label])`,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>feature_extractor = 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 = feature_extractor(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`}}),{c(){d=a("p"),w=l("Example:"),h=u(),$(p.$$.fragment)},l(o){d=r(o,"P",{});var f=n(d);w=i(f,"Example:"),f.forEach(s),h=g(o),b(p.$$.fragment,o)},m(o,f){_(o,d,f),e(d,w),_(o,h,f),N(p,o,f),v=!0},p:es,i(o){v||(y(p.$$.fragment,o),v=!0)},o(o){T(p.$$.fragment,o),v=!1},d(o){o&&s(d),o&&s(h),R(p,o)}}}function Kr(C){let d,w,h,p,v,o,f,F,Ms,ss,z,Y,Rt,ye,qs,Ct,Os,os,I,Ds,Te,Ss,zs,Re,Ls,Ws,Ft,Vs,Hs,It,Us,Bs,jt,Gs,Js,as,at,Ks,rs,rt,Xs,ns,nt,xt,Zs,ls,lt,Qs,is,it,Ce,Ys,dt,eo,to,ds,ee,so,Fe,oo,ao,cs,Ie,Da,fs,P,ro,je,no,lo,xe,io,co,Ee,fo,po,ps,L,te,Et,ke,mo,kt,ho,ms,x,Pe,uo,W,go,ct,_o,vo,Ae,wo,$o,bo,V,No,ft,yo,To,pt,Ro,Co,Fo,se,hs,H,oe,Pt,Me,Io,At,jo,us,D,qe,xo,Oe,Eo,De,ko,Po,Ao,A,Se,Mo,U,qo,mt,Oo,Do,Mt,So,zo,Lo,ae,Wo,re,gs,B,ne,qt,ze,Vo,Ot,Ho,_s,E,Le,Uo,Dt,Bo,Go,We,Jo,Ve,Ko,Xo,Zo,M,He,Qo,G,Yo,ht,ea,ta,St,sa,oa,aa,le,ra,ie,vs,J,de,zt,Ue,na,Lt,la,ws,S,Be,ia,Ge,da,Je,ca,fa,pa,q,Ke,ma,K,ha,ut,ua,ga,Wt,_a,va,wa,ce,$a,fe,$s,X,pe,Vt,Xe,ba,Ht,Na,bs,k,Ze,ya,Ut,Ta,Ra,Qe,Ca,Ye,Fa,Ia,ja,O,et,xa,Z,Ea,gt,ka,Pa,Bt,Aa,Ma,qa,me,Oa,he,Ns;return o=new ot({}),ye=new ot({}),ke=new ot({}),Pe=new Q({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:"out_features",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.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>,
<code>&quot;stage3&quot;</code>, <code>&quot;stage4&quot;</code>.`,name:"out_features"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/resnet/configuration_resnet.py#L34"}}),se=new Yt({props:{anchor:"transformers.ResNetConfig.example",$$slots:{default:[zr]},$$scope:{ctx:C}}}),Me=new ot({}),qe=new Q({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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/resnet/modeling_resnet.py#L303"}}),Se=new Q({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/v4.25.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<code>AutoImageProcessor.__call__()</code> 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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/resnet/modeling_resnet.py#L313",returnDescription:`
<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/v4.25.1/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>) \u2014 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>) \u2014 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>) \u2014 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:`
<p><code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ae=new As({props:{$$slots:{default:[Lr]},$$scope:{ctx:C}}}),re=new Yt({props:{anchor:"transformers.ResNetModel.forward.example",$$slots:{default:[Wr]},$$scope:{ctx:C}}}),ze=new ot({}),Le=new Q({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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/resnet/modeling_resnet.py#L357"}}),He=new Q({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/v4.25.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<code>AutoImageProcessor.__call__()</code> 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/v4.25.1/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/v4.25.1/src/transformers/models/resnet/modeling_resnet.py#L370",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.25.1/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/v4.25.1/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) \u2014 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>) \u2014 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>) \u2014 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:`
<p><a
  href="/docs/transformers/v4.25.1/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),le=new As({props:{$$slots:{default:[Vr]},$$scope:{ctx:C}}}),ie=new Yt({props:{anchor:"transformers.ResNetForImageClassification.forward.example",$$slots:{default:[Hr]},$$scope:{ctx:C}}}),Ue=new ot({}),Be=new Q({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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/resnet/modeling_tf_resnet.py#L389"}}),Ke=new Q({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/v4.25.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<code>AutoImageProcessor.__call__()</code> 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/v4.25.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.25.1/src/transformers/models/resnet/modeling_tf_resnet.py#L394",returnDescription:`
<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/v4.25.1/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>) \u2014 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>) \u2014 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>) \u2014 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:`
<p><code>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(tf.Tensor)</code></p>
`}}),ce=new As({props:{$$slots:{default:[Ur]},$$scope:{ctx:C}}}),fe=new Yt({props:{anchor:"transformers.TFResNetModel.call.example",$$slots:{default:[Br]},$$scope:{ctx:C}}}),Xe=new ot({}),Ze=new Q({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/v4.25.1/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/v4.25.1/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/v4.25.1/src/transformers/models/resnet/modeling_tf_resnet.py#L442"}}),et=new Q({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/v4.25.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<code>AutoImageProcessor.__call__()</code> 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/v4.25.1/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/v4.25.1/src/transformers/models/resnet/modeling_tf_resnet.py#L459",returnDescription:`
<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/v4.25.1/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) \u2014 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>) \u2014 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>) \u2014 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:`
<p><code>transformers.modeling_tf_outputs.TFImageClassifierOutputWithNoAttention</code> or <code>tuple(tf.Tensor)</code></p>
`}}),me=new As({props:{$$slots:{default:[Gr]},$$scope:{ctx:C}}}),he=new Yt({props:{anchor:"transformers.TFResNetForImageClassification.call.example",$$slots:{default:[Jr]},$$scope:{ctx:C}}}),{c(){d=a("meta"),w=u(),h=a("h1"),p=a("a"),v=a("span"),$(o.$$.fragment),f=u(),F=a("span"),Ms=l("ResNet"),ss=u(),z=a("h2"),Y=a("a"),Rt=a("span"),$(ye.$$.fragment),qs=u(),Ct=a("span"),Os=l("Overview"),os=u(),I=a("p"),Ds=l("The ResNet model was proposed in "),Te=a("a"),Ss=l("Deep Residual Learning for Image Recognition"),zs=l(" by Kaiming He, Xiangyu Zhang, Shaoqing Ren and Jian Sun. Our implementation follows the small changes made by "),Re=a("a"),Ls=l("Nvidia"),Ws=l(", we apply the "),Ft=a("code"),Vs=l("stride=2"),Hs=l(" for downsampling in bottleneck\u2019s "),It=a("code"),Us=l("3x3"),Bs=l(" conv and not in the first "),jt=a("code"),Gs=l("1x1"),Js=l(". This is generally known as \u201CResNet v1.5\u201D."),as=u(),at=a("p"),Ks=l("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."),rs=u(),rt=a("p"),Xs=l("The abstract from the paper is the following:"),ns=u(),nt=a("p"),xt=a("em"),Zs=l(`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 & COCO 2015 competitions, where we also won the 1st places on the tasks of ImageNet detection, ImageNet localization, COCO detection, and COCO segmentation.`),ls=u(),lt=a("p"),Qs=l("Tips:"),is=u(),it=a("ul"),Ce=a("li"),Ys=l("One can use "),dt=a("a"),eo=l("AutoImageProcessor"),to=l(" to prepare images for the model."),ds=u(),ee=a("p"),so=l("The figure below illustrates the architecture of ResNet. Taken from the "),Fe=a("a"),oo=l("original paper"),ao=l("."),cs=u(),Ie=a("img"),fs=u(),P=a("p"),ro=l("This model was contributed by "),je=a("a"),no=l("Francesco"),lo=l(". The TensorFlow version of this model was added by "),xe=a("a"),io=l("amyeroberts"),co=l(". The original code can be found "),Ee=a("a"),fo=l("here"),po=l("."),ps=u(),L=a("h2"),te=a("a"),Et=a("span"),$(ke.$$.fragment),mo=u(),kt=a("span"),ho=l("ResNetConfig"),ms=u(),x=a("div"),$(Pe.$$.fragment),uo=u(),W=a("p"),go=l("This is the configuration class to store the configuration of a "),ct=a("a"),_o=l("ResNetModel"),vo=l(`. 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
`),Ae=a("a"),wo=l("microsoft/resnet-50"),$o=l(" architecture."),bo=u(),V=a("p"),No=l("Configuration objects inherit from "),ft=a("a"),yo=l("PretrainedConfig"),To=l(` and can be used to control the model outputs. Read the
documentation from `),pt=a("a"),Ro=l("PretrainedConfig"),Co=l(" for more information."),Fo=u(),$(se.$$.fragment),hs=u(),H=a("h2"),oe=a("a"),Pt=a("span"),$(Me.$$.fragment),Io=u(),At=a("span"),jo=l("ResNetModel"),us=u(),D=a("div"),$(qe.$$.fragment),xo=u(),Oe=a("p"),Eo=l(`The bare ResNet model outputting raw features without any specific head on top.
This model is a PyTorch `),De=a("a"),ko=l("torch.nn.Module"),Po=l(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ao=u(),A=a("div"),$(Se.$$.fragment),Mo=u(),U=a("p"),qo=l("The "),mt=a("a"),Oo=l("ResNetModel"),Do=l(" forward method, overrides the "),Mt=a("code"),So=l("__call__"),zo=l(" special method."),Lo=u(),$(ae.$$.fragment),Wo=u(),$(re.$$.fragment),gs=u(),B=a("h2"),ne=a("a"),qt=a("span"),$(ze.$$.fragment),Vo=u(),Ot=a("span"),Ho=l("ResNetForImageClassification"),_s=u(),E=a("div"),$(Le.$$.fragment),Uo=u(),Dt=a("p"),Bo=l(`ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Go=u(),We=a("p"),Jo=l("This model is a PyTorch "),Ve=a("a"),Ko=l("torch.nn.Module"),Xo=l(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Zo=u(),M=a("div"),$(He.$$.fragment),Qo=u(),G=a("p"),Yo=l("The "),ht=a("a"),ea=l("ResNetForImageClassification"),ta=l(" forward method, overrides the "),St=a("code"),sa=l("__call__"),oa=l(" special method."),aa=u(),$(le.$$.fragment),ra=u(),$(ie.$$.fragment),vs=u(),J=a("h2"),de=a("a"),zt=a("span"),$(Ue.$$.fragment),na=u(),Lt=a("span"),la=l("TFResNetModel"),ws=u(),S=a("div"),$(Be.$$.fragment),ia=u(),Ge=a("p"),da=l(`The bare ResNet model outputting raw features without any specific head on top.
This model is a TensorFlow
`),Je=a("a"),ca=l("tf.keras.layers.Layer"),fa=l(` sub-class. Use it as a
regular TensorFlow Module and refer to the TensorFlow documentation for all matter related to general usage and
behavior.`),pa=u(),q=a("div"),$(Ke.$$.fragment),ma=u(),K=a("p"),ha=l("The "),ut=a("a"),ua=l("TFResNetModel"),ga=l(" forward method, overrides the "),Wt=a("code"),_a=l("__call__"),va=l(" special method."),wa=u(),$(ce.$$.fragment),$a=u(),$(fe.$$.fragment),$s=u(),X=a("h2"),pe=a("a"),Vt=a("span"),$(Xe.$$.fragment),ba=u(),Ht=a("span"),Na=l("TFResNetForImageClassification"),bs=u(),k=a("div"),$(Ze.$$.fragment),ya=u(),Ut=a("p"),Ta=l(`ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Ra=u(),Qe=a("p"),Ca=l(`This model is a TensorFlow
`),Ye=a("a"),Fa=l("tf.keras.layers.Layer"),Ia=l(` sub-class. Use it as a
regular TensorFlow Module and refer to the TensorFlow documentation for all matter related to general usage and
behavior.`),ja=u(),O=a("div"),$(et.$$.fragment),xa=u(),Z=a("p"),Ea=l("The "),gt=a("a"),ka=l("TFResNetForImageClassification"),Pa=l(" forward method, overrides the "),Bt=a("code"),Aa=l("__call__"),Ma=l(" special method."),qa=u(),$(me.$$.fragment),Oa=u(),$(he.$$.fragment),this.h()},l(t){const m=Or('[data-svelte="svelte-1phssyn"]',document.head);d=r(m,"META",{name:!0,content:!0}),m.forEach(s),w=g(t),h=r(t,"H1",{class:!0});var tt=n(h);p=r(tt,"A",{id:!0,class:!0,href:!0});var Gt=n(p);v=r(Gt,"SPAN",{});var Jt=n(v);b(o.$$.fragment,Jt),Jt.forEach(s),Gt.forEach(s),f=g(tt),F=r(tt,"SPAN",{});var Kt=n(F);Ms=i(Kt,"ResNet"),Kt.forEach(s),tt.forEach(s),ss=g(t),z=r(t,"H2",{class:!0});var st=n(z);Y=r(st,"A",{id:!0,class:!0,href:!0});var Xt=n(Y);Rt=r(Xt,"SPAN",{});var Zt=n(Rt);b(ye.$$.fragment,Zt),Zt.forEach(s),Xt.forEach(s),qs=g(st),Ct=r(st,"SPAN",{});var Qt=n(Ct);Os=i(Qt,"Overview"),Qt.forEach(s),st.forEach(s),os=g(t),I=r(t,"P",{});var j=n(I);Ds=i(j,"The ResNet model was proposed in "),Te=r(j,"A",{href:!0,rel:!0});var Sa=n(Te);Ss=i(Sa,"Deep Residual Learning for Image Recognition"),Sa.forEach(s),zs=i(j," by Kaiming He, Xiangyu Zhang, Shaoqing Ren and Jian Sun. Our implementation follows the small changes made by "),Re=r(j,"A",{href:!0,rel:!0});var za=n(Re);Ls=i(za,"Nvidia"),za.forEach(s),Ws=i(j,", we apply the "),Ft=r(j,"CODE",{});var La=n(Ft);Vs=i(La,"stride=2"),La.forEach(s),Hs=i(j," for downsampling in bottleneck\u2019s "),It=r(j,"CODE",{});var Wa=n(It);Us=i(Wa,"3x3"),Wa.forEach(s),Bs=i(j," conv and not in the first "),jt=r(j,"CODE",{});var Va=n(jt);Gs=i(Va,"1x1"),Va.forEach(s),Js=i(j,". This is generally known as \u201CResNet v1.5\u201D."),j.forEach(s),as=g(t),at=r(t,"P",{});var Ha=n(at);Ks=i(Ha,"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."),Ha.forEach(s),rs=g(t),rt=r(t,"P",{});var Ua=n(rt);Xs=i(Ua,"The abstract from the paper is the following:"),Ua.forEach(s),ns=g(t),nt=r(t,"P",{});var Ba=n(nt);xt=r(Ba,"EM",{});var Ga=n(xt);Zs=i(Ga,`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 & COCO 2015 competitions, where we also won the 1st places on the tasks of ImageNet detection, ImageNet localization, COCO detection, and COCO segmentation.`),Ga.forEach(s),Ba.forEach(s),ls=g(t),lt=r(t,"P",{});var Ja=n(lt);Qs=i(Ja,"Tips:"),Ja.forEach(s),is=g(t),it=r(t,"UL",{});var Ka=n(it);Ce=r(Ka,"LI",{});var ys=n(Ce);Ys=i(ys,"One can use "),dt=r(ys,"A",{href:!0});var Xa=n(dt);eo=i(Xa,"AutoImageProcessor"),Xa.forEach(s),to=i(ys," to prepare images for the model."),ys.forEach(s),Ka.forEach(s),ds=g(t),ee=r(t,"P",{});var Ts=n(ee);so=i(Ts,"The figure below illustrates the architecture of ResNet. Taken from the "),Fe=r(Ts,"A",{href:!0,rel:!0});var Za=n(Fe);oo=i(Za,"original paper"),Za.forEach(s),ao=i(Ts,"."),Ts.forEach(s),cs=g(t),Ie=r(t,"IMG",{width:!0,src:!0}),fs=g(t),P=r(t,"P",{});var ue=n(P);ro=i(ue,"This model was contributed by "),je=r(ue,"A",{href:!0,rel:!0});var Qa=n(je);no=i(Qa,"Francesco"),Qa.forEach(s),lo=i(ue,". The TensorFlow version of this model was added by "),xe=r(ue,"A",{href:!0,rel:!0});var Ya=n(xe);io=i(Ya,"amyeroberts"),Ya.forEach(s),co=i(ue,". The original code can be found "),Ee=r(ue,"A",{href:!0,rel:!0});var er=n(Ee);fo=i(er,"here"),er.forEach(s),po=i(ue,"."),ue.forEach(s),ps=g(t),L=r(t,"H2",{class:!0});var Rs=n(L);te=r(Rs,"A",{id:!0,class:!0,href:!0});var tr=n(te);Et=r(tr,"SPAN",{});var sr=n(Et);b(ke.$$.fragment,sr),sr.forEach(s),tr.forEach(s),mo=g(Rs),kt=r(Rs,"SPAN",{});var or=n(kt);ho=i(or,"ResNetConfig"),or.forEach(s),Rs.forEach(s),ms=g(t),x=r(t,"DIV",{class:!0});var ge=n(x);b(Pe.$$.fragment,ge),uo=g(ge),W=r(ge,"P",{});var _t=n(W);go=i(_t,"This is the configuration class to store the configuration of a "),ct=r(_t,"A",{href:!0});var ar=n(ct);_o=i(ar,"ResNetModel"),ar.forEach(s),vo=i(_t,`. 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
`),Ae=r(_t,"A",{href:!0,rel:!0});var rr=n(Ae);wo=i(rr,"microsoft/resnet-50"),rr.forEach(s),$o=i(_t," architecture."),_t.forEach(s),bo=g(ge),V=r(ge,"P",{});var vt=n(V);No=i(vt,"Configuration objects inherit from "),ft=r(vt,"A",{href:!0});var nr=n(ft);yo=i(nr,"PretrainedConfig"),nr.forEach(s),To=i(vt,` and can be used to control the model outputs. Read the
documentation from `),pt=r(vt,"A",{href:!0});var lr=n(pt);Ro=i(lr,"PretrainedConfig"),lr.forEach(s),Co=i(vt," for more information."),vt.forEach(s),Fo=g(ge),b(se.$$.fragment,ge),ge.forEach(s),hs=g(t),H=r(t,"H2",{class:!0});var Cs=n(H);oe=r(Cs,"A",{id:!0,class:!0,href:!0});var ir=n(oe);Pt=r(ir,"SPAN",{});var dr=n(Pt);b(Me.$$.fragment,dr),dr.forEach(s),ir.forEach(s),Io=g(Cs),At=r(Cs,"SPAN",{});var cr=n(At);jo=i(cr,"ResNetModel"),cr.forEach(s),Cs.forEach(s),us=g(t),D=r(t,"DIV",{class:!0});var wt=n(D);b(qe.$$.fragment,wt),xo=g(wt),Oe=r(wt,"P",{});var Fs=n(Oe);Eo=i(Fs,`The bare ResNet model outputting raw features without any specific head on top.
This model is a PyTorch `),De=r(Fs,"A",{href:!0,rel:!0});var fr=n(De);ko=i(fr,"torch.nn.Module"),fr.forEach(s),Po=i(Fs,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Fs.forEach(s),Ao=g(wt),A=r(wt,"DIV",{class:!0});var _e=n(A);b(Se.$$.fragment,_e),Mo=g(_e),U=r(_e,"P",{});var $t=n(U);qo=i($t,"The "),mt=r($t,"A",{href:!0});var pr=n(mt);Oo=i(pr,"ResNetModel"),pr.forEach(s),Do=i($t," forward method, overrides the "),Mt=r($t,"CODE",{});var mr=n(Mt);So=i(mr,"__call__"),mr.forEach(s),zo=i($t," special method."),$t.forEach(s),Lo=g(_e),b(ae.$$.fragment,_e),Wo=g(_e),b(re.$$.fragment,_e),_e.forEach(s),wt.forEach(s),gs=g(t),B=r(t,"H2",{class:!0});var Is=n(B);ne=r(Is,"A",{id:!0,class:!0,href:!0});var hr=n(ne);qt=r(hr,"SPAN",{});var ur=n(qt);b(ze.$$.fragment,ur),ur.forEach(s),hr.forEach(s),Vo=g(Is),Ot=r(Is,"SPAN",{});var gr=n(Ot);Ho=i(gr,"ResNetForImageClassification"),gr.forEach(s),Is.forEach(s),_s=g(t),E=r(t,"DIV",{class:!0});var ve=n(E);b(Le.$$.fragment,ve),Uo=g(ve),Dt=r(ve,"P",{});var _r=n(Dt);Bo=i(_r,`ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),_r.forEach(s),Go=g(ve),We=r(ve,"P",{});var js=n(We);Jo=i(js,"This model is a PyTorch "),Ve=r(js,"A",{href:!0,rel:!0});var vr=n(Ve);Ko=i(vr,"torch.nn.Module"),vr.forEach(s),Xo=i(js,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),js.forEach(s),Zo=g(ve),M=r(ve,"DIV",{class:!0});var we=n(M);b(He.$$.fragment,we),Qo=g(we),G=r(we,"P",{});var bt=n(G);Yo=i(bt,"The "),ht=r(bt,"A",{href:!0});var wr=n(ht);ea=i(wr,"ResNetForImageClassification"),wr.forEach(s),ta=i(bt," forward method, overrides the "),St=r(bt,"CODE",{});var $r=n(St);sa=i($r,"__call__"),$r.forEach(s),oa=i(bt," special method."),bt.forEach(s),aa=g(we),b(le.$$.fragment,we),ra=g(we),b(ie.$$.fragment,we),we.forEach(s),ve.forEach(s),vs=g(t),J=r(t,"H2",{class:!0});var xs=n(J);de=r(xs,"A",{id:!0,class:!0,href:!0});var br=n(de);zt=r(br,"SPAN",{});var Nr=n(zt);b(Ue.$$.fragment,Nr),Nr.forEach(s),br.forEach(s),na=g(xs),Lt=r(xs,"SPAN",{});var yr=n(Lt);la=i(yr,"TFResNetModel"),yr.forEach(s),xs.forEach(s),ws=g(t),S=r(t,"DIV",{class:!0});var Nt=n(S);b(Be.$$.fragment,Nt),ia=g(Nt),Ge=r(Nt,"P",{});var Es=n(Ge);da=i(Es,`The bare ResNet model outputting raw features without any specific head on top.
This model is a TensorFlow
`),Je=r(Es,"A",{href:!0,rel:!0});var Tr=n(Je);ca=i(Tr,"tf.keras.layers.Layer"),Tr.forEach(s),fa=i(Es,` sub-class. Use it as a
regular TensorFlow Module and refer to the TensorFlow documentation for all matter related to general usage and
behavior.`),Es.forEach(s),pa=g(Nt),q=r(Nt,"DIV",{class:!0});var $e=n(q);b(Ke.$$.fragment,$e),ma=g($e),K=r($e,"P",{});var yt=n(K);ha=i(yt,"The "),ut=r(yt,"A",{href:!0});var Rr=n(ut);ua=i(Rr,"TFResNetModel"),Rr.forEach(s),ga=i(yt," forward method, overrides the "),Wt=r(yt,"CODE",{});var Cr=n(Wt);_a=i(Cr,"__call__"),Cr.forEach(s),va=i(yt," special method."),yt.forEach(s),wa=g($e),b(ce.$$.fragment,$e),$a=g($e),b(fe.$$.fragment,$e),$e.forEach(s),Nt.forEach(s),$s=g(t),X=r(t,"H2",{class:!0});var ks=n(X);pe=r(ks,"A",{id:!0,class:!0,href:!0});var Fr=n(pe);Vt=r(Fr,"SPAN",{});var Ir=n(Vt);b(Xe.$$.fragment,Ir),Ir.forEach(s),Fr.forEach(s),ba=g(ks),Ht=r(ks,"SPAN",{});var jr=n(Ht);Na=i(jr,"TFResNetForImageClassification"),jr.forEach(s),ks.forEach(s),bs=g(t),k=r(t,"DIV",{class:!0});var be=n(k);b(Ze.$$.fragment,be),ya=g(be),Ut=r(be,"P",{});var xr=n(Ut);Ta=i(xr,`ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),xr.forEach(s),Ra=g(be),Qe=r(be,"P",{});var Ps=n(Qe);Ca=i(Ps,`This model is a TensorFlow
`),Ye=r(Ps,"A",{href:!0,rel:!0});var Er=n(Ye);Fa=i(Er,"tf.keras.layers.Layer"),Er.forEach(s),Ia=i(Ps,` sub-class. Use it as a
regular TensorFlow Module and refer to the TensorFlow documentation for all matter related to general usage and
behavior.`),Ps.forEach(s),ja=g(be),O=r(be,"DIV",{class:!0});var Ne=n(O);b(et.$$.fragment,Ne),xa=g(Ne),Z=r(Ne,"P",{});var Tt=n(Z);Ea=i(Tt,"The "),gt=r(Tt,"A",{href:!0});var kr=n(gt);ka=i(kr,"TFResNetForImageClassification"),kr.forEach(s),Pa=i(Tt," forward method, overrides the "),Bt=r(Tt,"CODE",{});var Pr=n(Bt);Aa=i(Pr,"__call__"),Pr.forEach(s),Ma=i(Tt," special method."),Tt.forEach(s),qa=g(Ne),b(me.$$.fragment,Ne),Oa=g(Ne),b(he.$$.fragment,Ne),Ne.forEach(s),be.forEach(s),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(Xr)),c(p,"id","resnet"),c(p,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(p,"href","#resnet"),c(h,"class","relative group"),c(Y,"id","overview"),c(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Y,"href","#overview"),c(z,"class","relative group"),c(Te,"href","https://arxiv.org/abs/1512.03385"),c(Te,"rel","nofollow"),c(Re,"href","https://catalog.ngc.nvidia.com/orgs/nvidia/resources/resnet_50_v1_5_for_pytorch"),c(Re,"rel","nofollow"),c(dt,"href","/docs/transformers/v4.25.1/en/model_doc/auto#transformers.AutoImageProcessor"),c(Fe,"href","https://arxiv.org/abs/1512.03385"),c(Fe,"rel","nofollow"),c(Ie,"width","600"),Dr(Ie.src,Da="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/resnet_architecture.png")||c(Ie,"src",Da),c(je,"href","https://huggingface.co/Francesco"),c(je,"rel","nofollow"),c(xe,"href","https://huggingface.co/amyeroberts"),c(xe,"rel","nofollow"),c(Ee,"href","https://github.com/KaimingHe/deep-residual-networks"),c(Ee,"rel","nofollow"),c(te,"id","transformers.ResNetConfig"),c(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(te,"href","#transformers.ResNetConfig"),c(L,"class","relative group"),c(ct,"href","/docs/transformers/v4.25.1/en/model_doc/resnet#transformers.ResNetModel"),c(Ae,"href","https://huggingface.co/microsoft/resnet-50"),c(Ae,"rel","nofollow"),c(ft,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(pt,"href","/docs/transformers/v4.25.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(oe,"id","transformers.ResNetModel"),c(oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(oe,"href","#transformers.ResNetModel"),c(H,"class","relative group"),c(De,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(De,"rel","nofollow"),c(mt,"href","/docs/transformers/v4.25.1/en/model_doc/resnet#transformers.ResNetModel"),c(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ne,"id","transformers.ResNetForImageClassification"),c(ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ne,"href","#transformers.ResNetForImageClassification"),c(B,"class","relative group"),c(Ve,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ve,"rel","nofollow"),c(ht,"href","/docs/transformers/v4.25.1/en/model_doc/resnet#transformers.ResNetForImageClassification"),c(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(de,"id","transformers.TFResNetModel"),c(de,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(de,"href","#transformers.TFResNetModel"),c(J,"class","relative group"),c(Je,"href","https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer"),c(Je,"rel","nofollow"),c(ut,"href","/docs/transformers/v4.25.1/en/model_doc/resnet#transformers.TFResNetModel"),c(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pe,"id","transformers.TFResNetForImageClassification"),c(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(pe,"href","#transformers.TFResNetForImageClassification"),c(X,"class","relative group"),c(Ye,"href","https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer"),c(Ye,"rel","nofollow"),c(gt,"href","/docs/transformers/v4.25.1/en/model_doc/resnet#transformers.TFResNetForImageClassification"),c(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,m){e(document.head,d),_(t,w,m),_(t,h,m),e(h,p),e(p,v),N(o,v,null),e(h,f),e(h,F),e(F,Ms),_(t,ss,m),_(t,z,m),e(z,Y),e(Y,Rt),N(ye,Rt,null),e(z,qs),e(z,Ct),e(Ct,Os),_(t,os,m),_(t,I,m),e(I,Ds),e(I,Te),e(Te,Ss),e(I,zs),e(I,Re),e(Re,Ls),e(I,Ws),e(I,Ft),e(Ft,Vs),e(I,Hs),e(I,It),e(It,Us),e(I,Bs),e(I,jt),e(jt,Gs),e(I,Js),_(t,as,m),_(t,at,m),e(at,Ks),_(t,rs,m),_(t,rt,m),e(rt,Xs),_(t,ns,m),_(t,nt,m),e(nt,xt),e(xt,Zs),_(t,ls,m),_(t,lt,m),e(lt,Qs),_(t,is,m),_(t,it,m),e(it,Ce),e(Ce,Ys),e(Ce,dt),e(dt,eo),e(Ce,to),_(t,ds,m),_(t,ee,m),e(ee,so),e(ee,Fe),e(Fe,oo),e(ee,ao),_(t,cs,m),_(t,Ie,m),_(t,fs,m),_(t,P,m),e(P,ro),e(P,je),e(je,no),e(P,lo),e(P,xe),e(xe,io),e(P,co),e(P,Ee),e(Ee,fo),e(P,po),_(t,ps,m),_(t,L,m),e(L,te),e(te,Et),N(ke,Et,null),e(L,mo),e(L,kt),e(kt,ho),_(t,ms,m),_(t,x,m),N(Pe,x,null),e(x,uo),e(x,W),e(W,go),e(W,ct),e(ct,_o),e(W,vo),e(W,Ae),e(Ae,wo),e(W,$o),e(x,bo),e(x,V),e(V,No),e(V,ft),e(ft,yo),e(V,To),e(V,pt),e(pt,Ro),e(V,Co),e(x,Fo),N(se,x,null),_(t,hs,m),_(t,H,m),e(H,oe),e(oe,Pt),N(Me,Pt,null),e(H,Io),e(H,At),e(At,jo),_(t,us,m),_(t,D,m),N(qe,D,null),e(D,xo),e(D,Oe),e(Oe,Eo),e(Oe,De),e(De,ko),e(Oe,Po),e(D,Ao),e(D,A),N(Se,A,null),e(A,Mo),e(A,U),e(U,qo),e(U,mt),e(mt,Oo),e(U,Do),e(U,Mt),e(Mt,So),e(U,zo),e(A,Lo),N(ae,A,null),e(A,Wo),N(re,A,null),_(t,gs,m),_(t,B,m),e(B,ne),e(ne,qt),N(ze,qt,null),e(B,Vo),e(B,Ot),e(Ot,Ho),_(t,_s,m),_(t,E,m),N(Le,E,null),e(E,Uo),e(E,Dt),e(Dt,Bo),e(E,Go),e(E,We),e(We,Jo),e(We,Ve),e(Ve,Ko),e(We,Xo),e(E,Zo),e(E,M),N(He,M,null),e(M,Qo),e(M,G),e(G,Yo),e(G,ht),e(ht,ea),e(G,ta),e(G,St),e(St,sa),e(G,oa),e(M,aa),N(le,M,null),e(M,ra),N(ie,M,null),_(t,vs,m),_(t,J,m),e(J,de),e(de,zt),N(Ue,zt,null),e(J,na),e(J,Lt),e(Lt,la),_(t,ws,m),_(t,S,m),N(Be,S,null),e(S,ia),e(S,Ge),e(Ge,da),e(Ge,Je),e(Je,ca),e(Ge,fa),e(S,pa),e(S,q),N(Ke,q,null),e(q,ma),e(q,K),e(K,ha),e(K,ut),e(ut,ua),e(K,ga),e(K,Wt),e(Wt,_a),e(K,va),e(q,wa),N(ce,q,null),e(q,$a),N(fe,q,null),_(t,$s,m),_(t,X,m),e(X,pe),e(pe,Vt),N(Xe,Vt,null),e(X,ba),e(X,Ht),e(Ht,Na),_(t,bs,m),_(t,k,m),N(Ze,k,null),e(k,ya),e(k,Ut),e(Ut,Ta),e(k,Ra),e(k,Qe),e(Qe,Ca),e(Qe,Ye),e(Ye,Fa),e(Qe,Ia),e(k,ja),e(k,O),N(et,O,null),e(O,xa),e(O,Z),e(Z,Ea),e(Z,gt),e(gt,ka),e(Z,Pa),e(Z,Bt),e(Bt,Aa),e(Z,Ma),e(O,qa),N(me,O,null),e(O,Oa),N(he,O,null),Ns=!0},p(t,[m]){const tt={};m&2&&(tt.$$scope={dirty:m,ctx:t}),se.$set(tt);const Gt={};m&2&&(Gt.$$scope={dirty:m,ctx:t}),ae.$set(Gt);const Jt={};m&2&&(Jt.$$scope={dirty:m,ctx:t}),re.$set(Jt);const Kt={};m&2&&(Kt.$$scope={dirty:m,ctx:t}),le.$set(Kt);const st={};m&2&&(st.$$scope={dirty:m,ctx:t}),ie.$set(st);const Xt={};m&2&&(Xt.$$scope={dirty:m,ctx:t}),ce.$set(Xt);const Zt={};m&2&&(Zt.$$scope={dirty:m,ctx:t}),fe.$set(Zt);const Qt={};m&2&&(Qt.$$scope={dirty:m,ctx:t}),me.$set(Qt);const j={};m&2&&(j.$$scope={dirty:m,ctx:t}),he.$set(j)},i(t){Ns||(y(o.$$.fragment,t),y(ye.$$.fragment,t),y(ke.$$.fragment,t),y(Pe.$$.fragment,t),y(se.$$.fragment,t),y(Me.$$.fragment,t),y(qe.$$.fragment,t),y(Se.$$.fragment,t),y(ae.$$.fragment,t),y(re.$$.fragment,t),y(ze.$$.fragment,t),y(Le.$$.fragment,t),y(He.$$.fragment,t),y(le.$$.fragment,t),y(ie.$$.fragment,t),y(Ue.$$.fragment,t),y(Be.$$.fragment,t),y(Ke.$$.fragment,t),y(ce.$$.fragment,t),y(fe.$$.fragment,t),y(Xe.$$.fragment,t),y(Ze.$$.fragment,t),y(et.$$.fragment,t),y(me.$$.fragment,t),y(he.$$.fragment,t),Ns=!0)},o(t){T(o.$$.fragment,t),T(ye.$$.fragment,t),T(ke.$$.fragment,t),T(Pe.$$.fragment,t),T(se.$$.fragment,t),T(Me.$$.fragment,t),T(qe.$$.fragment,t),T(Se.$$.fragment,t),T(ae.$$.fragment,t),T(re.$$.fragment,t),T(ze.$$.fragment,t),T(Le.$$.fragment,t),T(He.$$.fragment,t),T(le.$$.fragment,t),T(ie.$$.fragment,t),T(Ue.$$.fragment,t),T(Be.$$.fragment,t),T(Ke.$$.fragment,t),T(ce.$$.fragment,t),T(fe.$$.fragment,t),T(Xe.$$.fragment,t),T(Ze.$$.fragment,t),T(et.$$.fragment,t),T(me.$$.fragment,t),T(he.$$.fragment,t),Ns=!1},d(t){s(d),t&&s(w),t&&s(h),R(o),t&&s(ss),t&&s(z),R(ye),t&&s(os),t&&s(I),t&&s(as),t&&s(at),t&&s(rs),t&&s(rt),t&&s(ns),t&&s(nt),t&&s(ls),t&&s(lt),t&&s(is),t&&s(it),t&&s(ds),t&&s(ee),t&&s(cs),t&&s(Ie),t&&s(fs),t&&s(P),t&&s(ps),t&&s(L),R(ke),t&&s(ms),t&&s(x),R(Pe),R(se),t&&s(hs),t&&s(H),R(Me),t&&s(us),t&&s(D),R(qe),R(Se),R(ae),R(re),t&&s(gs),t&&s(B),R(ze),t&&s(_s),t&&s(E),R(Le),R(He),R(le),R(ie),t&&s(vs),t&&s(J),R(Ue),t&&s(ws),t&&s(S),R(Be),R(Ke),R(ce),R(fe),t&&s($s),t&&s(X),R(Xe),t&&s(bs),t&&s(k),R(Ze),R(et),R(me),R(he)}}}const Xr={local:"resnet",sections:[{local:"overview",title:"Overview"},{local:"transformers.ResNetConfig",title:"ResNetConfig"},{local:"transformers.ResNetModel",title:"ResNetModel"},{local:"transformers.ResNetForImageClassification",title:"ResNetForImageClassification"},{local:"transformers.TFResNetModel",title:"TFResNetModel"},{local:"transformers.TFResNetForImageClassification",title:"TFResNetForImageClassification"}],title:"ResNet"};function Zr(C){return Sr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class an extends Ar{constructor(d){super();Mr(this,d,Zr,Kr,qr,{})}}export{an as default,Xr as metadata};
