{"id":64455,"date":"2026-01-23T15:56:18","date_gmt":"2026-01-23T07:56:18","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/64455.html"},"modified":"2026-01-23T15:56:18","modified_gmt":"2026-01-23T07:56:18","slug":"resnet-152%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/64455.html","title":{"rendered":"ResNet-152\u8be6\u89e3"},"content":{"rendered":"<h2>1. ResNet-152\u7ed3\u6784\u603b\u89c8<\/h2>\n<p>ResNet-152\u00a0\u662f2015\u5e74He Kaiming\u7b49\u4eba\u63d0\u51fa\u7684ResNet\u5bb6\u65cf\u4e2d\u7f51\u7edc\u5c42\u6570\u6700\u591a&#xff0c;\u6027\u80fd\u6700\u5f3a\u5927\u7684\u7248\u672c\u4e4b\u4e00&#xff0c;\u5176\u6df1\u5ea6\u4e3a152\u5c42&#xff0c;\u6838\u5fc3\u521b\u65b0\u662f\u91c7\u7528\u4e86\u74f6\u9888\u6b8b\u5dee\u5757&#xff08;Bottleneck Block&#xff09;&#xff0c;\u5806\u53e0\u5c42\u6570\u6781\u6df1\u4f46\u6613\u4e8e\u4f18\u5316\u3002ResNet-152\u5e7f\u6cdb\u7528\u4e8e\u56fe\u50cf\u8bc6\u522b\u3001\u68c0\u6d4b\u7b49\u5404\u7c7bCV\u4efb\u52a1\u4e2d&#xff0c;\u7ecf\u5e38\u4f5c\u4e3a\u5927\u578b\u6570\u636e\u96c6\u5982ImageNet\u7684\u4e3b\u529b\u9aa8\u5e72\u7f51\u7edc\u3002<\/p>\n<hr \/>\n<h2>2. \u6574\u4f53\u7f51\u7edc\u7ed3\u6784<\/h2>\n<p>\u4ee5ImageNet\u8f93\u5165&#xff08;224\u00d7224 RGB\u56fe\u7247&#xff09;\u4e3a\u4f8b&#xff0c;ResNet-152\u7ed3\u6784\u5982\u4e0b&#xff1a;<\/p>\n<p>Input: 224\u00d7224\u00d73<\/p>\n<p>1. conv1: 7\u00d77\u5377\u79ef, 64\u901a\u9053, \u6b65\u957f2, padding&#061;3<br \/>\n2. maxpool: 3\u00d73, \u6b65\u957f2<\/p>\n<p>&#061;&#061;&#061;&#061; Stage1 &#061;&#061;&#061;&#061;<br \/>\n3. layer1: 64 \u2192 256\u901a\u9053&#xff0c;\u5806\u53e03\u4e2aBottleneck Block<\/p>\n<p>&#061;&#061;&#061;&#061; Stage2 &#061;&#061;&#061;&#061;<br \/>\n4. layer2: 256 \u2192 512\u901a\u9053&#xff0c;\u5806\u53e08\u4e2aBottleneck Block<\/p>\n<p>&#061;&#061;&#061;&#061; Stage3 &#061;&#061;&#061;&#061;<br \/>\n5. layer3: 512 \u2192 1024\u901a\u9053&#xff0c;\u5806\u53e036\u4e2aBottleneck Block<\/p>\n<p>&#061;&#061;&#061;&#061; Stage4 &#061;&#061;&#061;&#061;<br \/>\n6. layer4: 1024 \u2192 2048\u901a\u9053&#xff0c;\u5806\u53e03\u4e2aBottleneck Block<\/p>\n<p>7. global average pooling<br \/>\n8. fully connected layer&#xff08;1000\u5206\u7c7b&#xff09;<\/p>\n<p>\u8f93\u51fa&#xff1a;1000\u7ef4\u5206\u7c7b\u7ed3\u679c&#xff08;ImageNet&#xff09;<\/p>\n<hr \/>\n<h2 style=\"background-color:transparent\">3. \u5404\u9636\u6bb5Bottleneck Block\u7ed3\u6784<\/h2>\n<p>\u6bcf\u4e2aBottleneck Block\u7531\u4e09\u5c42\u5377\u79ef\u7ec4\u6210&#xff1a;<\/p>\n<ul>\n<li>1\u00d71\u5377\u79ef&#xff1a;\u964d\u7ef4&#xff0c;\u51cf\u5c11\u901a\u9053\u6570<\/li>\n<li>3\u00d73\u5377\u79ef&#xff1a;\u4e3b\u8981\u7684\u8ba1\u7b97<\/li>\n<li>1\u00d71\u5377\u79ef&#xff1a;\u5347\u7ef4&#xff0c;\u6062\u590d\u901a\u9053\u6570<\/li>\n<li>\u6b8b\u5dee\u8fde\u63a5&#xff1a;\u8f93\u5165\u76f4\u63a5\u8df3\u8dc3\u5230\u8f93\u51fa&#xff08;\u5fc5\u8981\u65f6\u75281\u00d71\u5377\u79ef\u5339\u914dshape&#xff09;<\/li>\n<\/ul>\n<p>\u5178\u578b\u4ee5layer2\u4e2d\u7684Bottleneck&#xff08;\u8f93\u5165256\u901a\u9053\u4e3a\u4f8b&#xff09;\u4e3a\u4f8b&#xff1a;<\/p>\n<li>1\u00d71\u5377\u79ef&#xff0c;256\u2192128<\/li>\n<li>3\u00d73\u5377\u79ef&#xff0c;128\u2192128<\/li>\n<li>1\u00d71\u5377\u79ef&#xff0c;128\u2192512<\/li>\n<li>\u6b8b\u5dee\u76f8\u52a0&#xff08;\u82e5\u8f93\u5165256&#xff0c;\u8f93\u51fa512&#xff0c;\u5219\u65c1\u8def\u4e5f1\u00d71\u5377\u79ef\u5347\u7ef4&#xff09;<\/li>\n<p>\u6bcf\u4e2aBottleneck Block\u89c6\u4e3a3\u5c42&#xff0c;\u6574\u7f51\u6709&#xff1a;<br \/>\n$(3&#043;8&#043;36&#043;3)\u00d73&#043;2(conv1\u00a0&#043;\u00a0fc)&#061;152(3&#043;8&#043;36&#043;3)\u00d73&#043;2(conv1\u00a0&#043;\u00a0fc)&#061;152$<br \/>\n\u5176\u4e2d\u6bcf\u4e2astage\u7684block\u5c42\u6570\u4e58\u4ee53&#xff0c;conv1\u548cfc\u54041\u5c42\u3002<\/p>\n<hr \/>\n<h2 style=\"background-color:transparent\">4. \u5404\u9636\u6bb5\u8be6\u7ec6\u53c2\u6570\u5206\u5e03<\/h2>\n<table>\n<tr>StageOutput SizeBlock\u6570\u5377\u79ef\u6bcf\u5757\u7ed3\u6784\u901a\u9053\u53d8\u5316<\/tr>\n<tbody>\n<tr>\n<td>conv1<\/td>\n<td>112\u00d7112<\/td>\n<td>1<\/td>\n<td>7\u00d77, 64, stride 2<\/td>\n<td>3\u219264<\/td>\n<\/tr>\n<tr>\n<td>maxpool<\/td>\n<td>56\u00d756<\/td>\n<td>1<\/td>\n<td>3\u00d73, stride 2<\/td>\n<td>64<\/td>\n<\/tr>\n<tr>\n<td>layer1<\/td>\n<td>56\u00d756<\/td>\n<td>3<\/td>\n<td>1\u00d71,64\u219264; 3\u00d73,64; 1\u00d71,256<\/td>\n<td>64\u2192256<\/td>\n<\/tr>\n<tr>\n<td>layer2<\/td>\n<td>28\u00d728<\/td>\n<td>8<\/td>\n<td>1\u00d71,256\u2192128; 3\u00d73,128; 1\u00d71,512<\/td>\n<td>256\u2192512<\/td>\n<\/tr>\n<tr>\n<td>layer3<\/td>\n<td>14\u00d714<\/td>\n<td>36<\/td>\n<td>1\u00d71,512\u2192256; 3\u00d73,256; 1\u00d71,1024<\/td>\n<td>512\u21921024<\/td>\n<\/tr>\n<tr>\n<td>layer4<\/td>\n<td>7\u00d77<\/td>\n<td>3<\/td>\n<td>1\u00d71,1024\u2192512; 3\u00d73,512; 1\u00d71,2048<\/td>\n<td>1024\u21922048<\/td>\n<\/tr>\n<tr>\n<td>avgpool<\/td>\n<td>1\u00d71<\/td>\n<td>1<\/td>\n<td>Global average pooling<\/td>\n<td>2048<\/td>\n<\/tr>\n<tr>\n<td>fc<\/td>\n<td>1\u00d71<\/td>\n<td>1<\/td>\n<td>\u8f93\u51fa1000\u7c7b<\/td>\n<td>2048\u21921000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2 style=\"background-color:transparent\">5. \u7ed3\u6784\u56fe\u793a\u610f<\/h2>\n<p>Input<br \/>\n  \u2193<br \/>\n[conv1] \u2192 [maxpool]<br \/>\n  \u2193<br \/>\n[layer1: 3 \u00d7 bottleneck]<br \/>\n  \u2193<br \/>\n[layer2: 8 \u00d7 bottleneck]<br \/>\n  \u2193<br \/>\n[layer3: 36 \u00d7 bottleneck]<br \/>\n  \u2193<br \/>\n[layer4: 3 \u00d7 bottleneck]<br \/>\n  \u2193<br \/>\n[avgpool] \u2192 [fc]<br \/>\n  \u2193<br \/>\nOutput<\/p>\n<hr \/>\n<h2 style=\"background-color:transparent\">6. PyTorch\u4f2a\u4ee3\u7801\u6846\u67b6<\/h2>\n<p>\u00a0\n<\/p>\n<p>import torch.nn as nn<br \/>\nclass Bottleneck(nn.Module):<br \/>\n    expansion &#061; 4  # \u8f93\u51fa\u901a\u9053\u6570\u901a\u5e38\u662f\u8f93\u5165\u76844\u500d<\/p>\n<p>    def __init__(self, in_channels, mid_channels, stride&#061;1, downsample&#061;None):<br \/>\n        super(Bottleneck, self).__init__()<br \/>\n        self.conv1 &#061; nn.Conv2d(in_channels, mid_channels, 1, bias&#061;False)<br \/>\n        self.bn1 &#061; nn.BatchNorm2d(mid_channels)<br \/>\n        self.conv2 &#061; nn.Conv2d(mid_channels, mid_channels, 3, stride&#061;stride, padding&#061;1, bias&#061;False)<br \/>\n        self.bn2 &#061; nn.BatchNorm2d(mid_channels)<br \/>\n        self.conv3 &#061; nn.Conv2d(mid_channels, mid_channels * self.expansion, 1, bias&#061;False)<br \/>\n        self.bn3 &#061; nn.BatchNorm2d(mid_channels * self.expansion)<br \/>\n        self.relu &#061; nn.ReLU(inplace&#061;True)<br \/>\n        self.downsample &#061; downsample<br \/>\n    def forward(self, x):<br \/>\n        identity &#061; x if self.downsample is None else self.downsample(x)<br \/>\n        out &#061; self.relu(self.bn1(self.conv1(x)))<br \/>\n        out &#061; self.relu(self.bn2(self.conv2(out)))<br \/>\n        out &#061; self.bn3(self.conv3(out))<br \/>\n        out &#043;&#061; identity<br \/>\n        out &#061; self.relu(out)<br \/>\n        return out<\/p>\n<hr \/>\n<h2 style=\"background-color:transparent\">7. ResNet-152\u5728\u5de5\u4e1a\u754c\/\u79d1\u7814\u4e2d\u7684\u5e38\u7528\u573a\u666f<\/h2>\n<ul>\n<li>\u5927\u89c4\u6a21\u56fe\u50cf\u5206\u7c7b\u4efb\u52a1<\/li>\n<li>\u4f5c\u4e3a\u6df1\u5ea6\u5b66\u4e60\u4efb\u52a1&#xff08;\u68c0\u6d4b\u3001\u5206\u5272\u7b49&#xff09;\u7684\u9aa8\u5e72\u7279\u5f81\u63d0\u53d6\u7f51\u7edc<\/li>\n<li>\u8fc1\u79fb\u5b66\u4e60&#xff0c;\u4f5c\u4e3a\u9884\u8bad\u7ec3\u6a21\u578b\u5728\u533b\u5b66\u5f71\u50cf\u3001\u536b\u661f\u56fe\u50cf\u7b49\u9ad8\u96be\u9886\u57df\u5fae\u8c03<\/li>\n<li>\u5e38\u4f5c\u4e3abenchmark\u4e0e\u5176\u4ed6\u6a21\u578b\u516c\u5e73\u5bf9\u6bd4<\/li>\n<\/ul>\n<hr \/>\n<h2 style=\"background-color:transparent\">8. \u4e3b\u8981\u7279\u70b9\u53ca\u4f18\u52bf<\/h2>\n<ul>\n<li>\u6781\u6df1&#xff08;152\u5c42&#xff09;\u4f46\u6613\u4e8e\u8bad\u7ec3&#xff0c;\u5f52\u529f\u4e8e\u6b8b\u5dee\u7ed3\u6784<\/li>\n<li>\u6027\u80fd\u5f3a\u5927&#xff0c;ImageNet Top1\u51c6\u786e\u7387\u7ea677.8%<\/li>\n<li>\u652f\u6301\u66f4\u590d\u6742\u66f4\u7ec6\u81f4\u7684\u7279\u5f81\u5b66\u4e60<\/li>\n<li>\u9884\u8bad\u7ec3\u6743\u91cd\u5e7f\u6cdb\u53ef\u7528<\/li>\n<\/ul>\n<hr \/>\n<h2 style=\"background-color:transparent\">9. \u5c40\u9650\u6027<\/h2>\n<ul>\n<li>\u8ba1\u7b97\u91cf\u5927&#xff0c;\u5bf9\u663e\u5b58\/\u7b97\u529b\u8981\u6c42\u9ad8<\/li>\n<li>\u8bad\u7ec3\/\u63a8\u7406\u901f\u5ea6\u6162\u4e8eResNet-50\u7b49<\/li>\n<\/ul>\n<hr \/>\n<h2 style=\"background-color:transparent\">10. ResNet-152 \u6b8b\u5dee\u5757\u53c2\u6570\u8be6\u89e3<\/h2>\n<p>ResNet-152\u7684\u6838\u5fc3\u662f\u201cBottleneck Block\u201d&#xff0c;\u4ee5 layer3 \u7684\u4e00\u4e2a block \u4e3a\u4f8b\u8bf4\u660e\u53c2\u6570\u5206\u5e03\u548c\u6570\u636e\u6d41&#xff1a;<\/p>\n<p>\u5047\u8bbe\u8f93\u5165\u901a\u9053\u6570\u4e3a 512&#xff0c;\u8f93\u51fa\u901a\u9053\u6570\u4e3a 2048&#xff08;expansion&#061;4&#xff09;\u3002<\/p>\n<ul>\n<li>\u7b2c\u4e00\u5c42 1&#215;1\u5377\u79ef&#xff08;\u964d\u7ef4&#xff09;&#xff1a;<br \/>\n\u8f93\u5165 512 \u901a\u9053 \u2192 \u8f93\u51fa 512 \u901a\u9053<br \/>\n\u53c2\u6570\u6570\u91cf&#xff1a;1\u00d71\u00d7512\u00d7512&#061;262,1441\u00d71\u00d7512\u00d7512&#061;262,144<\/li>\n<li>\u7b2c\u4e8c\u5c42 3&#215;3\u5377\u79ef&#xff08;\u5904\u7406\u7279\u5f81&#xff09;&#xff1a;<br \/>\n\u8f93\u5165 512 \u901a\u9053 \u2192 \u8f93\u51fa 512 \u901a\u9053<br \/>\n\u53c2\u6570\u6570\u91cf&#xff1a;3\u00d73\u00d7512\u00d7512&#061;2,359,2963\u00d73\u00d7512\u00d7512&#061;2,359,296<\/li>\n<li>\u7b2c\u4e09\u5c42 1&#215;1\u5377\u79ef&#xff08;\u5347\u7ef4&#xff09;&#xff1a;<br \/>\n\u8f93\u5165 512 \u901a\u9053 \u2192 \u8f93\u51fa 2048 \u901a\u9053<br \/>\n\u53c2\u6570\u6570\u91cf&#xff1a;1\u00d71\u00d7512\u00d72048&#061;1,048,5761\u00d71\u00d7512\u00d72048&#061;1,048,576<\/li>\n<li>\u4e0b\u91c7\u6837\u5206\u652f&#xff08;\u5982\u679c stride &gt; 1 \u6216\u901a\u9053\u6570\u4e0d\u540c&#xff09;&#xff1a;1&#215;1\u5377\u79ef\u8fdb\u884c\u5347\/\u964d\u7ef4\u5339\u914d\u3002<\/li>\n<\/ul>\n<p>\u6bcf\u4e2a block \u8fd8\u4f1a\u914d\u5408 BatchNorm\u3001ReLU\u3002<\/p>\n<p>\u5178\u578b Bottleneck block \u603b\u53c2\u6570\u7ea6\u5728 3-4 \u767e\u4e07\u3002<br \/>\n\u5176\u4e2d layer3 \u517136\u4e2a block&#xff0c;\u53c2\u6570\u91cf\u6781\u5927\u3002\u800c\u6574\u4e2aResNet152\u53c2\u6570\u91cf\u5927\u7ea6\u4e3a\u00a060M&#xff08;\u516d\u5343\u4e07&#xff09;\u3002<\/p>\n<hr \/>\n<h2 style=\"background-color:transparent\">11. \u6b8b\u5dee\u8fde\u63a5\u7684\u4f18\u52bf\u518d\u89e3\u91ca<\/h2>\n<ul>\n<li>\u5141\u8bb8\u7f51\u7edc\u201c\u8df3\u8fc7\u201d\u90e8\u5206\u5c42&#xff0c;\u82e5\u67d0\u4e9b\u5c42\u65e0\u7528&#xff0c;\u6b8b\u5dee\u8fde\u63a5\u53ef\u8ba9\u68af\u5ea6\u76f4\u63a5\u6d41\u8fc7&#xff1b;\u8fd9\u4f7f\u5f97\u5373\u4f7f\u5c42\u6570\u6781\u6df1\u4f9d\u7136\u53ef\u8bad\u7ec3\u3002<\/li>\n<li>\u9047\u5230\u68af\u5ea6\u6d88\u5931\u95ee\u9898\u65f6&#xff0c;\u68af\u5ea6\u53ef\u901a\u8fc7shortcut\u6d41\u5411\u6d45\u5c42\u3002<\/li>\n<li>\u63d0\u9ad8\u8eab\u4efd\u6620\u5c04\u80fd\u529b&#xff0c;\u8ba9\u6df1\u5c42\u7f51\u7edc\u53ef\u62df\u5408\u66f4\u590d\u6742\u5173\u7cfb&#xff0c;\u4f46\u4e5f\u53ef\u4ee5\u65b9\u4fbf\u5730\u9000\u5316\u4e3a\u4f4e\u5c42\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2 style=\"background-color:transparent\">12. ResNet-152 \u7684\u8bad\u7ec3\u6280\u5de7<\/h2>\n<ul>\n<li>\u6743\u91cd\u9884\u5904\u7406\u56e0\u7f51\u7edc\u6df1\u5ea6&#xff0c;\u5efa\u8bae\u7528He\u521d\u59cb\u5316&#xff0b;BN<\/li>\n<li>\u6570\u636e\u589e\u5f3a&#xff1a;\u5e38\u7528\u8f83\u5f3a\u7684\u6570\u636e\u589e\u5f3a&#xff0c;\u4f8b\u5982random crop\u3001flip\u3001color jitter\u7b49<\/li>\n<li>\u4f18\u5316\u5668&#xff1a;SGD &#043; momentum&#xff08;\u59820.9&#xff09;\u3001weight decay&#xff08;\u59821e-4&#xff09;<\/li>\n<li>\u5b66\u4e60\u7387\u7b56\u7565&#xff1a;step decay\u6216cosine decay<\/li>\n<li>\u68af\u5ea6\u7d2f\u79ef\/\u6df7\u5408\u7cbe\u5ea6&#xff1a;\u5982\u679c\u663e\u5b58\u4e0d\u8db3\u53ef\u4f7f\u7528\u68af\u5ea6\u7d2f\u79ef\u6216AMP<\/li>\n<li>batch size&#xff1a;\u63a8\u8350\u8f83\u5927&#xff08;\u598232\/64&#xff09;&#xff0c;\u53ef\u63d0\u5347\u6536\u655b\u6027\u548c\u6cdb\u5316<\/li>\n<\/ul>\n<hr \/>\n<h2 style=\"background-color:transparent\">13. \u6d88\u878d\u5b9e\u9a8c \u53ca\u6027\u80fd\u5bf9\u6bd4<\/h2>\n<p>\u8bba\u6587\u4ee5\u53ca\u540e\u7eed\u7814\u7a76\u4e2d&#xff0c;\u5178\u578b\u6d88\u878d\u5b9e\u9a8c\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>\u65e0\u6b8b\u5dee\u8fde\u63a5\u7684\u6781\u6df1\u7f51\u7edc&#xff1a;\u6df1\u5c42\u65f6\u51c6\u786e\u7387\u4e0b\u964d\u3001\u8bad\u7ec3\u635f\u5931\u4e0a\u5347<\/li>\n<li>\u6709\u6b8b\u5dee\u8fde\u63a5&#xff1a;\u53ef\u6301\u7eed\u589e\u957f\u7cbe\u5ea6&#xff0c;152\u5c42\u8bad\u7ec3\u4e0e34\u5c42\u51e0\u4e4e\u4e00\u81f4<\/li>\n<li>\u6b8b\u5dee\u5757\u7c7b\u578b\u5bf9\u6bd4&#xff1a;Bottleneck\u7ed3\u6784\u53ef\u63a7\u53c2\u6570\u91cf&#xff0c;\u6027\u80fd\u66f4\u4f18<\/li>\n<li>\u5c42\u6570\u53d8\u5316&#xff1a;ResNet-18\/34\/50\/101\/152\u51c6\u786e\u7387\u9012\u589e\u4f46\u53c2\u6570\u548c\u8ba1\u7b97\u4e5f\u9012\u589e<\/li>\n<\/ul>\n<p>\u90e8\u5206\u51c6\u786e\u7387&#xff08;Top-1 ImageNet&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u7f51\u7edc\u5c42\u6570Top-1 (%)Top-5 (%)\u53c2\u6570\u91cf<\/tr>\n<tbody>\n<tr>\n<td>ResNet-50<\/td>\n<td>~76.0<\/td>\n<td>~93.0<\/td>\n<td>25.6M<\/td>\n<\/tr>\n<tr>\n<td>ResNet-101<\/td>\n<td>~77.0<\/td>\n<td>~93.7<\/td>\n<td>44.6M<\/td>\n<\/tr>\n<tr>\n<td>ResNet-152<\/td>\n<td>~77.8<\/td>\n<td>~94.1<\/td>\n<td>60.2M<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\u53ef\u4ee5\u770b\u51faResNet-152\u6bd4ResNet-50\/101\u7565\u4f18&#xff0c;\u4f46\u53c2\u6570\u7ffb\u500d&#xff0c;\u8bad\u7ec3\u63a8\u7406\u6162\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2 style=\"background-color:transparent\">14. \u8fc1\u79fb\u5b66\u4e60\u4e0e\u5b9e\u9645\u573a\u666f\u5e94\u7528<\/h2>\n<ul>\n<li>\u5e38\u7528\u505aImageNet\u9884\u8bad\u7ec3\u9aa8\u5e72&#xff0c;\u8fc1\u79fb\u5230\u5206\u5272\u3001\u68c0\u6d4b\u3001\u533b\u5b66\u5f71\u50cf\u3001\u9065\u611f\u3001\u56fe\u50cf\u68c0\u7d22\u7b49\u591a\u9886\u57df<\/li>\n<li>\u5728\u6df1\u5ea6\u4eba\u8138\u8bc6\u522b\u3001\u5927\u89c4\u6a21\u573a\u666f\u5206\u7c7b\u7b49\u7cbe\u5ea6\u9700\u6c42\u9ad8\u573a\u666f\u5e7f\u6cdb\u5e94\u7528<\/li>\n<li>\u901a\u8fc7\u5fae\u8c03&#xff08;fine-tune&#xff09;&#xff0c;ResNet-152\u53ef\u6709\u6548\u9002\u5e94\u5c0f\u6570\u636e\u96c6\u6216\u7279\u6b8a\u9886\u57df<\/li>\n<\/ul>\n<hr \/>\n<h2 style=\"background-color:transparent\">15. \u4ee3\u7801\u8c03\u7528&#xff08;\u9884\u8bad\u7ec3\u6a21\u578b&#xff09;<\/h2>\n<p>\u5728PyTorch\u4e2d&#xff0c;\u76f4\u63a5\u8fd9\u6837\u8c03\u7528\u9884\u8bad\u7ec3\u6a21\u578b&#xff1a;<\/p>\n<p>import torchvision.models as models<br \/>\nresnet152 &#061; models.resnet152(pretrained&#061;True)<br \/>\nout &#061; resnet152(input_image)  # input_image: [batch, 3, 224, 224]<\/p>\n<p>\u5982\u9700\u51bb\u7ed3\u9aa8\u5e72\u6216\u63d0\u53d6\u7279\u5f81&#xff1a;<\/p>\n<p>features &#061; resnet152.conv1(input)<br \/>\nfor layer in [resnet152.layer1, resnet152.layer2, resnet152.layer3, resnet152.layer4]:<br \/>\n    features &#061; layer(features)<\/p>\n<hr \/>\n<h2 style=\"background-color:transparent\">16. \u6ce8\u610f\u4e8b\u9879\u4e0e\u4f18\u5316\u5efa\u8bae<\/h2>\n<ul>\n<li>\u63a8\u7406\u901f\u5ea6\u6162&#xff1a;\u53ef\u7528ResNet-50\u505a\u9ad8\u6548\u7387\u7248\u672c<\/li>\n<li>\u663e\u5b58\u538b\u529b\u5927&#xff1a;\u63a8\u835016GB\u4ee5\u4e0a\u663e\u5361<\/li>\n<li>\u53ef\u526a\u679d\u3001\u91cf\u5316\u3001\u84b8\u998f&#xff1a;\u82e5\u90e8\u7f72\u5728\u5b9e\u9645\u5e94\u7528\u53ef\u8fdb\u4e00\u6b65\u4f18\u5316\u6a21\u578b\u89c4\u6a21<\/li>\n<\/ul>\n<hr \/>\n<h2 style=\"background-color:transparent\">17. \u76f8\u5173\u7ecf\u5178\u8bba\u6587<\/h2>\n<ul>\n<li>He Kaiming, et al, \u201cDeep Residual Learning for Image Recognition\u201d, CVPR2016 &#xff08;ResNet\u539f\u6587&#xff09;<\/li>\n<li>He Kaiming, et al, \u201cIdentity Mappings in Deep Residual Networks\u201d, ECCV2016 &#xff08;pre-activation\u65b9\u6848&#xff09;<\/li>\n<\/ul>\n<hr \/>\n<h2 style=\"background-color:transparent\">18. \u603b\u7ed3<\/h2>\n<p>ResNet-152\u662f\u6781\u6df1\u5377\u79ef\u7f51\u7edc\u7684\u5178\u578b\u4ee3\u8868&#xff0c;\u5176\u6b8b\u5dee\u7ed3\u6784\u4fdd\u8bc1\u4e86\u8d85\u6df1\u7f51\u7edc\u7684\u53ef\u8bad\u7ec3\u6027\u548c\u6cdb\u5316\u6027\u80fd&#xff0c;\u662f\u6df1\u5ea6\u89c6\u89c9\u9886\u57df\u57fa\u7840\u7f51\u7edc\u4e4b\u4e00\u3002<\/p>\n<p>ResNet-152\u4f5c\u4e3aResNet\u5bb6\u65cf\u7684\u201c\u8d85\u7ea7\u6df1\u201d\u4ee3\u8868&#xff0c;\u901a\u8fc7\u6b8b\u5dee\u8fde\u63a5\u548c\u74f6\u9888\u7ed3\u6784&#xff0c;\u65e2\u4fdd\u8bc1\u4e86\u5f3a\u5927\u7279\u5f81\u63d0\u53d6\u80fd\u529b\u53c8\u53ef\u4ee5\u7a33\u5b9a\u8bad\u7ec3&#xff0c;\u662f\u5927\u89c4\u6a21\u89c6\u89c9\u4efb\u52a1\u4e2d\u7684\u7ecf\u5178\u201c\u9aa8\u5e72\u7f51\u7edc\u201d<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. ResNet-152\u7ed3\u6784\u603b\u89c8ResNet-152\u00a0\u662f2015\u5e74He Kaiming\u7b49\u4eba\u63d0\u51fa\u7684ResNet\u5bb6\u65cf\u4e2d\u7f51\u7edc\u5c42\u6570\u6700\u591a&#xff0c;\u6027\u80fd\u6700\u5f3a\u5927\u7684\u7248\u672c\u4e4b\u4e00&#xff0c;\u5176\u6df1\u5ea6\u4e3a152\u5c42&#xff0c;\u6838\u5fc3\u521b\u65b0\u662f\u91c7\u7528\u4e86\u74f6\u9888\u6b8b\u5dee\u5757&#xff08;Bottleneck Block&#xff09;&#xff0c;\u5806\u53e0\u5c42\u6570\u6781\u6df1\u4f46\u6613\u4e8e\u4f18\u5316\u3002ResNet-152\u5e7f\u6cdb\u7528\u4e8e\u56fe\u50cf\u8bc6\u522b\u3001\u68c0\u6d4b\u7b49\u5404\u7c7bCV\u4efb\u52a1\u4e2d&#xff0c;\u7ecf\u5e38\u4f5c\u4e3a\u5927\u578b\u6570\u636e\u96c6\u5982ImageNet\u7684\u4e3b\u529b\u9aa8\u5e72\u7f51\u7edc\u30022. \u6574\u4f53\u7f51<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6819],"topic":[],"class_list":["post-64455","post","type-post","status-publish","format-standard","hentry","category-server","tag-resnet"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ResNet-152\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/64455.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ResNet-152\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"1. ResNet-152\u7ed3\u6784\u603b\u89c8ResNet-152\u00a0\u662f2015\u5e74He Kaiming\u7b49\u4eba\u63d0\u51fa\u7684ResNet\u5bb6\u65cf\u4e2d\u7f51\u7edc\u5c42\u6570\u6700\u591a&#xff0c;\u6027\u80fd\u6700\u5f3a\u5927\u7684\u7248\u672c\u4e4b\u4e00&#xff0c;\u5176\u6df1\u5ea6\u4e3a152\u5c42&#xff0c;\u6838\u5fc3\u521b\u65b0\u662f\u91c7\u7528\u4e86\u74f6\u9888\u6b8b\u5dee\u5757&#xff08;Bottleneck Block&#xff09;&#xff0c;\u5806\u53e0\u5c42\u6570\u6781\u6df1\u4f46\u6613\u4e8e\u4f18\u5316\u3002ResNet-152\u5e7f\u6cdb\u7528\u4e8e\u56fe\u50cf\u8bc6\u522b\u3001\u68c0\u6d4b\u7b49\u5404\u7c7bCV\u4efb\u52a1\u4e2d&#xff0c;\u7ecf\u5e38\u4f5c\u4e3a\u5927\u578b\u6570\u636e\u96c6\u5982ImageNet\u7684\u4e3b\u529b\u9aa8\u5e72\u7f51\u7edc\u30022. \u6574\u4f53\u7f51\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/64455.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-23T07:56:18+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64455.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/64455.html\",\"name\":\"ResNet-152\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-23T07:56:18+00:00\",\"dateModified\":\"2026-01-23T07:56:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/64455.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/64455.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64455.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ResNet-152\u8be6\u89e3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ResNet-152\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/64455.html","og_locale":"zh_CN","og_type":"article","og_title":"ResNet-152\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"1. ResNet-152\u7ed3\u6784\u603b\u89c8ResNet-152\u00a0\u662f2015\u5e74He Kaiming\u7b49\u4eba\u63d0\u51fa\u7684ResNet\u5bb6\u65cf\u4e2d\u7f51\u7edc\u5c42\u6570\u6700\u591a&#xff0c;\u6027\u80fd\u6700\u5f3a\u5927\u7684\u7248\u672c\u4e4b\u4e00&#xff0c;\u5176\u6df1\u5ea6\u4e3a152\u5c42&#xff0c;\u6838\u5fc3\u521b\u65b0\u662f\u91c7\u7528\u4e86\u74f6\u9888\u6b8b\u5dee\u5757&#xff08;Bottleneck Block&#xff09;&#xff0c;\u5806\u53e0\u5c42\u6570\u6781\u6df1\u4f46\u6613\u4e8e\u4f18\u5316\u3002ResNet-152\u5e7f\u6cdb\u7528\u4e8e\u56fe\u50cf\u8bc6\u522b\u3001\u68c0\u6d4b\u7b49\u5404\u7c7bCV\u4efb\u52a1\u4e2d&#xff0c;\u7ecf\u5e38\u4f5c\u4e3a\u5927\u578b\u6570\u636e\u96c6\u5982ImageNet\u7684\u4e3b\u529b\u9aa8\u5e72\u7f51\u7edc\u30022. \u6574\u4f53\u7f51","og_url":"https:\/\/www.wsisp.com\/helps\/64455.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-23T07:56:18+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/64455.html","url":"https:\/\/www.wsisp.com\/helps\/64455.html","name":"ResNet-152\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-23T07:56:18+00:00","dateModified":"2026-01-23T07:56:18+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/64455.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/64455.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/64455.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"ResNet-152\u8be6\u89e3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=64455"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64455\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=64455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=64455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=64455"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=64455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}