import{S as Uo,i as Bo,s as Jo,e as o,k as m,w as $,t as i,M as Ko,c as a,d as s,m as u,a as r,x as b,h as l,b as c,N as Xo,G as t,g as p,y,q as N,o as R,B as C,v as Zo,L as oo}from"../../chunks/vendor-hf-doc-builder.js";import{T as Go}from"../../chunks/Tip-hf-doc-builder.js";import{D as lt}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ao}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ct}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as so}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Qo(k){let d,w,_,h,v;return h=new ao({props:{code:`from transformers import ResNetConfig, ResNetModel

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

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

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

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

feature_extractor = AutoFeatureExtractor.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> AutoFeatureExtractor, 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 = AutoFeatureExtractor.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=o("p"),w=i("Example:"),_=m(),$(h.$$.fragment)},l(n){d=a(n,"P",{});var g=r(d);w=l(g,"Example:"),g.forEach(s),_=u(n),b(h.$$.fragment,n)},m(n,g){p(n,d,g),t(d,w),p(n,_,g),y(h,n,g),v=!0},p:oo,i(n){v||(N(h.$$.fragment,n),v=!0)},o(n){R(h.$$.fragment,n),v=!1},d(n){n&&s(d),n&&s(_),C(h,n)}}}function oa(k){let d,w,_,h,v,n,g,F,Mt,dt,O,H,He,ae,Pt,Ge,Ot,ft,E,qt,re,St,Dt,ne,zt,Lt,Ue,Wt,Vt,Be,Ht,Gt,Je,Ut,Bt,pt,xe,Jt,ht,Te,Kt,mt,ke,Ke,Xt,ut,je,Zt,gt,Ie,ie,Qt,Ae,Yt,es,_t,G,ts,le,ss,os,vt,ce,ro,wt,P,as,de,rs,ns,fe,is,ls,$t,q,U,Xe,pe,cs,Ze,ds,bt,x,he,fs,S,ps,Fe,hs,ms,me,us,gs,_s,D,vs,Me,ws,$s,Pe,bs,ys,Ns,B,yt,z,J,Qe,ue,Rs,Ye,Cs,Nt,M,ge,Es,_e,xs,ve,Ts,ks,js,j,we,Is,L,As,Oe,Fs,Ms,et,Ps,Os,qs,K,Ss,X,Rt,W,Z,tt,$e,Ds,st,zs,Ct,T,be,Ls,ot,Ws,Vs,ye,Hs,Ne,Gs,Us,Bs,I,Re,Js,V,Ks,qe,Xs,Zs,at,Qs,Ys,eo,Q,to,Y,Et;return n=new ct({}),ae=new ct({}),pe=new ct({}),he=new lt({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:"**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"}],source:"https://github.com/huggingface/transformers/blob/vr_17548/src/transformers/models/resnet/configuration_resnet.py#L28"}}),B=new so({props:{anchor:"transformers.ResNetConfig.example",$$slots:{default:[Qo]},$$scope:{ctx:k}}}),ue=new ct({}),ge=new lt({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_17548/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_17548/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_17548/src/transformers/models/resnet/modeling_resnet.py#L290"}}),we=new lt({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/pr_17548/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See
<code>AutoFeatureExtractor.__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/pr_17548/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_17548/src/transformers/models/resnet/modeling_resnet.py#L300",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/pr_17548/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>
`}}),K=new Go({props:{$$slots:{default:[Yo]},$$scope:{ctx:k}}}),X=new so({props:{anchor:"transformers.ResNetModel.forward.example",$$slots:{default:[ea]},$$scope:{ctx:k}}}),$e=new ct({}),be=new lt({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_17548/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_17548/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_17548/src/transformers/models/resnet/modeling_resnet.py#L344"}}),Re=new lt({props:{name:"forward",anchor:"transformers.ResNetForImageClassification.forward",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"}],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_17548/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See
<code>AutoFeatureExtractor.__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/pr_17548/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_17548/src/transformers/models/resnet/modeling_resnet.py#L357",returnDescription:`
<p>A <a
  href="/docs/transformers/pr_17548/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_17548/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/pr_17548/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutputWithNoAttention"
>transformers.modeling_outputs.ImageClassifierOutputWithNoAttention</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Q=new Go({props:{$$slots:{default:[ta]},$$scope:{ctx:k}}}),Y=new so({props:{anchor:"transformers.ResNetForImageClassification.forward.example",$$slots:{default:[sa]},$$scope:{ctx:k}}}),{c(){d=o("meta"),w=m(),_=o("h1"),h=o("a"),v=o("span"),$(n.$$.fragment),g=m(),F=o("span"),Mt=i("ResNet"),dt=m(),O=o("h2"),H=o("a"),He=o("span"),$(ae.$$.fragment),Pt=m(),Ge=o("span"),Ot=i("Overview"),ft=m(),E=o("p"),qt=i("The ResNet model was proposed in "),re=o("a"),St=i("Deep Residual Learning for Image Recognition"),Dt=i(" by Kaiming He, Xiangyu Zhang, Shaoqing Ren and Jian Sun. Our implementation follows the small changes made by "),ne=o("a"),zt=i("Nvidia"),Lt=i(", we apply the "),Ue=o("code"),Wt=i("stride=2"),Vt=i(" for downsampling in bottleneck\u2019s "),Be=o("code"),Ht=i("3x3"),Gt=i(" conv and not in the first "),Je=o("code"),Ut=i("1x1"),Bt=i(". This is generally known as \u201CResNet v1.5\u201D."),pt=m(),xe=o("p"),Jt=i("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."),ht=m(),Te=o("p"),Kt=i("The abstract from the paper is the following:"),mt=m(),ke=o("p"),Ke=o("em"),Xt=i(`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.`),ut=m(),je=o("p"),Zt=i("Tips:"),gt=m(),Ie=o("ul"),ie=o("li"),Qt=i("One can use "),Ae=o("a"),Yt=i("AutoFeatureExtractor"),es=i(" to prepare images for the model."),_t=m(),G=o("p"),ts=i("The figure below illustrates the architecture of ResNet. Taken from the "),le=o("a"),ss=i("original paper"),os=i("."),vt=m(),ce=o("img"),wt=m(),P=o("p"),as=i("This model was contributed by "),de=o("a"),rs=i("Francesco"),ns=i(". The original code can be found "),fe=o("a"),is=i("here"),ls=i("."),$t=m(),q=o("h2"),U=o("a"),Xe=o("span"),$(pe.$$.fragment),cs=m(),Ze=o("span"),ds=i("ResNetConfig"),bt=m(),x=o("div"),$(he.$$.fragment),fs=m(),S=o("p"),ps=i("This is the configuration class to store the configuration of a "),Fe=o("a"),hs=i("ResNetModel"),ms=i(`. 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
`),me=o("a"),us=i("microsoft/resnet-50"),gs=i(" architecture."),_s=m(),D=o("p"),vs=i("Configuration objects inherit from "),Me=o("a"),ws=i("PretrainedConfig"),$s=i(` and can be used to control the model outputs. Read the
documentation from `),Pe=o("a"),bs=i("PretrainedConfig"),ys=i(" for more information."),Ns=m(),$(B.$$.fragment),yt=m(),z=o("h2"),J=o("a"),Qe=o("span"),$(ue.$$.fragment),Rs=m(),Ye=o("span"),Cs=i("ResNetModel"),Nt=m(),M=o("div"),$(ge.$$.fragment),Es=m(),_e=o("p"),xs=i(`The bare ResNet model outputting raw features without any specific head on top.
This model is a PyTorch `),ve=o("a"),Ts=i("torch.nn.Module"),ks=i(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),js=m(),j=o("div"),$(we.$$.fragment),Is=m(),L=o("p"),As=i("The "),Oe=o("a"),Fs=i("ResNetModel"),Ms=i(" forward method, overrides the "),et=o("code"),Ps=i("__call__"),Os=i(" special method."),qs=m(),$(K.$$.fragment),Ss=m(),$(X.$$.fragment),Rt=m(),W=o("h2"),Z=o("a"),tt=o("span"),$($e.$$.fragment),Ds=m(),st=o("span"),zs=i("ResNetForImageClassification"),Ct=m(),T=o("div"),$(be.$$.fragment),Ls=m(),ot=o("p"),Ws=i(`ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Vs=m(),ye=o("p"),Hs=i("This model is a PyTorch "),Ne=o("a"),Gs=i("torch.nn.Module"),Us=i(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Bs=m(),I=o("div"),$(Re.$$.fragment),Js=m(),V=o("p"),Ks=i("The "),qe=o("a"),Xs=i("ResNetForImageClassification"),Zs=i(" forward method, overrides the "),at=o("code"),Qs=i("__call__"),Ys=i(" special method."),eo=m(),$(Q.$$.fragment),to=m(),$(Y.$$.fragment),this.h()},l(e){const f=Ko('[data-svelte="svelte-1phssyn"]',document.head);d=a(f,"META",{name:!0,content:!0}),f.forEach(s),w=u(e),_=a(e,"H1",{class:!0});var Ce=r(_);h=a(Ce,"A",{id:!0,class:!0,href:!0});var rt=r(h);v=a(rt,"SPAN",{});var nt=r(v);b(n.$$.fragment,nt),nt.forEach(s),rt.forEach(s),g=u(Ce),F=a(Ce,"SPAN",{});var it=r(F);Mt=l(it,"ResNet"),it.forEach(s),Ce.forEach(s),dt=u(e),O=a(e,"H2",{class:!0});var Ee=r(O);H=a(Ee,"A",{id:!0,class:!0,href:!0});var no=r(H);He=a(no,"SPAN",{});var io=r(He);b(ae.$$.fragment,io),io.forEach(s),no.forEach(s),Pt=u(Ee),Ge=a(Ee,"SPAN",{});var lo=r(Ge);Ot=l(lo,"Overview"),lo.forEach(s),Ee.forEach(s),ft=u(e),E=a(e,"P",{});var A=r(E);qt=l(A,"The ResNet model was proposed in "),re=a(A,"A",{href:!0,rel:!0});var co=r(re);St=l(co,"Deep Residual Learning for Image Recognition"),co.forEach(s),Dt=l(A," by Kaiming He, Xiangyu Zhang, Shaoqing Ren and Jian Sun. Our implementation follows the small changes made by "),ne=a(A,"A",{href:!0,rel:!0});var fo=r(ne);zt=l(fo,"Nvidia"),fo.forEach(s),Lt=l(A,", we apply the "),Ue=a(A,"CODE",{});var po=r(Ue);Wt=l(po,"stride=2"),po.forEach(s),Vt=l(A," for downsampling in bottleneck\u2019s "),Be=a(A,"CODE",{});var ho=r(Be);Ht=l(ho,"3x3"),ho.forEach(s),Gt=l(A," conv and not in the first "),Je=a(A,"CODE",{});var mo=r(Je);Ut=l(mo,"1x1"),mo.forEach(s),Bt=l(A,". This is generally known as \u201CResNet v1.5\u201D."),A.forEach(s),pt=u(e),xe=a(e,"P",{});var uo=r(xe);Jt=l(uo,"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."),uo.forEach(s),ht=u(e),Te=a(e,"P",{});var go=r(Te);Kt=l(go,"The abstract from the paper is the following:"),go.forEach(s),mt=u(e),ke=a(e,"P",{});var _o=r(ke);Ke=a(_o,"EM",{});var vo=r(Ke);Xt=l(vo,`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.`),vo.forEach(s),_o.forEach(s),ut=u(e),je=a(e,"P",{});var wo=r(je);Zt=l(wo,"Tips:"),wo.forEach(s),gt=u(e),Ie=a(e,"UL",{});var $o=r(Ie);ie=a($o,"LI",{});var xt=r(ie);Qt=l(xt,"One can use "),Ae=a(xt,"A",{href:!0});var bo=r(Ae);Yt=l(bo,"AutoFeatureExtractor"),bo.forEach(s),es=l(xt," to prepare images for the model."),xt.forEach(s),$o.forEach(s),_t=u(e),G=a(e,"P",{});var Tt=r(G);ts=l(Tt,"The figure below illustrates the architecture of ResNet. Taken from the "),le=a(Tt,"A",{href:!0,rel:!0});var yo=r(le);ss=l(yo,"original paper"),yo.forEach(s),os=l(Tt,"."),Tt.forEach(s),vt=u(e),ce=a(e,"IMG",{width:!0,src:!0}),wt=u(e),P=a(e,"P",{});var Se=r(P);as=l(Se,"This model was contributed by "),de=a(Se,"A",{href:!0,rel:!0});var No=r(de);rs=l(No,"Francesco"),No.forEach(s),ns=l(Se,". The original code can be found "),fe=a(Se,"A",{href:!0,rel:!0});var Ro=r(fe);is=l(Ro,"here"),Ro.forEach(s),ls=l(Se,"."),Se.forEach(s),$t=u(e),q=a(e,"H2",{class:!0});var kt=r(q);U=a(kt,"A",{id:!0,class:!0,href:!0});var Co=r(U);Xe=a(Co,"SPAN",{});var Eo=r(Xe);b(pe.$$.fragment,Eo),Eo.forEach(s),Co.forEach(s),cs=u(kt),Ze=a(kt,"SPAN",{});var xo=r(Ze);ds=l(xo,"ResNetConfig"),xo.forEach(s),kt.forEach(s),bt=u(e),x=a(e,"DIV",{class:!0});var ee=r(x);b(he.$$.fragment,ee),fs=u(ee),S=a(ee,"P",{});var De=r(S);ps=l(De,"This is the configuration class to store the configuration of a "),Fe=a(De,"A",{href:!0});var To=r(Fe);hs=l(To,"ResNetModel"),To.forEach(s),ms=l(De,`. 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
`),me=a(De,"A",{href:!0,rel:!0});var ko=r(me);us=l(ko,"microsoft/resnet-50"),ko.forEach(s),gs=l(De," architecture."),De.forEach(s),_s=u(ee),D=a(ee,"P",{});var ze=r(D);vs=l(ze,"Configuration objects inherit from "),Me=a(ze,"A",{href:!0});var jo=r(Me);ws=l(jo,"PretrainedConfig"),jo.forEach(s),$s=l(ze,` and can be used to control the model outputs. Read the
documentation from `),Pe=a(ze,"A",{href:!0});var Io=r(Pe);bs=l(Io,"PretrainedConfig"),Io.forEach(s),ys=l(ze," for more information."),ze.forEach(s),Ns=u(ee),b(B.$$.fragment,ee),ee.forEach(s),yt=u(e),z=a(e,"H2",{class:!0});var jt=r(z);J=a(jt,"A",{id:!0,class:!0,href:!0});var Ao=r(J);Qe=a(Ao,"SPAN",{});var Fo=r(Qe);b(ue.$$.fragment,Fo),Fo.forEach(s),Ao.forEach(s),Rs=u(jt),Ye=a(jt,"SPAN",{});var Mo=r(Ye);Cs=l(Mo,"ResNetModel"),Mo.forEach(s),jt.forEach(s),Nt=u(e),M=a(e,"DIV",{class:!0});var Le=r(M);b(ge.$$.fragment,Le),Es=u(Le),_e=a(Le,"P",{});var It=r(_e);xs=l(It,`The bare ResNet model outputting raw features without any specific head on top.
This model is a PyTorch `),ve=a(It,"A",{href:!0,rel:!0});var Po=r(ve);Ts=l(Po,"torch.nn.Module"),Po.forEach(s),ks=l(It,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),It.forEach(s),js=u(Le),j=a(Le,"DIV",{class:!0});var te=r(j);b(we.$$.fragment,te),Is=u(te),L=a(te,"P",{});var We=r(L);As=l(We,"The "),Oe=a(We,"A",{href:!0});var Oo=r(Oe);Fs=l(Oo,"ResNetModel"),Oo.forEach(s),Ms=l(We," forward method, overrides the "),et=a(We,"CODE",{});var qo=r(et);Ps=l(qo,"__call__"),qo.forEach(s),Os=l(We," special method."),We.forEach(s),qs=u(te),b(K.$$.fragment,te),Ss=u(te),b(X.$$.fragment,te),te.forEach(s),Le.forEach(s),Rt=u(e),W=a(e,"H2",{class:!0});var At=r(W);Z=a(At,"A",{id:!0,class:!0,href:!0});var So=r(Z);tt=a(So,"SPAN",{});var Do=r(tt);b($e.$$.fragment,Do),Do.forEach(s),So.forEach(s),Ds=u(At),st=a(At,"SPAN",{});var zo=r(st);zs=l(zo,"ResNetForImageClassification"),zo.forEach(s),At.forEach(s),Ct=u(e),T=a(e,"DIV",{class:!0});var se=r(T);b(be.$$.fragment,se),Ls=u(se),ot=a(se,"P",{});var Lo=r(ot);Ws=l(Lo,`ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
ImageNet.`),Lo.forEach(s),Vs=u(se),ye=a(se,"P",{});var Ft=r(ye);Hs=l(Ft,"This model is a PyTorch "),Ne=a(Ft,"A",{href:!0,rel:!0});var Wo=r(Ne);Gs=l(Wo,"torch.nn.Module"),Wo.forEach(s),Us=l(Ft,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ft.forEach(s),Bs=u(se),I=a(se,"DIV",{class:!0});var oe=r(I);b(Re.$$.fragment,oe),Js=u(oe),V=a(oe,"P",{});var Ve=r(V);Ks=l(Ve,"The "),qe=a(Ve,"A",{href:!0});var Vo=r(qe);Xs=l(Vo,"ResNetForImageClassification"),Vo.forEach(s),Zs=l(Ve," forward method, overrides the "),at=a(Ve,"CODE",{});var Ho=r(at);Qs=l(Ho,"__call__"),Ho.forEach(s),Ys=l(Ve," special method."),Ve.forEach(s),eo=u(oe),b(Q.$$.fragment,oe),to=u(oe),b(Y.$$.fragment,oe),oe.forEach(s),se.forEach(s),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(aa)),c(h,"id","resnet"),c(h,"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(h,"href","#resnet"),c(_,"class","relative group"),c(H,"id","overview"),c(H,"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(H,"href","#overview"),c(O,"class","relative group"),c(re,"href","https://arxiv.org/abs/1512.03385"),c(re,"rel","nofollow"),c(ne,"href","https://catalog.ngc.nvidia.com/orgs/nvidia/resources/resnet_50_v1_5_for_pytorch"),c(ne,"rel","nofollow"),c(Ae,"href","/docs/transformers/pr_17548/en/model_doc/auto#transformers.AutoFeatureExtractor"),c(le,"href","https://arxiv.org/abs/1512.03385"),c(le,"rel","nofollow"),c(ce,"width","600"),Xo(ce.src,ro="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/resnet_architecture.png")||c(ce,"src",ro),c(de,"href","https://huggingface.co/Francesco"),c(de,"rel","nofollow"),c(fe,"href","https://github.com/KaimingHe/deep-residual-networks"),c(fe,"rel","nofollow"),c(U,"id","transformers.ResNetConfig"),c(U,"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(U,"href","#transformers.ResNetConfig"),c(q,"class","relative group"),c(Fe,"href","/docs/transformers/pr_17548/en/model_doc/resnet#transformers.ResNetModel"),c(me,"href","https://huggingface.co/microsoft/resnet-50"),c(me,"rel","nofollow"),c(Me,"href","/docs/transformers/pr_17548/en/main_classes/configuration#transformers.PretrainedConfig"),c(Pe,"href","/docs/transformers/pr_17548/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(J,"id","transformers.ResNetModel"),c(J,"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(J,"href","#transformers.ResNetModel"),c(z,"class","relative group"),c(ve,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ve,"rel","nofollow"),c(Oe,"href","/docs/transformers/pr_17548/en/model_doc/resnet#transformers.ResNetModel"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(Z,"id","transformers.ResNetForImageClassification"),c(Z,"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(Z,"href","#transformers.ResNetForImageClassification"),c(W,"class","relative group"),c(Ne,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ne,"rel","nofollow"),c(qe,"href","/docs/transformers/pr_17548/en/model_doc/resnet#transformers.ResNetForImageClassification"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,f){t(document.head,d),p(e,w,f),p(e,_,f),t(_,h),t(h,v),y(n,v,null),t(_,g),t(_,F),t(F,Mt),p(e,dt,f),p(e,O,f),t(O,H),t(H,He),y(ae,He,null),t(O,Pt),t(O,Ge),t(Ge,Ot),p(e,ft,f),p(e,E,f),t(E,qt),t(E,re),t(re,St),t(E,Dt),t(E,ne),t(ne,zt),t(E,Lt),t(E,Ue),t(Ue,Wt),t(E,Vt),t(E,Be),t(Be,Ht),t(E,Gt),t(E,Je),t(Je,Ut),t(E,Bt),p(e,pt,f),p(e,xe,f),t(xe,Jt),p(e,ht,f),p(e,Te,f),t(Te,Kt),p(e,mt,f),p(e,ke,f),t(ke,Ke),t(Ke,Xt),p(e,ut,f),p(e,je,f),t(je,Zt),p(e,gt,f),p(e,Ie,f),t(Ie,ie),t(ie,Qt),t(ie,Ae),t(Ae,Yt),t(ie,es),p(e,_t,f),p(e,G,f),t(G,ts),t(G,le),t(le,ss),t(G,os),p(e,vt,f),p(e,ce,f),p(e,wt,f),p(e,P,f),t(P,as),t(P,de),t(de,rs),t(P,ns),t(P,fe),t(fe,is),t(P,ls),p(e,$t,f),p(e,q,f),t(q,U),t(U,Xe),y(pe,Xe,null),t(q,cs),t(q,Ze),t(Ze,ds),p(e,bt,f),p(e,x,f),y(he,x,null),t(x,fs),t(x,S),t(S,ps),t(S,Fe),t(Fe,hs),t(S,ms),t(S,me),t(me,us),t(S,gs),t(x,_s),t(x,D),t(D,vs),t(D,Me),t(Me,ws),t(D,$s),t(D,Pe),t(Pe,bs),t(D,ys),t(x,Ns),y(B,x,null),p(e,yt,f),p(e,z,f),t(z,J),t(J,Qe),y(ue,Qe,null),t(z,Rs),t(z,Ye),t(Ye,Cs),p(e,Nt,f),p(e,M,f),y(ge,M,null),t(M,Es),t(M,_e),t(_e,xs),t(_e,ve),t(ve,Ts),t(_e,ks),t(M,js),t(M,j),y(we,j,null),t(j,Is),t(j,L),t(L,As),t(L,Oe),t(Oe,Fs),t(L,Ms),t(L,et),t(et,Ps),t(L,Os),t(j,qs),y(K,j,null),t(j,Ss),y(X,j,null),p(e,Rt,f),p(e,W,f),t(W,Z),t(Z,tt),y($e,tt,null),t(W,Ds),t(W,st),t(st,zs),p(e,Ct,f),p(e,T,f),y(be,T,null),t(T,Ls),t(T,ot),t(ot,Ws),t(T,Vs),t(T,ye),t(ye,Hs),t(ye,Ne),t(Ne,Gs),t(ye,Us),t(T,Bs),t(T,I),y(Re,I,null),t(I,Js),t(I,V),t(V,Ks),t(V,qe),t(qe,Xs),t(V,Zs),t(V,at),t(at,Qs),t(V,Ys),t(I,eo),y(Q,I,null),t(I,to),y(Y,I,null),Et=!0},p(e,[f]){const Ce={};f&2&&(Ce.$$scope={dirty:f,ctx:e}),B.$set(Ce);const rt={};f&2&&(rt.$$scope={dirty:f,ctx:e}),K.$set(rt);const nt={};f&2&&(nt.$$scope={dirty:f,ctx:e}),X.$set(nt);const it={};f&2&&(it.$$scope={dirty:f,ctx:e}),Q.$set(it);const Ee={};f&2&&(Ee.$$scope={dirty:f,ctx:e}),Y.$set(Ee)},i(e){Et||(N(n.$$.fragment,e),N(ae.$$.fragment,e),N(pe.$$.fragment,e),N(he.$$.fragment,e),N(B.$$.fragment,e),N(ue.$$.fragment,e),N(ge.$$.fragment,e),N(we.$$.fragment,e),N(K.$$.fragment,e),N(X.$$.fragment,e),N($e.$$.fragment,e),N(be.$$.fragment,e),N(Re.$$.fragment,e),N(Q.$$.fragment,e),N(Y.$$.fragment,e),Et=!0)},o(e){R(n.$$.fragment,e),R(ae.$$.fragment,e),R(pe.$$.fragment,e),R(he.$$.fragment,e),R(B.$$.fragment,e),R(ue.$$.fragment,e),R(ge.$$.fragment,e),R(we.$$.fragment,e),R(K.$$.fragment,e),R(X.$$.fragment,e),R($e.$$.fragment,e),R(be.$$.fragment,e),R(Re.$$.fragment,e),R(Q.$$.fragment,e),R(Y.$$.fragment,e),Et=!1},d(e){s(d),e&&s(w),e&&s(_),C(n),e&&s(dt),e&&s(O),C(ae),e&&s(ft),e&&s(E),e&&s(pt),e&&s(xe),e&&s(ht),e&&s(Te),e&&s(mt),e&&s(ke),e&&s(ut),e&&s(je),e&&s(gt),e&&s(Ie),e&&s(_t),e&&s(G),e&&s(vt),e&&s(ce),e&&s(wt),e&&s(P),e&&s($t),e&&s(q),C(pe),e&&s(bt),e&&s(x),C(he),C(B),e&&s(yt),e&&s(z),C(ue),e&&s(Nt),e&&s(M),C(ge),C(we),C(K),C(X),e&&s(Rt),e&&s(W),C($e),e&&s(Ct),e&&s(T),C(be),C(Re),C(Q),C(Y)}}}const aa={local:"resnet",sections:[{local:"overview",title:"Overview"},{local:"transformers.ResNetConfig",title:"ResNetConfig"},{local:"transformers.ResNetModel",title:"ResNetModel"},{local:"transformers.ResNetForImageClassification",title:"ResNetForImageClassification"}],title:"ResNet"};function ra(k){return Zo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class pa extends Uo{constructor(d){super();Bo(this,d,ra,oa,Jo,{})}}export{pa as default,aa as metadata};
