{"id":33232,"date":"2025-04-27T02:52:55","date_gmt":"2025-04-26T18:52:55","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/33232.html"},"modified":"2025-04-27T02:52:55","modified_gmt":"2025-04-26T18:52:55","slug":"%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0-%e8%a7%86%e8%a7%89%e5%a4%84%e7%90%86cnn-day_01","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/33232.html","title":{"rendered":"\u6df1\u5ea6\u5b66\u4e60 \u89c6\u89c9\u5904\u7406(CNN) day_01"},"content":{"rendered":"<h2>1.\u00a0CNN\u00a0\u6982\u8ff0<\/h2>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u89c6\u89c9\u5904\u7406\u4e09\u5927\u4efb\u52a1&#xff1a;\u56fe\u50cf\u5206\u7c7b\u3001\u76ee\u6807\u68c0\u6d4b\u3001\u56fe\u50cf\u5206\u5272<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u4e0a\u6e38&#xff1a;\u63d0\u53d6\u7279\u5f81&#xff0c;CNN<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u4e0b\u6e38&#xff1a;\u5206\u7c7b\u3001\u76ee\u6807\u3001\u5206\u5272\u7b49&#xff0c;\u5177\u4f53\u7684\u4e1a\u52a1<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u662f\u6df1\u5ea6\u5b66\u4e60\u5728\u8ba1\u7b97\u673a\u89c6\u89c9\u9886\u57df\u7684\u7a81\u7834\u6027\u6210\u679c\u3002\u5728\u8ba1\u7b97\u673a\u89c6\u89c9\u9886\u57df, \u5f80\u5f80\u6211\u4eec\u8f93\u5165\u7684\u56fe\u50cf\u90fd\u5f88\u5927&#xff0c;\u4f7f\u7528\u5168\u8fde\u63a5\u7f51\u7edc\u7684\u8bdd&#xff0c;\u8ba1\u7b97\u7684\u4ee3\u4ef7\u8f83\u9ad8\u3002\u53e6\u5916\u56fe\u50cf\u4e5f\u5f88\u96be\u4fdd\u7559\u539f\u6709\u7684\u7279\u5f81&#xff0c;\u5bfc\u81f4\u56fe\u50cf\u5904\u7406\u7684\u51c6\u786e\u7387\u4e0d\u9ad8\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5377\u79ef\u795e\u7ecf\u7f51\u7edc&#xff08;Convolutional Neural Network&#xff0c;CNN&#xff09;\u662f\u4e00\u79cd\u4e13\u95e8\u7528\u4e8e\u5904\u7406\u5177\u6709\u7f51\u683c\u72b6\u7ed3\u6784\u6570\u636e\u7684\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\u3002\u6700\u521d&#xff0c;CNN\u4e3b\u8981\u5e94\u7528\u4e8e\u8ba1\u7b97\u673a\u89c6\u89c9\u4efb\u52a1&#xff0c;\u4f46\u5b83\u7684\u6210\u529f\u542f\u53d1\u4e86\u5728\u5176\u4ed6\u9886\u57df\u5e94\u7528&#xff0c;\u5982\u81ea\u7136\u8bed\u8a00\u5904\u7406\u7b49\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5377\u79ef\u795e\u7ecf\u7f51\u7edc&#xff08;Convolutional Neural Network&#xff09;\u662f\u542b\u6709\u5377\u79ef\u5c42\u7684\u795e\u7ecf\u7f51\u7edc. \u5377\u79ef\u5c42\u7684\u4f5c\u7528\u5c31\u662f\u7528\u6765\u81ea\u52a8\u5b66\u4e60\u3001\u63d0\u53d6\u56fe\u50cf\u7684\u7279\u5f81\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u4e3b\u8981\u6709\u4e09\u90e8\u5206\u6784\u6210&#xff1a;\u5377\u79ef\u5c42\u3001\u6c60\u5316\u5c42\u548c\u5168\u8fde\u63a5\u5c42\u6784\u6210&#xff0c;\u5176\u4e2d\u5377\u79ef\u5c42\u8d1f\u8d23\u63d0\u53d6\u56fe\u50cf\u4e2d\u7684\u5c40\u90e8\u7279\u5f81&#xff1b;\u6c60\u5316\u5c42\u7528\u6765\u5927\u5e45\u964d\u4f4e\u8fd0\u7b97\u91cf\u5e76\u7279\u5f81\u589e\u5f3a&#xff1b;\u5168\u8fde\u63a5\u5c42\u7c7b\u4f3c\u795e\u7ecf\u7f51\u7edc\u7684\u90e8\u5206&#xff0c;\u7528\u6765\u8f93\u51fa\u60f3\u8981\u7684\u7ed3\u679c\u3002<\/p>\n<h3>1.1\u00a0\u4f7f\u7528\u573a\u666f<\/h3>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"302\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185248-680d2b80c715b.png\" width=\"880\" \/><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"321\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185249-680d2b811e418.png\" width=\"880\" \/><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"247\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185249-680d2b816ee30.png\" width=\"880\" \/><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"281\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185249-680d2b81aff32.png\" width=\"880\" \/><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"380\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185249-680d2b81f24d5.png\" width=\"880\" \/><\/p>\n<h3>1.2 \u4e0e\u4f20\u7edf\u7f51\u7edc\u7684\u533a\u522b<\/h3>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"214\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185250-680d2b824d7d5.png\" width=\"880\" \/><\/p>\n<h3>1.3 \u5168\u8fde\u63a5\u7684\u5c40\u9650\u6027<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5168\u8fde\u63a5\u795e\u7ecf\u7f51\u7edc\u5e76\u4e0d\u592a\u9002\u5408\u5904\u7406\u56fe\u50cf\u6570\u636e\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"500\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185250-680d2b8286fb6.png\" width=\"609\" \/><\/p>\n<h4>1.3.1 \u53c2\u6570\u91cf\u5de8\u5927<\/h4>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"50\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185251-680d2b8355c07.png\" width=\"157\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5168\u8fde\u63a5\u7ed3\u6784\u8ba1\u7b97\u91cf\u975e\u5e38\u5927&#xff0c;\u5047\u8bbe\u6211\u4eec\u67091000\u00d71000\u7684\u8f93\u5165&#xff0c;\u5982\u679c\u9690\u85cf\u5c42\u4e5f\u662f1000\u00d71000\u5927\u5c0f\u7684\u795e\u7ecf\u5143&#xff0c;\u7531\u4e8e\u795e\u7ecf\u5143\u548c\u56fe\u50cf\u6bcf\u4e00\u4e2a\u50cf\u7d20\u8fde\u63a5&#xff0c;\u5219\u53c2\u6570\u91cf\u4f1a\u8fbe\u5230\u60ca\u4eba\u76841000\u00d71000\u00d71000\u00d71000&#xff0c;\u4ec5\u4ec5\u4e00\u5c42\u7f51\u7edc\u5c31\u5df2\u7ecf\u6709<img decoding=\"async\" alt=\"$10^{12}$\" class=\"mathcode\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185251-680d2b837880d.png\" \/>\u4e2a\u53c2\u6570\u3002<\/p>\n<h4>1.3.2 \u8868\u8fbe\u80fd\u529b\u592a\u6709\u9650<\/h4>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5168\u8fde\u63a5\u795e\u7ecf\u7f51\u7edc\u7684\u89d2\u8272\u53ea\u662f\u4e00\u4e2a\u5206\u7c7b\u5668&#xff0c;\u5982\u679c\u5c06\u6574\u4e2a\u56fe\u7247\u76f4\u63a5\u8f93\u5165\u7f51\u7edc&#xff0c;\u4e0d\u4ec5\u53c2\u6570\u91cf\u5927&#xff0c;\u4e5f\u6ca1\u6709\u5229\u7528\u597d\u56fe\u7247\u4e2d\u50cf\u7d20\u7684\u7a7a\u95f4\u7279\u6027&#xff0c;\u589e\u52a0\u4e86\u5b66\u4e60\u96be\u5ea6&#xff0c;\u964d\u4f4e\u4e86\u5b66\u4e60\u6548\u679c\u3002<\/p>\n<h3>1.4 \u5377\u79ef\u601d\u60f3<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5377&#xff1a;\u4ece\u5de6\u5f80\u53f3&#xff0c;\u4ece\u4e0a\u5f80\u4e0b&#xff1b;\u79ef&#xff1a;\u4e58\u79ef&#xff0c;\u6c42\u548c<\/p>\n<h4>1.4.1 \u6982\u5ff5<\/h4>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Convolution&#xff0c;\u8f93\u5165\u4fe1\u606f\u4e0e\u5377\u79ef\u6838(\u6ee4\u6ce2\u5668,Filter)\u7684\u4e58\u79ef\u3002\u00a0<\/p>\n<h4>1.4.2 \u5c40\u90e8\u8fde\u63a5<\/h4>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; \u5c40\u90e8\u8fde\u63a5\u53ef\u4ee5\u66f4\u597d\u5730\u5229\u7528\u56fe\u50cf\u4e2d\u7684\u7ed3\u6784\u4fe1\u606f&#xff0c;\u7a7a\u95f4\u8ddd\u79bb\u8d8a\u76f8\u8fd1\u7684\u50cf\u7d20\u5176\u76f8\u4e92\u5f71\u54cd\u8d8a\u5927\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; \u6839\u636e\u5c40\u90e8\u7279\u5f81\u5b8c\u6210\u76ee\u6807\u7684\u53ef\u8fa8\u8bc6\u6027\u3002<\/p>\n<h4>1.4.3 \u6743\u91cd\u5171\u4eab<\/h4>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; \u56fe\u50cf\u4ece\u4e00\u4e2a\u5c40\u90e8\u533a\u57df\u5b66\u4e60\u5230\u7684\u4fe1\u606f\u5e94\u7528\u5230\u5176\u4ed6\u533a\u57df\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; \u51cf\u5c11\u53c2\u6570&#xff0c;\u964d\u4f4e\u5b66\u4e60\u96be\u5ea6\u3002<\/p>\n<h2>2.\u00a0\u5377\u79ef\u5c42<\/h2>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"312\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185251-680d2b839bba3.png\" width=\"1200\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u5f00\u59cb\u5b66\u4e60\u5377\u79ef\u6838\u7684\u8ba1\u7b97\u8fc7\u7a0b, \u5373: \u5377\u79ef\u6838\u662f\u5982\u4f55\u63d0\u53d6\u7279\u5f81\u7684\u3002<\/p>\n<h3>2.1 \u5377\u79ef\u6838<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5377\u79ef\u6838\u662f\u5377\u79ef\u8fd0\u7b97\u8fc7\u7a0b\u4e2d\u5fc5\u4e0d\u53ef\u5c11\u7684\u4e00\u4e2a\u201c\u5de5\u5177\u201d&#xff0c;\u5728\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u4e2d&#xff0c;\u5377\u79ef\u6838\u662f\u975e\u5e38\u91cd\u8981\u7684&#xff0c;\u5b83\u4eec\u88ab\u7528\u6765\u63d0\u53d6\u56fe\u50cf\u4e2d\u7684\u7279\u5f81\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5377\u79ef\u6838\u5176\u5b9e\u662f\u4e00\u4e2a\u5c0f\u77e9\u9635&#xff0c;\u5728\u5b9a\u4e49\u65f6\u9700\u8981\u8003\u8651\u4ee5\u4e0b\u51e0\u65b9\u9762\u7684\u5185\u5bb9&#xff1a; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; \u5377\u79ef\u6838\u7684\u4e2a\u6570&#xff1a;\u5377\u79ef\u6838&#xff08;\u8fc7\u6ee4\u5668&#xff09;\u7684\u4e2a\u6570\u51b3\u5b9a\u4e86\u5176\u8f93\u51fa\u7279\u5f81\u77e9\u9635\u7684\u901a\u9053\u6570\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; \u5377\u79ef\u6838\u7684\u503c&#xff1a;\u5377\u79ef\u6838\u7684\u503c\u662f\u521d\u59cb\u5316\u597d\u7684&#xff0c;\u540e\u7eed\u8fdb\u884c\u66f4\u65b0\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8211; \u5377\u79ef\u6838\u7684\u5927\u5c0f&#xff1a;\u5e38\u89c1\u7684\u5377\u79ef\u6838\u67091\u00d71\u30013\u00d73\u30015\u00d75\u7b49&#xff0c;\u4e00\u822c\u90fd\u662f\u5947\u6570 \u00d7 \u5947\u6570\u3002<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u4e0b\u56fe\u5c31\u662f\u4e00\u4e2a3\u00d73\u7684\u5377\u79ef\u6838&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"110\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185252-680d2b8411c78.png\" width=\"111\" \/><\/p>\n<h3>2.2 \u5377\u79ef\u8ba1\u7b97<\/h3>\n<h4>2.2.1 \u5377\u79ef\u8ba1\u7b97\u8fc7\u7a0b<\/h4>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5377\u79ef\u7684\u8fc7\u7a0b\u662f\u5c06\u5377\u79ef\u6838\u5728\u56fe\u50cf\u4e0a\u8fdb\u884c\u6ed1\u52a8\u8ba1\u7b97&#xff0c;\u6bcf\u6b21\u6ed1\u52a8\u5230\u4e00\u4e2a\u65b0\u7684\u4f4d\u7f6e\u65f6&#xff0c;\u5377\u79ef\u6838\u548c\u56fe\u50cf\u8fdb\u884c\u70b9\u5bf9\u70b9\u7684\u8ba1\u7b97&#xff0c;\u5e76\u5c06\u5176\u6c42\u548c\u5f97\u5230\u4e00\u4e2a\u65b0\u7684\u503c&#xff0c;\u7136\u540e\u5c06\u8fd9\u4e2a\u65b0\u7684\u503c\u52a0\u5165\u5230\u7279\u5f81\u56fe\u4e2d&#xff0c;\u6700\u7ec8\u5f97\u5230\u4e00\u4e2a\u65b0\u7684\u7279\u5f81\u56fe\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"329\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185252-680d2b8434ad7.png\" width=\"880\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01. input \u8868\u793a\u8f93\u5165\u7684\u56fe\u50cf\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a02. filter \u8868\u793a\u5377\u79ef\u6838, \u4e5f\u53eb\u505a\u6ee4\u6ce2\u5668\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a03. input \u7ecf\u8fc7 filter \u7684\u5f97\u5230\u8f93\u51fa\u4e3a\u6700\u53f3\u4fa7\u7684\u56fe\u50cf&#xff0c;\u8be5\u56fe\u53eb\u505a\u7279\u5f81\u56fe\u3002<\/p>\n<p>\u200b\u00a0\u00a0 \u00a0\u90a3\u4e48, \u5b83\u662f\u5982\u4f55\u8fdb\u884c\u8ba1\u7b97\u7684\u5462&#xff1f;\u5377\u79ef\u8fd0\u7b97\u672c\u8d28\u4e0a\u5c31\u662f\u5728\u6ee4\u6ce2\u5668\u548c\u8f93\u5165\u6570\u636e\u7684\u5c40\u90e8\u533a\u57df\u95f4\u505a\u70b9\u79ef\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"352\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185252-680d2b846a072.png\" width=\"880\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5de6\u4e0a\u89d2\u7684\u70b9\u8ba1\u7b97\u65b9\u6cd5&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"75\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185252-680d2b84a3551.png\" width=\"800\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6309\u7167\u4e0a\u9762\u7684\u8ba1\u7b97\u65b9\u6cd5\u53ef\u4ee5\u5f97\u5230\u6700\u7ec8\u7684\u7279\u5f81\u56fe\u4e3a:<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"338\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185252-680d2b84cd249.png\" width=\"880\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5377\u79ef\u7684\u91cd\u8981\u6027\u5728\u4e8e\u5b83\u53ef\u4ee5\u5c06\u56fe\u50cf\u4e2d\u7684\u7279\u5f81\u4e0e\u5377\u79ef\u6838\u8fdb\u884c\u5377\u79ef\u64cd\u4f5c&#xff0c;\u4ece\u800c\u63d0\u53d6\u51fa\u56fe\u50cf\u4e2d\u7684\u7279\u5f81\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u53ef\u4ee5\u901a\u8fc7\u4e0d\u65ad\u8c03\u6574\u5377\u79ef\u6838\u7684\u5927\u5c0f\u3001\u5377\u79ef\u6838\u7684\u503c\u548c\u5377\u79ef\u64cd\u4f5c\u7684\u6b65\u957f&#xff0c;\u53ef\u4ee5\u63d0\u53d6\u51fa\u4e0d\u540c\u5c3a\u5ea6\u548c\u4f4d\u7f6e\u7684\u7279\u5f81\u3002 \u00a0 \u00a0 \u00a0 \u00a0 \u793a\u4f8b&#xff1a;<\/p>\n<p># \u9762\u5411\u5bf9\u8c61\u7684\u6a21\u5757\u5316\u7f16\u7a0b<br \/>\nfrom matplotlib import pyplot as plt<br \/>\nimport os<br \/>\nimport torch<br \/>\nimport torch.nn as nn<\/p>\n<p>def test001():<br \/>\n    current_path &#061; os.path.dirname(__file__)<br \/>\n    img_path &#061; os.path.join(current_path, &#034;data&#034;, &#034;\u5f69\u8272.png&#034;)<br \/>\n    # \u8f6c\u6362\u4e3a\u76f8\u5bf9\u8def\u5f84<br \/>\n    img_path &#061; os.path.relpath(img_path)<\/p>\n<p>    # \u4f7f\u7528plt\u8bfb\u53d6\u56fe\u7247<br \/>\n    img &#061; plt.imread(img_path)<br \/>\n    print(img.shape)<br \/>\n    # \u8f6c\u6362\u4e3a\u5f20\u91cf&#xff1a;HWC  &#8212;&gt; CHW  &#8212;&gt; NCHW  \u94fe\u5f0f\u8c03\u7528<br \/>\n    img &#061; torch.tensor(img).permute(2, 0, 1).unsqueeze(0)<br \/>\n    # \u521b\u5efa\u5377\u79ef\u6838  (501, 500, 4)<br \/>\n    conv &#061; nn.Conv2d(<br \/>\n        in_channels&#061;4,  # \u8f93\u5165\u901a\u9053<br \/>\n        out_channels&#061;32,  # \u8f93\u51fa\u901a\u9053<br \/>\n        kernel_size&#061;(5, 3),  # \u5377\u79ef\u6838\u5927\u5c0f<br \/>\n        stride&#061;1,  # \u6b65\u957f<br \/>\n        padding&#061;0,  # \u586b\u5145<br \/>\n        bias&#061;True<br \/>\n    )<br \/>\n    # \u4f7f\u7528\u5377\u79ef\u6838\u5bf9\u56fe\u50cf\u8fdb\u884c\u5377\u79ef\u64cd\u4f5c  [9999]  [[[[]]]]<br \/>\n    out &#061; conv(img)<\/p>\n<p>    # \u8f93\u51fa128\u4e2a\u7279\u5f81\u56fe<br \/>\n    conv2 &#061; nn.Conv2d(<br \/>\n        in_channels&#061;32,  # \u8f93\u5165\u901a\u9053<br \/>\n        out_channels&#061;128,  # \u8f93\u51fa\u901a\u9053<br \/>\n        kernel_size&#061;(5, 5),  # \u5377\u79ef\u6838\u5927\u5c0f<br \/>\n        stride&#061;1,  # \u6b65\u957f<br \/>\n        padding&#061;0,  # \u586b\u5145<br \/>\n        bias&#061;True<br \/>\n    )<br \/>\n    out &#061; conv2(out)<br \/>\n    print(out)<br \/>\n    # \u628a\u56fe\u50cf\u663e\u793a\u51fa\u6765<br \/>\n    print(out.shape)<br \/>\n    plt.imshow(out[0][10].detach().numpy(), cmap&#061;&#039;gray&#039;)<br \/>\n    plt.show()<\/p>\n<p># \u4f5c\u4e3a\u4e3b\u6a21\u5757\u6267\u884c<br \/>\nif __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    test001() <\/p>\n<h4>2.2.2 \u5377\u79ef\u8ba1\u7b97\u5e95\u5c42\u5b9e\u73b0<\/h4>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5377\u79ef\u8ba1\u7b97\u5e95\u5c42\u5b9e\u73b0\u5e76\u4e0d\u662f\u6c34\u5e73\u548c\u5782\u76f4\u65b9\u5411\u7684\u5faa\u73af\u3002<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u4e0b\u56fe\u662f\u5377\u79ef\u7684\u57fa\u672c\u8fd0\u7b97\u65b9\u5f0f&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"300\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185253-680d2b8511709.png\" width=\"367\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5377\u79ef\u771f\u6b63\u7684\u8ba1\u7b97\u8fc7\u7a0b\u5982\u4e0b\u56fe&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"800\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185253-680d2b8542bf7.png\" width=\"1110\" \/><\/p>\n<h3>2.3 \u8fb9\u7f18\u586b\u5145(Padding)<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u901a\u8fc7\u4e0a\u9762\u7684\u5377\u79ef\u8ba1\u7b97&#xff0c;\u6211\u4eec\u53d1\u73b0\u6700\u7ec8\u7684\u7279\u5f81\u56fe\u6bd4\u539f\u59cb\u56fe\u50cf\u8981\u5c0f&#xff0c;\u5982\u679c\u60f3\u8981\u4fdd\u6301\u56fe\u50cf\u5927\u5c0f\u4e0d\u53d8, \u53ef\u5728\u539f\u56fe\u5468\u56f4\u6dfb\u52a0padding\u6765\u5b9e\u73b0\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u66f4\u91cd\u8981\u7684&#xff0c;\u8fb9\u7f18\u586b\u5145\u8fd8\u66f4\u597d\u7684\u4fdd\u62a4\u4e86\u56fe\u50cf\u8fb9\u7f18\u6570\u636e\u7684\u7279\u5f81\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"280\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185253-680d2b85de2b6.png\" width=\"540\" \/><\/p>\n<h3>2.4 \u6b65\u957f(Stride)<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6309\u7167\u6b65\u957f\u4e3a1\u6765\u79fb\u52a8\u5377\u79ef\u6838&#xff0c;\u8ba1\u7b97\u7279\u5f81\u56fe\u5982\u4e0b\u6240\u793a&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"173\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185254-680d2b861ad1a.png\" width=\"1200\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5982\u679c\u6211\u4eec\u628a Stride \u589e\u5927\u4e3a2&#xff0c;\u4e5f\u662f\u53ef\u4ee5\u63d0\u53d6\u7279\u5f81\u56fe\u7684&#xff0c;\u5982\u4e0b\u56fe\u6240\u793a&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"191\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185254-680d2b8669fad.png\" width=\"1050\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u6ce8\u610f&#xff1a;\u5982\u679cstride\u592a\u5c0f&#xff1a;\u91cd\u590d\u8ba1\u7b97\u8f83\u591a&#xff0c;\u8ba1\u7b97\u91cf\u5927&#xff0c;\u8bad\u7ec3\u6548\u7387\u964d\u4f4e&#xff1b;\u5982\u679cstride\u592a\u5927&#xff1a;\u4f1a\u9020\u6210\u4fe1\u606f\u9057\u6f0f&#xff0c;\u65e0\u6cd5\u6709\u6548\u63d0\u70bc\u6570\u636e\u80cc\u540e\u7684\u7279\u5f81\u3002<\/p>\n<h3>2.5 \u591a\u901a\u9053\u5377\u79ef\u8ba1\u7b97<\/h3>\n<h4>2.5.1 \u6570\u5b57\u56fe\u50cf\u7684\u6807\u8bc6<\/h4>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6211\u4eec\u77e5\u9053\u56fe\u50cf\u5728\u8ba1\u7b97\u673a\u773c\u4e2d\u662f\u4e00\u4e2a\u77e9\u9635\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"300\" src=\"2025-04-27s0mhhk0uzxa.png\" width=\"1052\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u901a\u9053\u8d8a\u591a&#xff0c;\u53ef\u4ee5\u8868\u8fbe\u7684\u7279\u5f81\u5c31\u8d8a\u4e30\u5bcc\u3002<\/p>\n<h4>2.5.2 \u5177\u4f53\u8ba1\u7b97\u5b9e\u73b0<\/h4>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5b9e\u9645\u4e2d\u7684\u56fe\u50cf\u90fd\u662f\u591a\u4e2a\u901a\u9053\u7ec4\u6210\u7684&#xff0c;\u6211\u4eec\u600e\u4e48\u8ba1\u7b97\u5377\u79ef\u5462<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"482\" src=\"2025-04-27bzssre4nvse.png\" width=\"1200\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u8ba1\u7b97\u65b9\u6cd5\u5982\u4e0b&#xff1a;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1. \u5f53\u8f93\u5165\u6709\u591a\u4e2a\u901a\u9053(Channel), \u4f8b\u5982RGB\u4e09\u901a\u9053, \u6b64\u65f6\u8981\u6c42\u5377\u79ef\u6838\u9700\u8981\u6709\u76f8\u540c\u7684\u901a\u9053\u6570\u3002 \u00a0 \u00a0 \u00a0 \u00a0 2. \u5377\u79ef\u6838\u901a\u9053\u4e0e\u5bf9\u5e94\u7684\u8f93\u5165\u56fe\u50cf\u901a\u9053\u8fdb\u884c\u5377\u79ef\u3002 \u00a0 \u00a0 \u00a0 \u00a0 3. \u5c06\u6bcf\u4e2a\u901a\u9053\u7684\u5377\u79ef\u7ed3\u679c\u6309\u4f4d\u76f8\u52a0\u5f97\u5230\u6700\u7ec8\u7684\u7279\u5f81\u56fe\u3002<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5982\u4e0b\u56fe\u6240\u793a&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"548\" src=\"2025-04-27m55bvnw0nem.png\" width=\"1200\" \/><\/p>\n<h3>2.6 \u591a\u5377\u79ef\u6838\u5377\u79ef\u8ba1\u7b97<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5b9e\u9645\u5bf9\u56fe\u50cf\u8fdb\u884c\u7279\u5f81\u63d0\u53d6\u65f6, \u6211\u4eec\u9700\u8981\u4f7f\u7528\u591a\u4e2a\u5377\u79ef\u6838\u8fdb\u884c\u7279\u5f81\u63d0\u53d6\u3002\u8fd9\u4e2a\u591a\u4e2a\u5377\u79ef\u6838\u53ef\u4ee5\u7406\u89e3\u4e3a\u4ece\u4e0d\u540c\u5230\u7684\u89c6\u89d2\u3001\u4e0d\u540c\u7684\u89d2\u5ea6\u5bf9\u56fe\u50cf\u7279\u5f81\u8fdb\u884c\u63d0\u53d6\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u90a3\u4e48, \u5f53\u4f7f\u7528\u591a\u4e2a\u5377\u79ef\u6838\u65f6, \u5e94\u8be5\u600e\u4e48\u8fdb\u884c\u7279\u5f81\u63d0\u53d6\u5462&#xff1f;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"485\" src=\"2025-04-27en21wp1c34c.png\" width=\"1200\" \/><\/p>\n<h3>2.7 \u7279\u5f81\u56fe\u5927\u5c0f<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u8f93\u51fa\u7279\u5f81\u56fe\u7684\u5927\u5c0f\u4e0e\u4ee5\u4e0b\u53c2\u6570\u606f\u606f\u76f8\u5173&#xff1a;<\/p>\n<li>\n<p>size: \u5377\u79ef\u6838\/\u8fc7\u6ee4\u5668\u5927\u5c0f&#xff0c;\u4e00\u822c\u4f1a\u9009\u62e9\u4e3a\u5947\u6570&#xff0c;\u6bd4\u5982\u6709 1\u00d71, 3\u00d73&#xff0c; 5\u00d75&#xff1b;<\/p>\n<\/li>\n<li>\n<p>Padding: \u96f6\u586b\u5145\u7684\u65b9\u5f0f&#xff1b;<\/p>\n<\/li>\n<li>\n<p>Stride: \u6b65\u957f\u3002<\/p>\n<\/li>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u90a3\u8ba1\u7b97\u65b9\u6cd5\u5982\u4e0b\u56fe\u6240\u793a&#xff1a;<\/p>\n<li>\n<p>\u8f93\u5165\u56fe\u50cf\u5927\u5c0f: W x W&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5377\u79ef\u6838\u5927\u5c0f: F x F&#xff1b;<\/p>\n<\/li>\n<li>\n<p>Stride: S&#xff1b;<\/p>\n<\/li>\n<li>\n<p>Padding: P&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u8f93\u51fa\u56fe\u50cf\u5927\u5c0f: N x N\u3002<\/p>\n<\/li>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"60\" src=\"2025-04-27c34fstzxiuy.png\" width=\"191\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u4ee5\u4e0b\u56fe\u4e3a\u4f8b&#xff1a; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01. \u56fe\u50cf\u5927\u5c0f: 5 x 5&#xff1b; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a02. \u5377\u79ef\u6838\u5927\u5c0f: 3 x 3&#xff1b; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a03. Stride: 1&#xff1b; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a04. Padding: 1&#xff1b; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a05. (5 &#8211; 3 &#043; 2) \/ 1 &#043; 1 &#061; 5, \u5373\u5f97\u5230\u7684\u7279\u5f81\u56fe\u5927\u5c0f\u4e3a: 5 x 5<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"300\" src=\"2025-04-27win0ljweozk.png\" width=\"449\" \/><\/p>\n<h3>2.8 \u53ea\u5377\u4e00\u6b21<\/h3>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"400\" src=\"2025-04-27ibyk4tepklq.png\" width=\"793\" \/><\/p>\n<h3>2.9 \u5377\u79ef\u53c2\u6570\u5171\u4eab<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6570\u636e\u662f 32\u00d732\u00d73 \u7684\u56fe\u50cf&#xff0c;\u7528 10 \u4e2a 5\u00d75 \u7684filter\u6765\u8fdb\u884c\u5377\u79ef\u64cd\u4f5c&#xff0c;\u6240\u9700\u7684\u6743\u91cd\u53c2\u6570\u6709\u591a\u5c11\u4e2a\u5462&#xff1f;<\/p>\n<ul>\n<li>\n<p>5\u00d75\u00d73 &#061; 75&#xff0c;\u8868\u793a\u6bcf\u4e2a\u5377\u79ef\u6838\u53ea\u9700\u898175\u4e2a\u53c2\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>10\u4e2a\u4e0d\u540c\u7684\u5377\u79ef\u6838&#xff0c;\u5c31\u9700\u898110*75 &#061; 750\u4e2a\u5377\u79ef\u6838\u53c2\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c\u8fd8\u8003\u8651\u504f\u7f6e\u53c2\u6570b&#xff0c;\u6700\u7ec8\u9700\u8981 750&#043;10&#061;760 \u4e2a\u53c2\u6570\u3002<\/p>\n<\/li>\n<\/ul>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"35\" src=\"2025-04-2743jrde2kxxf.png\" width=\"378\" \/><\/p>\n<h3>2.10 \u5c40\u90e8\u7279\u5f81\u63d0\u53d6<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u901a\u8fc7\u5377\u79ef\u64cd\u4f5c&#xff0c;CNN\u5177\u6709\u5c40\u90e8\u611f\u77e5\u6027&#xff0c;\u80fd\u591f\u6355\u6349\u8f93\u5165\u6570\u636e\u7684\u5c40\u90e8\u7279\u5f81&#xff0c;\u8fd9\u5728\u5904\u7406\u56fe\u50cf\u7b49\u5177\u6709\u7a7a\u95f4\u7ed3\u6784\u7684\u6570\u636e\u65f6\u975e\u5e38\u6709\u7528\u3002<\/p>\n<h3>2.11 PyTorch\u5377\u79ef\u5c42 API<\/h3>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"300\" src=\"2025-04-27nj1214p3vov.png\" width=\"299\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u793a\u4f8b&#xff1a;test01 \u51fd\u6570\u4f7f\u7528\u4e00\u4e2a\u591a\u901a\u9053\u5377\u79ef\u6838\u8fdb\u884c\u7279\u5f81\u63d0\u53d6, test02 \u51fd\u6570\u4f7f\u7528 3 \u4e2a\u591a\u901a\u9053\u5377\u79ef\u6838\u8fdb\u884c\u7279\u5f81\u63d0\u53d6\u3002<\/p>\n<p>import torch<br \/>\nimport torch.nn as nn<br \/>\nimport matplotlib.pyplot as plt<br \/>\nimport os<\/p>\n<p>def showimg(img):<br \/>\n    plt.imshow(img)<br \/>\n    # \u9690\u85cf\u523b\u5ea6<br \/>\n    plt.axis(&#034;off&#034;)<br \/>\n    plt.show()<\/p>\n<p>def test001():<br \/>\n    dir &#061; os.path.dirname(__file__)<br \/>\n    img &#061; plt.imread(os.path.join(dir, &#034;\u5f69\u8272.png&#034;))<br \/>\n    # \u521b\u5efa\u5377\u79ef\u6838<br \/>\n    # in_channels&#xff1a;\u8f93\u5165\u6570\u636e\u7684\u901a\u9053\u6570<br \/>\n    # out_channels&#xff1a;\u8f93\u51fa\u7279\u5f81\u56fe\u6570&#xff0c;\u548cfilter\u6570\u4e00\u76f4<br \/>\n    conv &#061; nn.Conv2d(in_channels&#061;4, out_channels&#061;1, kernel_size&#061;3, stride&#061;1, padding&#061;1)<br \/>\n    # \u6ce8\u610f&#xff1a;\u5377\u79ef\u5c42\u5bf9\u8f93\u5165\u7684\u6570\u636e\u6709\u5f62\u72b6\u8981\u6c42 [batch, channel, height, width]<br \/>\n    # \u9700\u8981\u8fdb\u884c\u5f62\u72b6\u8f6c\u6362  H, W, C -&gt; C, H, W<br \/>\n    img &#061; torch.tensor(img, dtype&#061;torch.float).permute(2, 0, 1)<br \/>\n    print(img.shape)<br \/>\n    # \u63a5\u7740\u53d8\u5f62&#xff1a;CHW -&gt; BCHW<br \/>\n    newimg &#061; img.unsqueeze(0)<br \/>\n    print(newimg.shape)<br \/>\n    # \u9001\u5165\u5377\u79ef\u6838\u8fd0\u7b97\u4e00\u4e0b<br \/>\n    newimg &#061; conv(newimg)<br \/>\n    print(newimg.shape)<\/p>\n<p>    # \u848bNCHW-&gt;HWC<br \/>\n    newimg &#061; newimg.squeeze(0).permute(1, 2, 0)<br \/>\n    showimg(newimg.detach().numpy())<\/p>\n<p># \u591a\u5377\u79ef\u6838<br \/>\ndef test002():<br \/>\n    dir &#061; os.path.dirname(__file__)<br \/>\n    img &#061; plt.imread(os.path.join(dir, &#034;\u5f69\u8272.png&#034;))<br \/>\n    # \u5b9a\u4e49\u4e00\u4e2a\u591a\u7279\u5f81\u56fe\u8f93\u51fa\u7684\u5377\u79ef\u6838<br \/>\n    conv &#061; nn.Conv2d(in_channels&#061;4, out_channels&#061;3, kernel_size&#061;3, stride&#061;1, padding&#061;1)<\/p>\n<p>    # \u56fe\u5f62\u8981\u8fdb\u884c\u53d8\u5f62\u5904\u7406<br \/>\n    img &#061; torch.tensor(img).permute(2, 0, 1).unsqueeze(0)<\/p>\n<p>    # \u4f7f\u7528\u5377\u79ef\u6838\u5bf9\u56fe\u7247\u8fdb\u884c\u5377\u79ef\u8ba1\u7b97<br \/>\n    outimg &#061; conv(img)<br \/>\n    print(outimg.shape)<br \/>\n    # \u628a\u56fe\u5f62\u5f62\u72b6\u8f6c\u6362\u56de\u6765\u4ee5\u65b9\u4fbf\u663e\u793a<br \/>\n    outimg &#061; outimg.squeeze(0).permute(1, 2, 0)<br \/>\n    print(outimg.shape)<br \/>\n    # showimg(outimg)<br \/>\n    # \u663e\u793a\u8fd9\u4e9b\u7279\u5f81\u56fe<br \/>\n    for idx in range(outimg.shape[2]):<br \/>\n        showimg(outimg[:, :, idx].squeeze(-1).detach())<\/p>\n<p>if __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    test002() <\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6548\u679c&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"500\" src=\"2025-04-27gfbllliatov.png\" width=\"1007\" \/><\/p>\n<h3>2.12 \u5377\u79ef\u5c42\u5b9e\u9a8c<\/h3>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u539f\u7406&#xff1a; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u524d\u9762\u7684\u7ae0\u8282\u4e2d\u6211\u4eec\u4e86\u89e3\u4e86\u5377\u79ef\u7684\u8fc7\u7a0b&#xff0c;\u660e\u767d\u4e86\u5377\u79ef\u8fc7\u7a0b\u5c31\u662f\u4f7f\u7528\u4e00\u4e2a\u5c0f\u7684\u5377\u79ef\u6838\u4e0e\u8f93\u5165\u7279\u5f81\u77e9\u9635\u8fdb\u884c\u6ed1\u52a8\u5377\u79ef\u7684\u8fc7\u7a0b\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u524d\u9762\u7684\u7ae0\u8282\u4e2d\u4e3a\u4e86\u80fd\u66f4\u597d\u7684\u8bf4\u6e05\u695a\u5377\u79ef\u7684\u8fc7\u7a0b&#xff0c;\u5176\u8f93\u5165\u7279\u5f81\u77e9\u9635\u90fd\u662f\u5355\u901a\u9053\u7684&#xff0c;\u6839\u636e\u201c\u8ba1\u7b97\u673a\u773c\u4e2d\u7684\u56fe\u50cf\u201d\u7ae0\u8282&#xff0c;\u77e5\u9053\u5355\u901a\u9053\u662f\u7070\u5ea6\u56fe\u6216\u8005\u4e8c\u503c\u5316\u56fe&#xff0c;\u4f46\u662f\u5b9e\u9645\u4e0a\u8bc6\u522b\u56fe\u50cf\u5927\u90e8\u5206\u90fd\u662f\u5f69\u8272\u56fe&#xff0c;\u4e5f\u5c31\u610f\u5473\u7740\u4e0d\u662f\u4e00\u4e2a\u901a\u9053\u7684\u7279\u5f81\u8f93\u5165\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6240\u4ee5&#xff0c;\u5377\u79ef\u7684\u8fc7\u7a0b\u4e2d\u5927\u90e8\u5206\u90fd\u662f\u591a\u901a\u9053\u7684\u5377\u79ef&#xff0c;\u5e76\u4e14\u5728\u5377\u79ef\u5b8c\u4e4b\u540e\u8fd8\u4f1a\u52a0\u4e0a\u504f\u7f6e\u9879\u3002<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 &#xff08;1&#xff09;\u7279\u5f81\u8f93\u5165<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u201c\u7279\u5f81\u8f93\u5165\u201d\u7ec4\u4ef6\u4e2d&#xff0c;\u63d0\u4f9b\u4e86\u4e00\u4e2a3&#215;3\u7684\u4e09\u901a\u9053\u8f93\u5165\u7279\u5f81\u77e9\u9635&#xff0c;\u5e76\u5c06\u5176\u4e09\u4e2a\u901a\u9053\u7684\u5185\u5bb9\u90fd\u5c55\u793a\u4e86\u51fa\u6765\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u4e5f\u5c31\u610f\u5473\u7740\u8fd9\u4e2a\u8f93\u5165\u77e9\u9635\u662f\u4e00\u4e2a3&#215;3\u5927\u5c0f\u7684&#xff0c;\u5e76\u4e14\u6709\u4e09\u4e2a\u901a\u9053\u3002\u53ef\u4ee5\u770b\u6210\u662f\u4e09\u5f203&#215;3\u7684A4\u7eb8\u201c\u556a\u201d\u4e00\u4e0b&#xff0c;\u7c98\u5728\u4e00\u5757\u4e86\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"300\" src=\"2025-04-27pwiegg2tcpm.png\" width=\"203\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 &#xff08;2&#xff09;\u5377\u79ef\u6838<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6709\u4e86\u8f93\u5165\u7279\u5f81\u77e9\u9635\u540e&#xff0c;\u5c31\u9700\u8981\u5b9a\u4e49\u5377\u79ef\u6838\u4e86\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u201c\u5377\u79ef\u6838\u201d\u7ec4\u4ef6\u4e2d&#xff0c;\u4e3a\u4e86\u7b80\u5316\u8ba1\u7b97&#xff0c;\u5b9a\u4e49\u4e86\u5377\u79ef\u6838\u7684\u5927\u5c0f\u4e3a2&#215;2&#xff08;\u5b9e\u9645\u4e0a\u51e0\u4e4e\u4e0d\u4f1a\u67092&#215;2\u7684\u5377\u79ef\u6838&#xff09;&#xff0c; \u901a\u8fc7\u62d6\u52a8\u6ed1\u52a8\u6761\u53ef\u4ee5\u4fee\u6539\u5377\u79ef\u6838\u7684\u4e2a\u6570\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5e76\u4e14\u4e3a\u4e86\u80fd\u591f\u5bf9\u4e00\u4e2a\u4e09\u901a\u9053\u7684\u8f93\u5165\u7279\u5f81\u77e9\u9635\u8fdb\u884c\u5377\u79ef&#xff0c;\u8fd9\u91cc\u7684\u6bcf\u4e00\u4e2a\u5377\u79ef\u6838\u4e5f\u662f\u4e09\u901a\u9053\u7684\u5377\u79ef\u6838\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"500\" src=\"2025-04-27a1pekqimr5g.png\" width=\"1152\" \/><\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 &#xff08;3&#xff09;\u5377\u79ef\u8fc7\u7a0b\u663e\u793a<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u201c\u5377\u79ef\u8fc7\u7a0b\u663e\u793a\u201d\u7ec4\u4ef6\u4e2d&#xff0c;\u56fa\u5b9a\u4e86Padding\u65b9\u5f0f\u4e3aVALID\u548c\u6b65\u957f\u4e3a1\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"500\" src=\"2025-04-27wgjaf5ukulo.png\" width=\"434\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u591a\u901a\u9053\u5377\u79ef\u8fc7\u7a0b\u4e2d&#xff0c;\u8f93\u51fa\u7279\u5f81\u77e9\u9635\u662f\u7531\u6bcf\u4e2a\u901a\u9053\u7684\u5377\u79ef\u6838\u4e0e\u5bf9\u5e94\u901a\u9053\u7684\u8f93\u5165\u7279\u5f81\u77e9\u9635\u5728\u5bf9\u5e94\u4f4d\u7f6e\u8fdb\u884c\u5377\u79ef&#xff0c;\u7136\u540e\u5c06\u591a\u4e2a\u901a\u9053\u7684\u5377\u79ef\u7ed3\u679c\u76f8\u52a0\u7684\u7ed3\u679c\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u4ee5\u8f93\u51fa\u7279\u5f81\u77e9\u9635\u7684\u5de6\u4e0a\u89d2\u201c1\u201d\u4e3a\u4f8b&#xff0c;\u5176\u503c\u662f\u7531\u7b2c\u4e00\u4e2a\u901a\u9053\u7684\u5377\u79ef\u6838\u4e0e\u7b2c\u4e00\u4e2a\u901a\u9053\u7684\u8f93\u5165\u7279\u5f81\u77e9\u9635\u7684\u5de6\u4e0a\u89d2\u8fdb\u884c\u5377\u79ef\u52a0\u4e0a\u7b2c\u4e8c\u4e2a\u901a\u9053\u7684\u5377\u79ef\u6838\u4e0e\u7b2c\u4e8c\u4e2a\u901a\u9053\u7684\u8f93\u5165\u7279\u5f81\u77e9\u9635\u7684\u5de6\u4e0a\u89d2\u8fdb\u884c\u5377\u79ef\u52a0\u4e0a\u7b2c\u4e09\u4e2a\u901a\u9053\u7684\u5377\u79ef\u6838\u4e0e\u7b2c\u4e09\u4e2a\u901a\u9053\u7684\u8f93\u5165\u7279\u5f81\u77e9\u9635\u7684\u5de6\u4e0a\u89d2\u8fdb\u884c\u5377\u79ef&#xff0c;\u6700\u540e\u5f97\u5230\u7684\u5377\u79ef\u7ed3\u679c\u76f8\u52a0\u5f97\u5230\u8f93\u51fa\u7279\u5f81\u77e9\u9635\u7684\u5de6\u4e0a\u89d2\u503c\u4e3a\u201c1\u201d&#xff0c;\u5176\u4ed6\u7684\u4ee5\u6b64\u7c7b\u63a8\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u5f97\u5230\u8f93\u51fa\u7279\u5f81\u77e9\u9635\u540e&#xff0c;\u504f\u7f6e\u77e9\u9635\u5c31\u4f1a\u4e0e\u8f93\u51fa\u7279\u5f81\u77e9\u9635\u76f8\u52a0&#xff0c;\u5f97\u5230\u672c\u6b21\u591a\u901a\u9053\u5377\u79ef\u7684\u6700\u7ec8\u7ed3\u679c\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u7531\u6b64\u6211\u4eec\u5f97\u5230\u4e24\u4e2a\u7ed3\u8bba&#xff1a;<\/p>\n<li>\n<p>\u8f93\u5165\u7279\u5f81\u7684\u901a\u9053\u6570\u51b3\u5b9a\u4e86\u5377\u79ef\u6838\u7684\u901a\u9053\u6570&#xff08;\u5377\u79ef\u6838\u901a\u9053\u4e2a\u6570&#061;\u8f93\u5165\u7279\u5f81\u901a\u9053\u4e2a\u6570&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5377\u79ef\u6838\u7684\u4e2a\u6570\u51b3\u5b9a\u4e86\u8f93\u51fa\u7279\u5f81\u77e9\u9635\u7684\u901a\u9053\u6570\u4e0e\u504f\u7f6e\u77e9\u9635\u7684\u901a\u9053\u6570&#xff08;\u5377\u79ef\u6838\u4e2a\u6570&#061;\u8f93\u51fa\u7279\u5f81\u901a\u9053\u6570&#061;\u504f\u7f6e\u77e9\u9635\u901a\u9053\u6570&#xff09;\u3002<\/p>\n<\/li>\n<h3>2.13\u00a0\u77e5\u8bc6\u70b9\u6269\u5c55<\/h3>\n<li>\n<p>\u6df1\u5ea6\u7406\u89e3\u9898&#xff1a;\u5728\u591a\u901a\u9053\u5377\u79ef\u8fc7\u7a0b\u4e2d&#xff0c;\u6743\u91cd\u5171\u4eab\u5982\u4f55\u5728\u4e0d\u540c\u901a\u9053\u95f4\u5b9e\u73b0\u7279\u5f81\u5b66\u4e60\u7684\u534f\u540c\u4f5c\u7528&#xff1f;\u8bf7\u7ed3\u5408\u5b9e\u9645\u5e94\u7528\u6848\u4f8b\u8fdb\u884c\u8bf4\u660e\u3002<\/p>\n<\/li>\n<li>\n<p>\u4f18\u5316\u7b56\u7565\u8bbe\u8ba1\u9898&#xff1a;\u5f53\u5904\u7406\u9ad8\u7ef4\u8f93\u5165\u6570\u636e\u65f6&#xff08;\u4f8b\u5982\u89c6\u9891\u5e27\u5e8f\u5217\u6216\u9ad8\u5149\u8c31\u56fe\u50cf&#xff09;&#xff0c;\u9488\u5bf9\u591a\u4e2a\u901a\u9053\u4e0a\u7684\u5377\u79ef\u64cd\u4f5c&#xff0c;\u4f60\u53ef\u80fd\u4f1a\u91c7\u53d6\u54ea\u4e9b\u4f18\u5316\u7b56\u7565\u4ee5\u51cf\u5c11\u8ba1\u7b97\u590d\u6742\u5ea6\u5e76\u63d0\u9ad8\u6a21\u578b\u6027\u80fd&#xff1f;<\/p>\n<\/li>\n<li>\n<p>\u6570\u5b66\u8868\u8fbe\u4e0e\u68af\u5ea6\u4f20\u64ad\u5206\u6790\u9898&#xff1a;\u8bf7\u63a8\u5bfc\u4e00\u4e2a\u591a\u901a\u9053\u5377\u79ef\u5c42&#xff08;\u5305\u62ec\u591a\u4e2a\u6ee4\u6ce2\u5668\u548c\u6bcf\u4e2a\u6ee4\u6ce2\u5668\u5bf9\u5e94\u7684\u504f\u7f6e\u9879&#xff09;\u524d\u5411\u4f20\u64ad\u8fc7\u7a0b\u4e2d\u7684\u77e9\u9635\u8fd0\u7b97\u8868\u8fbe\u5f0f&#xff0c;\u5e76\u89e3\u91ca\u53cd\u5411\u4f20\u64ad\u65f6\u8fd9\u4e9b\u53c2\u6570&#xff08;\u6743\u91cd\u548c\u504f\u7f6e&#xff09;\u7684\u68af\u5ea6\u662f\u5982\u4f55\u8ba1\u7b97\u7684\u3002<\/p>\n<\/li>\n<li>\n<p>\u67b6\u6784\u521b\u65b0\u601d\u8003\u9898&#xff1a;\u73b0\u4ee3\u6df1\u5ea6\u5b66\u4e60\u6846\u67b6\u4e2d\u5b58\u5728\u5c06\u901a\u9053\u6ce8\u610f\u529b\u673a\u5236\u878d\u5165\u5230\u5377\u79ef\u5c42\u7684\u8bbe\u8ba1&#xff0c;\u4f8b\u5982SENet\u4e2d\u7684Squeeze-and-Excitation\u6a21\u5757\u3002\u8bf7\u63cf\u8ff0\u8fd9\u4e00\u673a\u5236\u5982\u4f55\u5f71\u54cd\u5377\u79ef\u5c42\u5bf9\u591a\u901a\u9053\u4fe1\u606f\u7684\u5904\u7406&#xff0c;\u5e76\u8ba8\u8bba\u5176\u4f18\u52bf\u3002<\/p>\n<\/li>\n<li>\n<p>\u8de8\u901a\u9053\u4ea4\u4e92\u7814\u7a76\u9898&#xff1a;\u4e3e\u4f8b\u8bf4\u660e\u4e00\u79cd\u6216\u591a\u901a\u9053\u7279\u5f81\u878d\u5408\u7684\u65b9\u6cd5&#xff0c;\u6bd4\u5982\u6df1\u5ea6\u53ef\u5206\u79bb\u5377\u79ef\u4e2d\u7684\u70b9wise\u5377\u79ef\u6216\u8005\u8de8\u901a\u9053\u5377\u79ef&#xff0c;\u5e76\u9610\u8ff0\u5b83\u4eec\u5982\u4f55\u4fc3\u8fdb\u4e0d\u540c\u901a\u9053\u95f4\u7684\u7279\u5f81\u4ea4\u4e92\u3002<\/p>\n<\/li>\n<li>\n<p>\u5b9e\u8df5\u95ee\u9898\u89e3\u51b3\u9898&#xff1a;\u5047\u8bbe\u4f60\u5728\u8bad\u7ec3\u4e00\u4e2a\u7528\u4e8e\u56fe\u50cf\u5206\u7c7b\u7684\u6df1\u5ea6\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u65f6&#xff0c;\u53d1\u73b0\u7531\u4e8e\u8f93\u5165\u56fe\u50cf\u7684\u591a\u901a\u9053\u7279\u6027\u5bfc\u81f4\u6a21\u578b\u8fc7\u62df\u5408&#xff0c;\u8bf7\u63d0\u51fa\u81f3\u5c11\u4e24\u79cd\u901a\u8fc7\u8c03\u6574\u5377\u79ef\u5c42\u7ed3\u6784\u6216\u914d\u7f6e\u6765\u7f13\u89e3\u8fc7\u62df\u5408\u7684\u6280\u672f\u65b9\u6848&#xff0c;\u5e76\u8ba8\u8bba\u5176\u539f\u7406\u3002<\/p>\n<\/li>\n<li>\n<p>\u504f\u7f6e\u9879\u4f5c\u7528\u4e0e\u6743\u8861\u9898&#xff1a;\u8ba8\u8bba\u5377\u79ef\u5c42\u4e2d\u504f\u7f6e\u9879\u7684\u4f5c\u7528\u4ee5\u53ca\u5b83\u53ef\u80fd\u5f15\u5165\u7684\u95ee\u9898&#xff08;\u5982\u6a21\u578b\u7684\u5e73\u79fb\u4e0d\u53d8\u6027&#xff09;\u3002\u5728\u67d0\u4e9b\u573a\u666f\u4e0b\u4e3a\u4f55\u4f1a\u9009\u62e9\u53bb\u9664\u504f\u7f6e\u9879&#xff1f;\u5982\u679c\u6709&#xff0c;\u4f1a\u91c7\u7528\u4ec0\u4e48\u66ff\u4ee3\u7b56\u7565\u6765\u8865\u507f\u53bb\u9664\u504f\u7f6e\u5e26\u6765\u7684\u6f5c\u5728\u635f\u5931&#xff1f;<\/p>\n<\/li>\n<li>\n<p>\u6280\u672f\u5bf9\u6bd4\u4e0e\u9009\u62e9\u9898&#xff1a;\u6bd4\u8f83\u5168\u5c40\u5e73\u5747\u6c60\u5316\u3001\u5168\u5c40\u6700\u5927\u6c60\u5316\u4ee5\u53ca\u5177\u6709\u504f\u7f6e\u9879\u76841&#215;1\u5377\u79ef\u5728\u83b7\u53d6\u901a\u9053\u7ea7\u7edf\u8ba1\u7279\u5f81\u65b9\u9762\u7684\u5f02\u540c&#xff0c;\u5e76\u6839\u636e\u7279\u5b9a\u4efb\u52a1\u9700\u6c42\u9610\u8ff0\u4f55\u65f6\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u66f4\u4e3a\u5408\u9002\u3002<\/p>\n<\/li>\n<h2>3.\u00a0\u6c60\u5316\u5c42<\/h2>\n<h3>3.1 \u6982\u8ff0<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6c60\u5316\u5c42 (Pooling) \u964d\u4f4e\u7a7a\u95f4\u7ef4\u5ea6, \u7f29\u51cf\u6a21\u578b\u5927\u5c0f&#xff0c;\u63d0\u9ad8\u8ba1\u7b97\u901f\u5ea6. \u5373: \u4e3b\u8981\u5bf9\u5377\u79ef\u5c42\u5b66\u4e60\u5230\u7684\u7279\u5f81\u56fe\u8fdb\u884c\u4e0b\u91c7\u6837&#xff08;SubSampling&#xff09;\u5904\u7406\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6c60\u5316\u5c42\u4e3b\u8981\u6709\u4e24\u79cd: \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01. \u6700\u5927\u6c60\u5316&#xff08;max \u00a0pooling&#xff09;&#xff1a;\u6700\u5927\u6c60\u5316\u662f\u4ece\u6bcf\u4e2a\u5c40\u90e8\u533a\u57df\u4e2d\u9009\u62e9\u6700\u5927\u503c\u4f5c\u4e3a\u6c60\u5316\u540e\u7684\u503c&#xff0c;\u8fd9\u6837\u53ef\u4ee5\u4fdd\u7559\u5c40\u90e8\u533a\u57df\u4e2d\u6700\u663e\u8457\u7684\u7279\u5f81\u3002\u6700\u5927\u6c60\u5316\u5728\u63d0\u53d6\u56fe\u50cf\u4e2d\u7684\u7eb9\u7406\u3001\u5f62\u72b6\u7b49\u65b9\u9762\u5177\u6709\u5f88\u597d\u7684\u6548\u679c\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a02. \u5e73\u5747\u6c60\u5316&#xff08;avgPooling&#xff09;&#xff1a;\u5e73\u5747\u6c60\u5316\u662f\u5c06\u5c40\u90e8\u533a\u57df\u4e2d\u7684\u503c\u53d6\u5e73\u5747\u4f5c\u4e3a\u6c60\u5316\u540e\u7684\u503c&#xff0c;\u8fd9\u6837\u53ef\u4ee5\u5f97\u5230\u6574\u4f53\u7279\u5f81\u7684\u5e73\u5747\u503c\u3002\u5e73\u5747\u6c60\u5316\u5728\u63d0\u53d6\u56fe\u50cf\u4e2d\u7684\u6574\u4f53\u7279\u5f81\u3001\u51cf\u5c11\u566a\u58f0\u7b49\u65b9\u9762\u5177\u6709\u8f83\u597d\u7684\u6548\u679c\u3002<\/p>\n<h3>3.2 \u6c60\u5316\u5c42\u8ba1\u7b97<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6574\u4f53\u7ed3\u6784&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"220\" src=\"2025-04-27at404jaxgsu.png\" width=\"282\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u8ba1\u7b97&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"800\" src=\"2025-04-27mxeqveqkgfo.png\" width=\"927\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6700\u5927\u6c60\u5316:<\/p>\n<li>\n<p>max(0, 1, 3, 4)<\/p>\n<\/li>\n<li>\n<p>max(1, 2, 4, 5)<\/p>\n<\/li>\n<li>\n<p>max(3, 4, 6, 7)<\/p>\n<\/li>\n<li>\n<p>max(4, 5, 7, 8)<\/p>\n<\/li>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5e73\u5747\u6c60\u5316:<\/p>\n<li>\n<p>mean(0, 1, 3, 4)<\/p>\n<\/li>\n<li>\n<p>mean(1, 2, 4, 5)<\/p>\n<\/li>\n<li>\n<p>mean(3, 4, 6, 7)<\/p>\n<\/li>\n<li>\n<p>mean(4, 5, 7, 8)<\/p>\n<\/li>\n<h3>3.3 \u6b65\u957f(Stride)<\/h3>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"800\" src=\"2025-04-275zrkhiseqkw.png\" width=\"926\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6700\u5927\u6c60\u5316:<\/p>\n<li>\n<p>max(0, 1, 4, 5)<\/p>\n<\/li>\n<li>\n<p>max(2, 3, 6, 7)<\/p>\n<\/li>\n<li>\n<p>max(8, 9, 12, 13)<\/p>\n<\/li>\n<li>\n<p>max(10, 11, 14, 15)<\/p>\n<\/li>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5e73\u5747\u6c60\u5316:<\/p>\n<li>\n<p>mean(0, 1, 4, 5)<\/p>\n<\/li>\n<li>\n<p>mean(2, 3, 6, 7)<\/p>\n<\/li>\n<li>\n<p>mean(8, 9, 12, 13)<\/p>\n<\/li>\n<li>\n<p>mean(10, 11, 14, 15)<\/p>\n<\/li>\n<h3>3.4 \u8fb9\u7f18\u586b\u5145(Padding)<\/h3>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"800\" src=\"2025-04-27x0zpkn2x3af.png\" width=\"928\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6700\u5927\u6c60\u5316:<\/p>\n<li>\n<p>max(0, 0, 0, 0)<\/p>\n<\/li>\n<li>\n<p>max(0, 0, 0, 1)<\/p>\n<\/li>\n<li>\n<p>max(0, 0, 1, 2)<\/p>\n<\/li>\n<li>\n<p>max(0, 0, 2, 0)<\/p>\n<\/li>\n<li>\n<p>&#8230; \u4ee5\u6b64\u7c7b\u63a8<\/p>\n<\/li>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5e73\u5747\u6c60\u5316:<\/p>\n<li>\n<p>mean(0, 0, 0, 0)<\/p>\n<\/li>\n<li>\n<p>mean(0, 0, 0, 1)<\/p>\n<\/li>\n<li>\n<p>mean(0, 0, 1, 2)<\/p>\n<\/li>\n<li>\n<p>mean(0, 0, 2, 0)<\/p>\n<\/li>\n<li>\n<p>&#8230; \u4ee5\u6b64\u7c7b\u63a8<\/p>\n<\/li>\n<h3>3.5 \u591a\u901a\u9053\u6c60\u5316\u8ba1\u7b97<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u5904\u7406\u591a\u901a\u9053\u8f93\u5165\u6570\u636e\u65f6&#xff0c;\u6c60\u5316\u5c42\u5bf9\u6bcf\u4e2a\u8f93\u5165\u901a\u9053\u5206\u522b\u6c60\u5316&#xff0c;\u800c\u4e0d\u662f\u50cf\u5377\u79ef\u5c42\u90a3\u6837\u5c06\u5404\u4e2a\u901a\u9053\u7684\u8f93\u5165\u76f8\u52a0\u3002\u8fd9\u610f\u5473\u7740\u6c60\u5316\u5c42\u7684\u8f93\u51fa\u548c\u8f93\u5165\u7684\u901a\u9053\u6570\u662f\u76f8\u7b49\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1000\" src=\"2025-04-27qfmm3rrbsjo.png\" width=\"957\" \/><\/p>\n<h3>3.6 \u6c60\u5316\u5c42\u7684\u4f5c\u7528<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6c60\u5316\u64cd\u4f5c\u7684\u4f18\u52bf\u6709&#xff1a; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a01. \u901a\u8fc7\u964d\u4f4e\u7279\u5f81\u56fe\u7684\u5c3a\u5bf8&#xff0c;\u6c60\u5316\u5c42\u80fd\u591f\u51cf\u5c11\u8ba1\u7b97\u91cf&#xff0c;\u4ece\u800c\u63d0\u5347\u6a21\u578b\u7684\u8fd0\u884c\u6548\u7387\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a02. \u6c60\u5316\u64cd\u4f5c\u53ef\u4ee5\u5e26\u6765\u7279\u5f81\u7684\u5e73\u79fb\u3001\u65cb\u8f6c\u7b49\u4e0d\u53d8\u6027&#xff0c;\u8fd9\u6709\u52a9\u4e8e\u63d0\u9ad8\u6a21\u578b\u5bf9\u8f93\u5165\u6570\u636e\u7684\u9c81\u68d2\u6027\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a03. \u6c60\u5316\u5c42\u901a\u5e38\u662f\u975e\u7ebf\u6027\u64cd\u4f5c&#xff0c;\u4f8b\u5982\u6700\u5927\u503c\u6c60\u5316&#xff0c;\u8fd9\u6837\u53ef\u4ee5\u589e\u5f3a\u7f51\u7edc\u7684\u8868\u8fbe\u80fd\u529b&#xff0c;\u8fdb\u4e00\u6b65\u63d0\u5347\u6a21\u578b\u7684\u6027\u80fd\u3002<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6c60\u5316\u7684\u7f3a\u70b9&#xff1a;\u6c60\u5316\u64cd\u4f5c\u4f1a\u4e22\u5931\u4e00\u4e9b\u4fe1\u606f&#xff0c;\u8fd9\u662f\u5b83\u6700\u5927\u7684\u7f3a\u70b9&#xff1b;<\/p>\n<h3>3.7 \u6c60\u5316API\u4f7f\u7528<\/h3>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u793a\u4f8b&#xff1a;<\/p>\n<p>import torch<br \/>\nimport torch.nn as nn<\/p>\n<p># 1. API \u57fa\u672c\u4f7f\u7528<br \/>\ndef test01():<\/p>\n<p>    inputs &#061; torch.tensor([[0, 1, 2], [3, 4, 5], [6, 7, 8]]).float()<br \/>\n    inputs &#061; inputs.unsqueeze(0).unsqueeze(0)<\/p>\n<p>    # 1. \u6700\u5927\u6c60\u5316<br \/>\n    # \u8f93\u5165\u5f62\u72b6: (N, C, H, W)<br \/>\n    polling &#061; nn.MaxPool2d(kernel_size&#061;2, stride&#061;1, padding&#061;0)<br \/>\n    output &#061; polling(inputs)<br \/>\n    print(output)<\/p>\n<p>    # 2. \u5e73\u5747\u6c60\u5316<br \/>\n    polling &#061; nn.AvgPool2d(kernel_size&#061;2, stride&#061;1, padding&#061;0)<br \/>\n    output &#061; polling(inputs)<br \/>\n    print(output)<\/p>\n<p># 2. stride \u6b65\u957f<br \/>\ndef test02():<\/p>\n<p>    inputs &#061; torch.tensor([[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11], [12, 13, 14, 15]]).float()<br \/>\n    inputs &#061; inputs.unsqueeze(0).unsqueeze(0)<\/p>\n<p>    # 1. \u6700\u5927\u6c60\u5316<br \/>\n    polling &#061; nn.MaxPool2d(kernel_size&#061;2, stride&#061;2, padding&#061;0)<br \/>\n    output &#061; polling(inputs)<br \/>\n    print(output)<\/p>\n<p>    # 2. \u5e73\u5747\u6c60\u5316<br \/>\n    polling &#061; nn.AvgPool2d(kernel_size&#061;2, stride&#061;2, padding&#061;0)<br \/>\n    output &#061; polling(inputs)<br \/>\n    print(output)<\/p>\n<p># 3. padding \u586b\u5145<br \/>\ndef test03():<\/p>\n<p>    inputs &#061; torch.tensor([[0, 1, 2], [3, 4, 5], [6, 7, 8]]).float()<br \/>\n    inputs &#061; inputs.unsqueeze(0).unsqueeze(0)<\/p>\n<p>    # 1. \u6700\u5927\u6c60\u5316<br \/>\n    polling &#061; nn.MaxPool2d(kernel_size&#061;2, stride&#061;1, padding&#061;1)<br \/>\n    output &#061; polling(inputs)<br \/>\n    print(output)<\/p>\n<p>    # 2. \u5e73\u5747\u6c60\u5316<br \/>\n    polling &#061; nn.AvgPool2d(kernel_size&#061;2, stride&#061;1, padding&#061;1)<br \/>\n    output &#061; polling(inputs)<br \/>\n    print(output)<\/p>\n<p># 4. \u591a\u901a\u9053\u6c60\u5316<br \/>\ndef test04():<\/p>\n<p>    inputs &#061; torch.tensor([[[0, 1, 2], [3, 4, 5], [6, 7, 8]],<br \/>\n                           [[10, 20, 30], [40, 50, 60], [70, 80, 90]],<br \/>\n                           [[11, 22, 33], [44, 55, 66], [77, 88, 99]]]).float()<\/p>\n<p>    inputs &#061; inputs.unsqueeze(0)<\/p>\n<p>    # \u6700\u5927\u6c60\u5316<br \/>\n    polling &#061; nn.MaxPool2d(kernel_size&#061;2, stride&#061;1, padding&#061;0)<br \/>\n    output &#061; polling(inputs)<br \/>\n    print(output)<\/p>\n<p>if __name__ &#061;&#061; &#039;__main__&#039;:<br \/>\n    test04() <\/p>\n<h3>3.8\u00a0\u77e5\u8bc6\u70b9\u6269\u5c55<\/h3>\n<li>\n<p>\u6df1\u5165\u7406\u89e3\u9898&#xff1a;\u8bf7\u8be6\u7ec6\u89e3\u91ca\u6c60\u5316\u5c42\u5728\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u4e2d\u7684\u4f5c\u7528&#xff0c;\u5e76\u4e3e\u4f8b\u8bf4\u660e\u5176\u5982\u4f55\u901a\u8fc7\u964d\u4f4e\u7a7a\u95f4\u7ef4\u5ea6\u548c\u53c2\u6570\u6570\u91cf\u6765\u63d0\u9ad8\u6a21\u578b\u7684\u6548\u7387\u548c\u6cdb\u5316\u80fd\u529b\u3002<\/p>\n<\/li>\n<li>\n<p>\u68af\u5ea6\u4f20\u64ad\u5206\u6790\u9898&#xff1a;\u5728\u53cd\u5411\u4f20\u64ad\u8fc7\u7a0b\u4e2d&#xff0c;\u6c60\u5316\u5c42\u662f\u5982\u4f55\u8ba1\u7b97\u5e76\u4f20\u9012\u68af\u5ea6\u7684&#xff1f;\u8bf7\u63cf\u8ff0\u6700\u5927\u6c60\u5316\u4e0e\u5e73\u5747\u6c60\u5316\u7684\u68af\u5ea6\u8ba1\u7b97\u5dee\u5f02\u3002<\/p>\n<\/li>\n<li>\n<p>\u81ea\u9002\u5e94\u6c60\u5316\u7b56\u7565\u9898&#xff1a;\u4ecb\u7ecd\u7a7a\u95f4\u91d1\u5b57\u5854\u6c60\u5316&#xff08;Spatial Pyramid Pooling, SPP&#xff09;\u6216\u53ef\u53d8\u5f62\u6c60\u5316&#xff08;Deformable Pooling&#xff09;\u7b49\u81ea\u9002\u5e94\u6c60\u5316\u7b56\u7565\u7684\u5de5\u4f5c\u539f\u7406&#xff0c;\u4ee5\u53ca\u5b83\u4eec\u5982\u4f55\u89e3\u51b3\u6807\u51c6\u6c60\u5316\u5c42\u5bf9\u8f93\u5165\u5c3a\u5bf8\u56fa\u5b9a\u4f9d\u8d56\u7684\u95ee\u9898\u3002<\/p>\n<\/li>\n<li>\n<p>\u591a\u5c3a\u5ea6\u7279\u5f81\u878d\u5408\u9898&#xff1a;\u5982\u4f55\u5229\u7528\u4e0d\u540c\u5927\u5c0f\u7684\u6c60\u5316\u7a97\u53e3\u6765\u63d0\u53d6\u591a\u5c3a\u5ea6\u7279\u5f81&#xff1f;\u8bf7\u7ed3\u5408\u5177\u4f53\u5b9e\u4f8b\u9610\u8ff0\u591a\u5c3a\u5ea6\u6c60\u5316\u5728\u76ee\u6807\u68c0\u6d4b\u3001\u56fe\u50cf\u5206\u7c7b\u7b49\u4efb\u52a1\u4e2d\u7684\u5e94\u7528\u4ef7\u503c\u3002<\/p>\n<\/li>\n<li>\n<p>\u7406\u8bba\u63a2\u8ba8\u9898&#xff1a;\u6c60\u5316\u5c42\u662f\u5426\u4e00\u5b9a\u80fd\u591f\u9632\u6b62\u8fc7\u62df\u5408&#xff1f;\u662f\u5426\u5b58\u5728\u53ef\u80fd\u5f15\u5165\u6b20\u62df\u5408\u7684\u98ce\u9669&#xff1f;\u5982\u679c\u6709&#xff0c;\u5e94\u5982\u4f55\u5e73\u8861\u6c60\u5316\u5e26\u6765\u7684\u4f18\u52bf\u548c\u6f5c\u5728\u95ee\u9898&#xff1f;<\/p>\n<\/li>\n<li>\n<p>\u672a\u6765\u53d1\u5c55\u65b9\u5411\u9898&#xff1a;\u9488\u5bf9\u672a\u6765\u7814\u7a76\u65b9\u5411&#xff0c;\u4f60\u8ba4\u4e3a\u6c60\u5316\u5c42\u7684\u8bbe\u8ba1\u4f1a\u6709\u54ea\u4e9b\u53ef\u80fd\u7684\u53d1\u5c55\u8d8b\u52bf\u6216\u6539\u8fdb\u70b9&#xff0c;\u4f8b\u5982\u6ce8\u610f\u529b\u673a\u5236\u5728\u6c60\u5316\u8fc7\u7a0b\u4e2d\u7684\u5e94\u7528\u3001\u52a8\u6001\u6c60\u5316\u7b56\u7565\u7b49\u3002<\/p>\n<\/li>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"354\" src=\"2025-04-27n5gt1m0vdxa.png\" width=\"1200\" \/><\/p>\n<h2>4. \u6574\u4f53\u7ed3\u6784<\/h2>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"338\" src=\"2025-04-27dzxgapovf2a.png\" width=\"900\" \/><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"398\" src=\"2025-04-27v23nevqowww.png\" width=\"1200\" \/><\/p>\n<h3>4.1 \u7279\u5f81\u56fe\u53d8\u5316<\/h3>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"297\" src=\"2025-04-27fmyadv3aqeg.png\" width=\"800\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb865\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u89c6\u89c9\u5904\u7406\u4e09\u5927\u4efb\u52a1\uff1a\u56fe\u50cf\u5206\u7c7b\u3001\u76ee\u6807\u68c0\u6d4b\u3001\u56fe\u50cf\u5206\u5272\u63d0\u53d6\u7279\u5f81\uff0cCNN\u5206\u7c7b\u3001\u3001\u5206\u5272\u7b49\uff0c\u5177\u4f53\u7684\u4e1a\u52a1\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u662f\u6df1\u5ea6\u5b66\u4e60\u5728\u8ba1\u7b97\u673a\u89c6\u89c9\u9886\u57df\u7684\u7a81\u7834\u6027\u6210\u679c\u3002\u5728\u8ba1\u7b97\u673a\u89c6\u89c9\u9886\u57df, \u5f80\u5f80\u6211\u4eec\u8f93\u5165\u7684\u56fe\u50cf\u90fd\u5f88\u5927\uff0c\u4f7f\u7528\u5168\u8fde\u63a5\u7f51\u7edc\u7684\u8bdd\uff0c\u8ba1\u7b97\u7684\u4ee3\u4ef7\u8f83\u9ad8\u3002\u53e6\u5916\u56fe\u50cf\u4e5f\u5f88\u96be\u4fdd\u7559\u539f\u6709\u7684\u7279\u5f81\uff0c\u5bfc\u81f4\u56fe\u50cf\u5904\u7406\u7684\u51c6\u786e\u7387\u4e0d\u9ad8\u3002\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\uff08Convolutional Neural Network\uff0cCNN\uff09\u662f\u4e00\u79cd\u4e13\u95e8\u7528\u4e8e\u5904\u7406\u5177\u6709\u7f51\u683c\u72b6\u7ed3\u6784\u6570\u636e\u7684\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\u3002\u6700\u521d\uff0cCNN\u4e3b\u8981\u5e94\u7528\u4e8e\u8ba1\u7b97\u673a\u89c6\u89c9\u4efb\u52a1\uff0c\u4f46\u5b83\u7684\u6210\u529f\u542f\u53d1\u4e86\u5728\u5176\u4ed6\u9886\u57df\u5e94\u7528\uff0c\u5982\u81ea\u7136\u8bed\u8a00\u5904\u7406\u7b49\u3002<\/p>\n","protected":false},"author":2,"featured_media":33212,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2394,50,86],"topic":[],"class_list":["post-33232","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-cnn","tag-50","tag-86"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6df1\u5ea6\u5b66\u4e60 \u89c6\u89c9\u5904\u7406(CNN) day_01 - \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\/33232.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6df1\u5ea6\u5b66\u4e60 \u89c6\u89c9\u5904\u7406(CNN) day_01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb865\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u89c6\u89c9\u5904\u7406\u4e09\u5927\u4efb\u52a1\uff1a\u56fe\u50cf\u5206\u7c7b\u3001\u76ee\u6807\u68c0\u6d4b\u3001\u56fe\u50cf\u5206\u5272\u63d0\u53d6\u7279\u5f81\uff0cCNN\u5206\u7c7b\u3001\u3001\u5206\u5272\u7b49\uff0c\u5177\u4f53\u7684\u4e1a\u52a1\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u662f\u6df1\u5ea6\u5b66\u4e60\u5728\u8ba1\u7b97\u673a\u89c6\u89c9\u9886\u57df\u7684\u7a81\u7834\u6027\u6210\u679c\u3002\u5728\u8ba1\u7b97\u673a\u89c6\u89c9\u9886\u57df, \u5f80\u5f80\u6211\u4eec\u8f93\u5165\u7684\u56fe\u50cf\u90fd\u5f88\u5927\uff0c\u4f7f\u7528\u5168\u8fde\u63a5\u7f51\u7edc\u7684\u8bdd\uff0c\u8ba1\u7b97\u7684\u4ee3\u4ef7\u8f83\u9ad8\u3002\u53e6\u5916\u56fe\u50cf\u4e5f\u5f88\u96be\u4fdd\u7559\u539f\u6709\u7684\u7279\u5f81\uff0c\u5bfc\u81f4\u56fe\u50cf\u5904\u7406\u7684\u51c6\u786e\u7387\u4e0d\u9ad8\u3002\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\uff08Convolutional Neural Network\uff0cCNN\uff09\u662f\u4e00\u79cd\u4e13\u95e8\u7528\u4e8e\u5904\u7406\u5177\u6709\u7f51\u683c\u72b6\u7ed3\u6784\u6570\u636e\u7684\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\u3002\u6700\u521d\uff0cCNN\u4e3b\u8981\u5e94\u7528\u4e8e\u8ba1\u7b97\u673a\u89c6\u89c9\u4efb\u52a1\uff0c\u4f46\u5b83\u7684\u6210\u529f\u542f\u53d1\u4e86\u5728\u5176\u4ed6\u9886\u57df\u5e94\u7528\uff0c\u5982\u81ea\u7136\u8bed\u8a00\u5904\u7406\u7b49\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/33232.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-26T18:52:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185248-680d2b80c715b.png\" \/>\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=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/33232.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/33232.html\",\"name\":\"\u6df1\u5ea6\u5b66\u4e60 \u89c6\u89c9\u5904\u7406(CNN) day_01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-26T18:52:55+00:00\",\"dateModified\":\"2025-04-26T18:52:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/33232.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/33232.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/33232.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6df1\u5ea6\u5b66\u4e60 \u89c6\u89c9\u5904\u7406(CNN) day_01\"}]},{\"@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":"\u6df1\u5ea6\u5b66\u4e60 \u89c6\u89c9\u5904\u7406(CNN) day_01 - \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\/33232.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6df1\u5ea6\u5b66\u4e60 \u89c6\u89c9\u5904\u7406(CNN) day_01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb865\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u89c6\u89c9\u5904\u7406\u4e09\u5927\u4efb\u52a1\uff1a\u56fe\u50cf\u5206\u7c7b\u3001\u76ee\u6807\u68c0\u6d4b\u3001\u56fe\u50cf\u5206\u5272\u63d0\u53d6\u7279\u5f81\uff0cCNN\u5206\u7c7b\u3001\u3001\u5206\u5272\u7b49\uff0c\u5177\u4f53\u7684\u4e1a\u52a1\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u662f\u6df1\u5ea6\u5b66\u4e60\u5728\u8ba1\u7b97\u673a\u89c6\u89c9\u9886\u57df\u7684\u7a81\u7834\u6027\u6210\u679c\u3002\u5728\u8ba1\u7b97\u673a\u89c6\u89c9\u9886\u57df, \u5f80\u5f80\u6211\u4eec\u8f93\u5165\u7684\u56fe\u50cf\u90fd\u5f88\u5927\uff0c\u4f7f\u7528\u5168\u8fde\u63a5\u7f51\u7edc\u7684\u8bdd\uff0c\u8ba1\u7b97\u7684\u4ee3\u4ef7\u8f83\u9ad8\u3002\u53e6\u5916\u56fe\u50cf\u4e5f\u5f88\u96be\u4fdd\u7559\u539f\u6709\u7684\u7279\u5f81\uff0c\u5bfc\u81f4\u56fe\u50cf\u5904\u7406\u7684\u51c6\u786e\u7387\u4e0d\u9ad8\u3002\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\uff08Convolutional Neural Network\uff0cCNN\uff09\u662f\u4e00\u79cd\u4e13\u95e8\u7528\u4e8e\u5904\u7406\u5177\u6709\u7f51\u683c\u72b6\u7ed3\u6784\u6570\u636e\u7684\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\u3002\u6700\u521d\uff0cCNN\u4e3b\u8981\u5e94\u7528\u4e8e\u8ba1\u7b97\u673a\u89c6\u89c9\u4efb\u52a1\uff0c\u4f46\u5b83\u7684\u6210\u529f\u542f\u53d1\u4e86\u5728\u5176\u4ed6\u9886\u57df\u5e94\u7528\uff0c\u5982\u81ea\u7136\u8bed\u8a00\u5904\u7406\u7b49\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/33232.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-26T18:52:55+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250426185248-680d2b80c715b.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/33232.html","url":"https:\/\/www.wsisp.com\/helps\/33232.html","name":"\u6df1\u5ea6\u5b66\u4e60 \u89c6\u89c9\u5904\u7406(CNN) day_01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-26T18:52:55+00:00","dateModified":"2025-04-26T18:52:55+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/33232.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/33232.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/33232.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6df1\u5ea6\u5b66\u4e60 \u89c6\u89c9\u5904\u7406(CNN) day_01"}]},{"@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\/33232","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=33232"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/33232\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/33212"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=33232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=33232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=33232"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=33232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}