{"id":121727,"date":"2026-11-03T14:08:39","date_gmt":"2026-11-03T06:08:39","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/121727.html"},"modified":"2026-11-03T14:08:39","modified_gmt":"2026-11-03T06:08:39","slug":"%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0%e5%85%a5%e9%97%a8%ef%bc%88%e4%b8%80%ef%bc%89%ef%bc%9a%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0%e5%88%b0%e5%ba%95%e6%98%af%e4%bb%80%e4%b9%88%ef%bc%9f%e4%bb%8e%e6%8b%9f","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/121727.html","title":{"rendered":"\u6df1\u5ea6\u5b66\u4e60\u5165\u95e8\uff08\u4e00\uff09\uff1a\u6df1\u5ea6\u5b66\u4e60\u5230\u5e95\u662f\u4ec0\u4e48\uff1f\u4ece\u62df\u5408\u4e00\u6761\u76f4\u7ebf\u8bb2\u8d77"},"content":{"rendered":"<h3>\u5f15\u8a00<\/h3>\n<p>\u9762\u8bd5\u7684\u65f6\u5019\u6211\u5e38\u95ee\u4e00\u4e2a\u95ee\u9898&#xff1a;<\/p>\n<p>&#034;\u795e\u7ecf\u7f51\u7edc\u8bad\u7ec3\u7684\u65f6\u5019&#xff0c;\u5230\u5e95\u5728\u6539\u52a8\u4ec0\u4e48&#xff1f;&#034;<\/p>\n<p>\u5341\u4e2a\u4eba\u91cc\u6709\u516d\u4e2a\u56de\u7b54&#034;\u5728\u8c03\u6574\u6743\u91cd&#034;&#xff0c;\u7136\u540e\u8ffd\u95ee&#034;\u600e\u4e48\u8c03&#034;&#xff0c;\u5c31\u5361\u4f4f\u4e86\u3002\u5269\u4e0b\u56db\u4e2a\u80fd\u8bf4\u51fa&#034;\u68af\u5ea6\u4e0b\u964d&#034;&#xff0c;\u4f46\u518d\u95ee&#034;\u68af\u5ea6\u662f\u4ec0\u4e48\u3001\u4e3a\u4ec0\u4e48\u6cbf\u7740\u5b83\u53cd\u65b9\u5411\u8d70\u5c31\u80fd\u964d loss&#034;&#xff0c;\u57fa\u672c\u5168\u519b\u8986\u6ca1\u3002<\/p>\n<p>\u8fd9\u4e0d\u662f\u4ed6\u4eec\u7684\u9519\u3002\u7edd\u5927\u90e8\u5206\u6559\u7a0b\u7684\u8bb2\u6cd5\u662f&#xff1a;\u5148\u7529\u4e00\u4e2a\u591a\u5c42\u7f51\u7edc\u7ed3\u6784\u56fe&#xff0c;\u518d\u7529\u4e00\u5806\u516c\u5f0f&#xff0c;\u6700\u540e\u4e22\u4e00\u6bb5 30 \u884c\u7684\u8bad\u7ec3\u4ee3\u7801\u3002\u4e2d\u95f4&#034;\u4e3a\u4ec0\u4e48&#034;\u7684\u90e8\u5206&#xff0c;\u88ab\u8df3\u8fc7\u4e86\u3002<\/p>\n<p>\u6240\u4ee5\u8fd9\u4e00\u7bc7\u6211\u53cd\u7740\u6765&#xff1a;\u5148\u4e0d\u8bb2\u795e\u7ecf\u7f51\u7edc&#xff0c;\u5148\u8bb2\u521d\u4e2d\u5c31\u5b66\u8fc7\u7684\u76f4\u7ebf\u62df\u5408\u3002<\/p>\n<p>\u539f\u56e0\u5f88\u7b80\u5355\u2014\u2014\u6df1\u5ea6\u5b66\u4e60\u5c31\u662f&#034;\u76f4\u7ebf\u7684\u62df\u5408&#034;\u52a0\u4e0a\u4e00\u4e07\u500d\u7684\u53c2\u6570\u548c\u975e\u7ebf\u6027\u3002\u4f60\u628a\u8fd9\u6761\u76f4\u7ebf\u5f7b\u5e95\u641e\u61c2\u4e86&#xff0c;\u540e\u9762\u7684\u4e00\u5207\u90fd\u53ea\u662f&#034;\u53c2\u6570\u53d8\u591a&#034;\u5e26\u6765\u7684\u5de5\u7a0b\u95ee\u9898\u3002<\/p>\n<hr \/>\n<h3>\u6b63\u6587<\/h3>\n<h4>\u4e00\u3001\u4e00\u4e2a\u5177\u4f53\u7684\u95ee\u9898&#xff1a;\u9884\u6d4b\u623f\u4ef7<\/h4>\n<p>\u5047\u8bbe\u4f60\u624b\u4e0a\u6709 10 \u5957\u623f\u5b50\u7684\u6570\u636e&#xff0c;\u53ea\u6709\u4e24\u5217&#xff1a;\u9762\u79ef&#xff08;\u5e73\u7c73&#xff09;\u548c\u603b\u4ef7&#xff08;\u4e07\u5143&#xff09;\u3002<\/p>\n<table>\n<tr>\u9762\u79ef $x$\u603b\u4ef7 $y$<\/tr>\n<tbody>\n<tr>\n<td>50<\/td>\n<td>180<\/td>\n<\/tr>\n<tr>\n<td>60<\/td>\n<td>210<\/td>\n<\/tr>\n<tr>\n<td>75<\/td>\n<td>260<\/td>\n<\/tr>\n<tr>\n<td>90<\/td>\n<td>305<\/td>\n<\/tr>\n<tr>\n<td>110<\/td>\n<td>370<\/td>\n<\/tr>\n<tr>\n<td>&#8230;<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u73b0\u5728\u6765\u4e86\u7b2c 11 \u5957\u623f\u5b50&#xff0c;\u9762\u79ef 100 \u5e73&#xff0c;\u95ee&#xff1a;\u5356\u591a\u5c11\u94b1&#xff1f;<\/p>\n<p>\u4eba\u8111\u7684\u505a\u6cd5\u662f\u753b\u6563\u70b9\u56fe&#xff0c;\u7136\u540e&#034;\u753b\u4e00\u6761\u7a7f\u8fc7\u8fd9\u4e9b\u70b9\u7684\u7ebf&#034;&#xff0c;\u518d\u5728\u6a2a\u8f74 100 \u7684\u5730\u65b9\u627e\u5230\u7ebf\u4e0a\u5bf9\u5e94\u7684\u7eb5\u5750\u6807\u3002\u8fd9\u4e2a\u52a8\u4f5c&#xff0c;\u5c31\u662f\u62df\u5408&#xff0c;\u4e5f\u662f\u6df1\u5ea6\u5b66\u4e60\u7684\u5168\u90e8\u8d77\u70b9\u3002<\/p>\n<h4>\u4e8c\u3001\u6a21\u578b&#xff1a;\u5148\u5047\u8bbe\u4e00\u4e2a\u5f62\u72b6<\/h4>\n<p>\u8981\u753b\u7ebf&#xff0c;\u5f97\u5148\u51b3\u5b9a\u753b\u4ec0\u4e48\u5f62\u72b6\u7684\u7ebf\u3002\u6700\u7b80\u5355\u7684\u662f\u76f4\u7ebf&#xff1a;<\/p>\n<p>$$<br \/>\n\\\\hat{y} &#061; w x &#043; b<br \/>\n$$<\/p>\n<\/p>\n<p>\u8fd9\u5c31\u662f\u4e00\u4e2a\u6a21\u578b\u3002\u6ce8\u610f\u5b83\u7684\u4e09\u4e2a\u7279\u70b9&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u8f93\u5165 $x$ \u662f\u5df2\u77e5\u7684&#xff08;\u9762\u79ef&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u8f93\u51fa $\\\\hat{y}$ \u662f\u8981\u7b97\u7684&#xff08;\u9884\u6d4b\u4ef7\u683c&#xff0c;\u5e3d\u5b50\u7b26\u53f7\u8868\u793a&#034;\u9884\u6d4b\u503c&#034;&#xff0c;\u4ee5\u533a\u522b\u4e8e\u771f\u5b9e\u503c $y$&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>$w$ \u548c $b$ \u662f\u672a\u77e5\u7684&#xff0c;\u9700\u8981\u4ece\u6570\u636e\u91cc\u5b66\u51fa\u6765\u3002<\/p>\n<\/li>\n<\/ul>\n<p>$w$ \u53eb\u6743\u91cd&#xff08;weight&#xff09;&#xff0c;\u63a7\u5236\u659c\u7387&#xff1b;$b$ \u53eb\u504f\u7f6e&#xff08;bias&#xff09;&#xff0c;\u63a7\u5236\u622a\u8ddd\u3002\u8fd9\u4e24\u4e2a\u4e1c\u897f&#xff0c;\u5c31\u662f\u53c2\u6570&#xff08;parameter&#xff09;\u3002<\/p>\n<p>\u4e8e\u662f\u95ee\u9898\u88ab\u7ffb\u8bd1\u6210\u4e86\u6570\u5b66\u8bed\u8a00&#xff1a;<\/p>\n<p>\u627e\u5230\u4e00\u7ec4 $(w, b)$&#xff0c;\u4f7f\u5f97\u5bf9\u6240\u6709\u7684\u8bad\u7ec3\u6837\u672c&#xff0c;$wx_i &#043; b$ \u90fd\u5c3d\u91cf\u63a5\u8fd1 $y_i$\u3002<\/p>\n<p>&#034;\u5b66\u4e60&#034;\u8fd9\u4e2a\u8bcd\u542c\u8d77\u6765\u7384&#xff0c;\u843d\u5230\u8fd9\u91cc\u5c31\u662f\u628a $w$ \u548c $b$ \u4ece\u968f\u673a\u6570\u53d8\u6210\u597d\u6570\u3002<\/p>\n<h4>\u4e09\u3001\u597d\u574f\u600e\u4e48\u8861\u91cf&#xff1a;\u635f\u5931\u51fd\u6570<\/h4>\n<p>\u600e\u4e48\u5b9a\u4e49&#034;\u5c3d\u91cf\u63a5\u8fd1&#034;&#xff1f;\u6700\u81ea\u7136\u7684\u60f3\u6cd5\u662f&#xff1a;\u628a\u6bcf\u4e2a\u6837\u672c\u7684\u8bef\u5dee\u90fd\u7b97\u51fa\u6765&#xff0c;\u52a0\u8d77\u6765\u3002<\/p>\n<p>$$<br \/>\nL(w, b) &#061; \\\\frac{1}{N}\\\\sum_{i&#061;1}^{N}\\\\left(\\\\hat{y}_i &#8211; y_i\\\\right)^2 &#061; \\\\frac{1}{N}\\\\sum_{i&#061;1}^{N}\\\\left(w x_i &#043; b &#8211; y_i\\\\right)^2<br \/>\n$$<\/p>\n<\/p>\n<p>\u8fd9\u4e2a $L$ \u53eb\u635f\u5931\u51fd\u6570&#xff08;loss function&#xff09;&#xff0c;\u4e5f\u53eb\u76ee\u6807\u51fd\u6570\u3001\u4ee3\u4ef7\u51fd\u6570\u3002\u6df1\u5ea6\u5b66\u4e60\u91cc 90% \u7684\u65f6\u95f4&#xff0c;\u672c\u8d28\u4e0a\u90fd\u662f\u5728\u6700\u5c0f\u5316\u4e00\u4e2a\u635f\u5931\u51fd\u6570\u3002<\/p>\n<p>\u4e3a\u4ec0\u4e48\u7528\u5e73\u65b9\u800c\u4e0d\u662f\u7edd\u5bf9\u503c&#xff1f;\u4e24\u4e2a\u539f\u56e0&#xff1a;<\/p>\n<li>\n<p>\u5e73\u65b9\u5bf9\u5927\u8bef\u5dee\u60e9\u7f5a\u66f4\u91cd\u3002\u8bef\u5dee 10 \u7684\u5e73\u65b9\u662f 100&#xff0c;\u8bef\u5dee 1 \u7684\u5e73\u65b9\u662f 1&#xff0c;\u5dee 100 \u500d\u3002\u8fd9\u903c\u7740\u6a21\u578b\u5148\u53bb\u4fee\u6b63\u90a3\u4e9b\u9519\u5f97\u79bb\u8c31\u7684\u6837\u672c&#xff0c;\u7b26\u5408\u76f4\u89c9\u3002<\/p>\n<\/li>\n<li>\n<p>\u5e73\u65b9\u5904\u5904\u53ef\u5bfc\u3002\u7edd\u5bf9\u503c\u5728 0 \u70b9\u6709\u4e2a\u5c16\u89d2&#xff0c;\u5bfc\u6570\u4e0d\u5b58\u5728&#xff0c;\u800c\u68af\u5ea6\u4e0b\u964d\u9700\u8981\u5bfc\u6570\u5904\u5904\u5b58\u5728\u3002\u8fd9\u662f\u4e2a\u975e\u5e38\u5de5\u7a0b\u5316\u7684\u7406\u7531&#xff0c;\u4f46\u5b83\u5f88\u91cd\u8981\u3002<\/p>\n<\/li>\n<p>\u6ce8\u610f\u8fd9\u91cc\u6709\u4e2a 1\/N\u3002\u5b83\u662f\u628a&#034;\u603b\u8bef\u5dee&#034;\u53d8\u6210&#034;\u5e73\u5747\u8bef\u5dee&#034;&#xff0c;\u597d\u5904\u662f loss \u7684\u6570\u503c\u4e0d\u968f\u6837\u672c\u6570\u91cf\u53d8\u5316&#xff0c;\u4f60\u6362\u4e00\u4e2a batch \u5927\u5c0f&#xff0c;\u6307\u6807\u8fd8\u53ef\u6bd4\u3002<\/p>\n<h4>\u56db\u3001\u600e\u4e48\u6539&#xff1a;\u68af\u5ea6\u4e0b\u964d<\/h4>\n<p>\u73b0\u5728\u6709\u4e86\u76ee\u6807&#xff1a;\u6700\u5c0f\u5316 $L(w,b)$\u3002\u95ee\u9898\u662f&#xff0c;$w$ \u548c $b$ \u6709\u65e0\u7a77\u591a\u79cd\u7ec4\u5408&#xff0c;\u600e\u4e48\u627e&#xff1f;<\/p>\n<p>\u5148\u770b\u4e00\u4e2a\u4e00\u7ef4\u7684\u7b80\u5316&#xff1a;\u5047\u8bbe $b$ \u5df2\u7ecf\u56fa\u5b9a&#xff0c;\u53ea\u770b $L$ \u968f $w$ \u7684\u53d8\u5316\u3002\u5b83\u662f\u4e00\u6761\u629b\u7269\u7ebf&#xff08;\u56e0\u4e3a $L$ \u662f $w$ \u7684\u4e8c\u6b21\u51fd\u6570&#xff09;&#xff0c;\u5f00\u53e3\u5411\u4e0a\u3002<\/p>\n<p>\u5173\u952e\u6d1e\u5bdf&#xff1a;\u5728\u629b\u7269\u7ebf\u4e0a\u968f\u4fbf\u7ad9\u4e00\u4e2a\u70b9&#xff0c;\u5982\u679c\u4f60\u77e5\u9053\u8fd9\u70b9\u5904\u7684\u659c\u7387&#xff0c;\u4f60\u5c31\u77e5\u9053\u8be5\u5f80\u54ea\u8fb9\u8d70\u3002<\/p>\n<ul>\n<li>\n<p>\u659c\u7387\u662f\u6b63\u7684 \u2192 \u5f80\u53f3\u8d70&#xff0c;$L$ \u4f1a\u53d8\u5927 \u2192 \u6240\u4ee5\u5e94\u8be5\u5f80\u5de6\u8d70&#xff08;\u51cf\u5c0f $w$&#xff09;<\/p>\n<\/li>\n<li>\n<p>\u659c\u7387\u662f\u8d1f\u7684 \u2192 \u5f80\u53f3\u8d70&#xff0c;$L$ \u4f1a\u53d8\u5c0f \u2192 \u6240\u4ee5\u5e94\u8be5\u5f80\u53f3\u8d70&#xff08;\u589e\u5927 $w$&#xff09;<\/p>\n<\/li>\n<\/ul>\n<p>\u4e24\u79cd\u60c5\u51b5\u53ef\u4ee5\u7edf\u4e00\u6210\u4e00\u53e5\u8bdd&#xff1a;\u5f80\u659c\u7387\u7684\u53cd\u65b9\u5411\u8d70\u3002\u8fd9\u5c31\u662f\u68af\u5ea6\u4e0b\u964d&#xff08;gradient descent&#xff09;\u7684\u5168\u90e8\u54f2\u5b66\u3002<\/p>\n<p>\u5199\u6210\u516c\u5f0f&#xff1a;<\/p>\n<p>$$<br \/>\nw \\\\leftarrow w &#8211; \\\\eta \\\\frac{\\\\partial L}{\\\\partial w}<br \/>\n$$<\/p>\n<\/p>\n<p>$$<br \/>\nb \\\\leftarrow b &#8211; \\\\eta \\\\frac{\\\\partial L}{\\\\partial b}<br \/>\n$$<\/p>\n<\/p>\n<p>\u5176\u4e2d $\\\\eta$&#xff08;\u8bfb\u4f5c eta&#xff09;\u53eb\u5b66\u4e60\u7387&#xff08;learning rate&#xff09;&#xff0c;\u63a7\u5236\u6bcf\u6b65\u8d70\u591a\u8fdc\u3002\u51cf\u53f7\u5c31\u662f&#034;\u53cd\u65b9\u5411&#034;\u3002<\/p>\n<p>\u591a\u53d8\u91cf\u65f6&#xff0c;&#034;\u659c\u7387&#034;\u5347\u7ea7\u6210&#034;\u68af\u5ea6&#034;\u2014\u2014\u4e00\u4e2a\u5411\u91cf&#xff0c;\u6bcf\u4e2a\u5206\u91cf\u662f\u5bf9\u5e94\u53c2\u6570\u7684\u504f\u5bfc\u6570&#xff1a;<\/p>\n<p>$$<br \/>\n\\\\nabla_\\\\theta L &#061; \\\\left[\\\\frac{\\\\partial L}{\\\\partial w},\\\\ \\\\frac{\\\\partial L}{\\\\partial b}\\\\right]^{\\\\top},\\\\qquad \\\\theta \\\\leftarrow \\\\theta &#8211; \\\\eta \\\\nabla_\\\\theta L<br \/>\n$$<\/p>\n<\/p>\n<p>$\\\\theta$ \u662f\u7528\u6765\u7edf\u79f0\u6240\u6709\u53c2\u6570\u7684\u8bb0\u53f7&#xff0c;\u8fd9\u91cc $\\\\theta &#061; (w, b)$\u3002\u540e\u9762\u53c2\u6570\u53d8\u6210\u51e0\u767e\u4e07\u4e2a\u65f6&#xff0c;\u8fd9\u4e2a\u8bb0\u53f7\u80fd\u7701\u5f88\u591a\u5b57\u3002<\/p>\n<h5>\u624b\u63a8\u4e00\u904d\u68af\u5ea6<\/h5>\n<p>\u522b\u6015&#xff0c;\u5c31\u4e24\u6b65\u3002\u5148\u5c55\u5f00&#xff1a;<\/p>\n<p>$$<br \/>\nL &#061; \\\\frac{1}{N}\\\\sum_{i&#061;1}^{N}\\\\left(w x_i &#043; b &#8211; y_i\\\\right)^2<br \/>\n$$<\/p>\n<\/p>\n<p>\u4ee4 $e_i &#061; w x_i &#043; b &#8211; y_i$&#xff08;\u7b2c $i$ \u4e2a\u6837\u672c\u7684\u8bef\u5dee&#xff09;&#xff0c;\u5219 $L &#061; \\\\frac{1}{N}\\\\sum e_i^2$\u3002<\/p>\n<p>\u5bf9 $w$ \u6c42\u504f\u5bfc&#xff0c;\u7528\u94fe\u5f0f\u6cd5\u5219&#xff1a;\u5916\u5c42\u662f\u5e73\u65b9&#xff0c;\u5185\u5c42\u662f $w x_i &#043; b &#8211; y_i$\u3002<\/p>\n<p>$$<br \/>\n\\\\frac{\\\\partial L}{\\\\partial w} &#061; \\\\frac{1}{N}\\\\sum_{i&#061;1}^{N} 2 e_i \\\\cdot \\\\frac{\\\\partial e_i}{\\\\partial w} &#061; \\\\frac{1}{N}\\\\sum_{i&#061;1}^{N} 2 e_i x_i &#061; \\\\frac{2}{N}\\\\sum_{i&#061;1}^{N}\\\\left(w x_i &#043; b &#8211; y_i\\\\right)x_i<br \/>\n$$<\/p>\n<\/p>\n<p>\u5bf9 $b$ \u6c42\u504f\u5bfc&#xff0c;\u540c\u7406&#xff0c;\u53ea\u662f $\\\\frac{\\\\partial e_i}{\\\\partial b} &#061; 1$&#xff1a;<\/p>\n<p>$$<br \/>\n\\\\frac{\\\\partial L}{\\\\partial b} &#061; \\\\frac{2}{N}\\\\sum_{i&#061;1}^{N}\\\\left(w x_i &#043; b &#8211; y_i\\\\right)<br \/>\n$$<\/p>\n<\/p>\n<p>\u5230\u8fd9\u91cc\u4f60\u5c31\u5df2\u7ecf\u4f1a\u53cd\u5411\u4f20\u64ad\u7684\u6838\u5fc3\u4e86\u2014\u2014\u771f\u7684\u3002\u53cd\u5411\u4f20\u64ad\u4e0d\u8fc7\u662f\u628a&#034;\u94fe\u5f0f\u6cd5\u5219&#034;\u5728\u4e00\u4e2a\u6709\u5f88\u591a\u5c42\u7684\u590d\u5408\u51fd\u6570\u4e0a\u91cd\u590d\u4f7f\u7528\u3002\u7b2c 3 \u7bc7\u4f1a\u628a\u5b83\u8bb2\u900f\u3002<\/p>\n<h4>\u4e94\u3001\u628a\u6574\u4ef6\u4e8b\u5199\u6210\u4ee3\u7801<\/h4>\n<p>\u4e0d\u7528\u4efb\u4f55\u6846\u67b6&#xff0c;20 \u884c NumPy&#xff1a;<\/p>\n<p>import numpy as np<br \/>\n\u200b<br \/>\n# 1. \u6570\u636e<br \/>\nx &#061; np.array([50, 60, 75, 90, 110, 130, 45, 80, 100, 120], dtype&#061;float)<br \/>\ny &#061; np.array([180, 210, 260, 305, 370, 430, 165, 275, 340, 405], dtype&#061;float)<br \/>\n\u200b<br \/>\n# 2. \u53c2\u6570\u521d\u59cb\u5316&#xff08;\u968f\u673a\u731c\u4e00\u4e2a&#xff09;<br \/>\nw, b &#061; 0.0, 0.0<br \/>\nlr &#061; 1e-4 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0# \u5b66\u4e60\u7387<br \/>\nepochs &#061; 5000 \u00a0 \u00a0 \u00a0# \u8fed\u4ee3\u8f6e\u6570<br \/>\n\u200b<br \/>\nN &#061; len(x)<br \/>\nfor epoch in range(epochs):<br \/>\n \u00a0 \u00a0# &#8212; \u524d\u5411&#xff1a;\u7b97\u9884\u6d4b\u503c &#8212;<br \/>\n \u00a0 \u00a0y_hat &#061; w * x &#043; b<br \/>\n\u200b<br \/>\n \u00a0 \u00a0# &#8212; \u7b97\u635f\u5931 &#8212;<br \/>\n \u00a0 \u00a0loss &#061; np.mean((y_hat &#8211; y) ** 2)<br \/>\n\u200b<br \/>\n \u00a0 \u00a0# &#8212; \u53cd\u5411&#xff1a;\u7b97\u68af\u5ea6 &#8212;<br \/>\n \u00a0 \u00a0err &#061; y_hat &#8211; y<br \/>\n \u00a0 \u00a0dw &#061; 2 * np.mean(err * x)<br \/>\n \u00a0 \u00a0db &#061; 2 * np.mean(err)<br \/>\n\u200b<br \/>\n \u00a0 \u00a0# &#8212; \u66f4\u65b0 &#8212;<br \/>\n \u00a0 \u00a0w -&#061; lr * dw<br \/>\n \u00a0 \u00a0b -&#061; lr * db<br \/>\n\u200b<br \/>\n \u00a0 \u00a0if epoch % 1000 &#061;&#061; 0:<br \/>\n \u00a0 \u00a0 \u00a0 \u00a0print(f&#034;epoch {epoch:5d} | loss {loss:10.2f} | w {w:.4f} | b {b:.4f}&#034;)<br \/>\n\u200b<br \/>\nprint(f&#034;\\\\n\u6700\u7ec8: y &#061; {w:.4f} * x &#043; {b:.4f}&#034;)<br \/>\nprint(f&#034;\u9884\u6d4b 100 \u5e73: {w * 100 &#043; b:.1f} \u4e07\u5143&#034;)<\/p>\n<p>\u8dd1\u4e00\u4e0b\u4f60\u4f1a\u770b\u5230\u7c7b\u4f3c&#xff1a;<\/p>\n<p>epoch \u00a0 \u00a0 0 | loss  102345.67 | w 0.0412 | b 0.0031<br \/>\nepoch  1000 | loss \u00a0 \u00a0 412.88  | w 2.9301 | b 12.4432<br \/>\nepoch  4000 | loss \u00a0 \u00a0  18.65  | w 3.1204 | b 2.1120<br \/>\n\u6700\u7ec8: y &#061; 3.2341 * x &#043; 0.5102<\/p>\n<p>\u5c31\u8fd9\u4e94\u6b65&#xff0c;\u5c31\u662f\u6df1\u5ea6\u5b66\u4e60\u3002<\/p>\n<p>\u2460 \u524d\u5411\u4f20\u64ad\u7b97\u9884\u6d4b  \u2192  \u2461 \u7b97\u635f\u5931  \u2192  \u2462 \u53cd\u5411\u4f20\u64ad\u7b97\u68af\u5ea6  \u2192  \u2463 \u66f4\u65b0\u53c2\u6570  \u2192  \u2464 \u91cd\u590d<\/p>\n<p>\u540e\u9762\u6240\u6709\u7684 ResNet\u3001Transformer\u3001GPT&#xff0c;\u8bad\u7ec3\u5faa\u73af\u90fd\u662f\u8fd9\u4e94\u6b65\u3002\u53ea\u662f\u7b2c \u2460 \u6b65\u4ece w*x&#043;b \u53d8\u6210\u4e86\u51e0\u767e\u5c42\u7684\u590d\u5408\u51fd\u6570&#xff0c;\u7b2c \u2462 \u6b65\u4ece\u624b\u63a8\u516c\u5f0f\u53d8\u6210\u4e86 loss.backward()\u3002<\/p>\n<h5>\u5b66\u4e60\u7387\u662f\u4e2a\u5751<\/h5>\n<p>\u4e0a\u9762\u4ee3\u7801\u91cc lr &#061; 1e-4 \u4e0d\u662f\u968f\u4fbf\u5199\u7684\u3002\u8bd5\u8bd5\u6539\u6210 1e-1&#xff1a;<\/p>\n<p>epoch 0 | loss 102345.67<br \/>\nepoch 1 | loss 8.7e&#043;12<br \/>\nepoch 2 | loss nan \u00a0 \u00a0 \u00a0 \u00a0  \u2190 \u70b8\u4e86<\/p>\n<p>\u8fd9\u53eb\u68af\u5ea6\u7206\u70b8&#xff1a;\u6b65\u5b50\u592a\u5927&#xff0c;\u4e00\u4e0b\u8de8\u8fc7\u8c37\u5e95&#xff0c;\u8dd1\u5230\u5bf9\u9762\u66f4\u9ad8\u7684\u5730\u65b9&#xff0c;\u4e0b\u4e00\u6b21\u8bef\u5dee\u66f4\u5927&#xff0c;\u51e0\u6b65\u5c31\u6ea2\u51fa\u6210 inf\u3002<\/p>\n<p>\u53cd\u8fc7\u6765\u6539\u6210 1e-8&#xff0c;5000 \u8f6e\u4e0b\u6765 loss \u51e0\u4e4e\u6ca1\u52a8\u2014\u2014\u8d70\u5f97\u592a\u6162&#xff0c;5000 \u6b65\u90fd\u6ca1\u8d70\u5230\u8c37\u5e95\u3002<\/p>\n<p>\u5b66\u4e60\u7387\u7684\u9009\u62e9\u672c\u8d28\u662f\u5728&#034;\u7a33&#034;\u548c&#034;\u5feb&#034;\u4e4b\u95f4\u627e\u5e73\u8861\u3002\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u7b2c 4 \u7bc7\u8981\u4e13\u95e8\u8bb2\u4f18\u5316\u5668\u548c\u5b66\u4e60\u7387\u8c03\u5ea6\u3002<\/p>\n<h4>\u516d\u3001\u4e3a\u4ec0\u4e48\u9700\u8981&#034;\u6df1\u5ea6&#034;<\/h4>\n<p>\u5230\u8fd9\u91cc&#xff0c;\u4f60\u5df2\u7ecf\u4f1a\u8bad\u7ec3\u4e00\u4e2a\u7ebf\u6027\u6a21\u578b\u4e86\u3002\u90a3\u4e3a\u4ec0\u4e48\u8fd8\u8981\u795e\u7ecf\u7f51\u7edc&#xff1f;<\/p>\n<p>\u56e0\u4e3a\u76f4\u7ebf\u592a\u5f31\u4e86\u3002<\/p>\n<h5>\u7ebf\u6027\u6a21\u578b\u7684\u6b7b\u7a74<\/h5>\n<p>\u5047\u8bbe\u4f60\u7684\u6570\u636e\u957f\u8fd9\u6837&#xff1a;\u771f\u5b9e\u5173\u7cfb\u662f $y &#061; x^2$\u3002\u4f60\u7528 $wx &#043; b$ \u53bb\u62df\u5408&#xff0c;\u65e0\u8bba\u600e\u4e48\u8c03&#xff0c;\u6c38\u8fdc\u662f\u4e00\u6761\u76f4\u7ebf&#xff0c;\u8bef\u5dee\u5c0f\u4e0d\u4e86\u3002<\/p>\n<p>\u66f4\u81f4\u547d\u7684\u4f8b\u5b50\u662f\u5f02\u6216\u95ee\u9898&#xff08;XOR&#xff09;&#xff1a;<\/p>\n<table>\n<tr>$x_1$$x_2$$y$<\/tr>\n<tbody>\n<tr>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4f60\u627e\u4e0d\u5230\u4efb\u4f55\u4e00\u6761\u76f4\u7ebf&#xff0c;\u80fd\u628a $y&#061;1$ \u7684\u4e24\u70b9\u548c $y&#061;0$ \u7684\u4e24\u70b9\u5206\u5f00\u30021969 \u5e74 Minsky \u5c31\u662f\u9760\u8fd9\u4e2a\u95ee\u9898&#xff0c;\u628a\u795e\u7ecf\u7f51\u7edc\u7814\u7a76\u6309\u4e0b\u4e86\u6682\u505c\u952e\u5c06\u8fd1\u4e8c\u5341\u5e74\u3002<\/p>\n<h5>\u7834\u5c40&#xff1a;\u52a0\u975e\u7ebf\u6027 &#043; \u52a0\u5c42\u6570<\/h5>\n<p>\u5173\u952e\u64cd\u4f5c\u6709\u4e14\u53ea\u6709\u4e24\u4e2a&#xff1a;<\/p>\n<p>\u7b2c\u4e00&#xff0c;\u5728\u6bcf\u5c42\u540e\u9762\u52a0\u4e00\u4e2a\u975e\u7ebf\u6027\u51fd\u6570&#xff08;\u53eb\u6fc0\u6d3b\u51fd\u6570&#xff0c;\u7b2c 2 \u7bc7\u7ec6\u8bb2&#xff09;&#xff1a;<\/p>\n<p>$$<br \/>\nh &#061; \\\\sigma(w x &#043; b)<br \/>\n$$<\/p>\n<\/p>\n<p>\u7b2c\u4e8c&#xff0c;\u628a\u591a\u4e2a\u8fd9\u6837\u7684\u5355\u5143\u53e0\u8d77\u6765&#xff1a;<\/p>\n<p>$$<br \/>\n\\\\begin{aligned} h_1 &amp;&#061; \\\\sigma(W_1 x &#043; b_1) \\\\\\\\ h_2 &amp;&#061; \\\\sigma(W_2 h_1 &#043; b_2) \\\\\\\\ \\\\hat{y} &amp;&#061; W_3 h_2 &#043; b_3 \\\\end{aligned}<br \/>\n$$<\/p>\n<\/p>\n<p>\u8fd9\u65f6&#xff0c;$x$ \u548c $\\\\hat{y}$ \u4e4b\u95f4\u7684\u5173\u7cfb\u5c31\u4e0d\u518d\u662f\u76f4\u7ebf&#xff0c;\u800c\u662f\u4efb\u610f\u590d\u6742\u7684\u66f2\u7ebf\u4e86\u3002<\/p>\n<p>\u4e3a\u4ec0\u4e48&#xff1f;\u56e0\u4e3a\u7b2c\u4e00\u5c42\u628a\u539f\u59cb\u8f93\u5165 $x$ \u53d8\u6362\u5230\u4e86\u4e00\u4e2a\u65b0\u7684\u7a7a\u95f4 $h_1$\u3002\u5728\u90a3\u4e2a\u7a7a\u95f4\u91cc&#xff0c;\u539f\u672c\u7ebf\u6027\u4e0d\u53ef\u5206\u7684\u6570\u636e&#xff0c;\u53ef\u80fd\u5c31\u53d8\u5f97\u7ebf\u6027\u53ef\u5206\u4e86\u3002<\/p>\n<p>\u8fd9\u5c31\u662f\u8868\u793a\u5b66\u4e60&#xff08;representation learning&#xff09;\u2014\u2014\u6df1\u5ea6\u5b66\u4e60\u6700\u6838\u5fc3\u7684\u601d\u60f3\u3002\u5b83\u4e0d\u9760\u4eba\u53bb\u8bbe\u8ba1\u7279\u5f81&#xff08;&#034;\u9762\u79ef\/\u623f\u95f4\u6570&#034;\u8fd9\u79cd&#xff09;&#xff0c;\u800c\u662f\u8ba9\u7f51\u7edc\u81ea\u5df1\u5b66\u51fa\u4e00\u7ec4\u597d\u7528\u7684\u4e2d\u95f4\u8868\u793a\u3002<\/p>\n<h5>\u4e07\u80fd\u8fd1\u4f3c\u5b9a\u7406<\/h5>\n<p>\u8fd9\u4e0d\u662f\u7384\u5b66&#xff0c;\u6709\u4e25\u683c\u7684\u6570\u5b66\u7ed3\u8bba\u515c\u5e95&#xff1a;<\/p>\n<p>\u4e07\u80fd\u8fd1\u4f3c\u5b9a\u7406&#xff08;Universal Approximation Theorem&#xff09;&#xff1a;\u4e00\u4e2a\u5305\u542b\u8db3\u591f\u591a\u795e\u7ecf\u5143\u3001\u4e14\u5e26\u975e\u7ebf\u6027\u6fc0\u6d3b\u51fd\u6570\u7684\u5355\u9690\u85cf\u5c42\u524d\u9988\u7f51\u7edc&#xff0c;\u53ef\u4ee5\u5728\u4efb\u610f\u7cbe\u5ea6\u5185\u903c\u8fd1\u4efb\u610f\u8fde\u7eed\u51fd\u6570\u3002<\/p>\n<p>\u5199\u6210\u6570\u5b66\u5f62\u5f0f&#xff0c;\u5bf9\u4efb\u610f\u8fde\u7eed\u51fd\u6570 $f$ \u548c\u4efb\u610f $\\\\epsilon &gt; 0$&#xff0c;\u5b58\u5728\u53c2\u6570\u4f7f\u5f97&#xff1a;<\/p>\n<p>$$<br \/>\n\\\\left| f(x) &#8211; \\\\sum_{j&#061;1}^{M} c_j \\\\sigma\\\\left(w_j^{\\\\top} x &#043; b_j\\\\right) \\\\right| &lt; \\\\epsilon<br \/>\n$$<\/p>\n<\/p>\n<p>\u7528\u4eba\u8bdd\u8bf4&#xff1a;\u53ea\u8981\u4f60\u7ed9\u7684\u795e\u7ecf\u5143\u591f\u591a&#xff0c;\u4e00\u5c42\u9690\u85cf\u5c42\u7406\u8bba\u4e0a\u5c31\u80fd\u62df\u5408\u4efb\u4f55\u4e1c\u897f\u3002<\/p>\n<p>\u90a3\u4e3a\u4ec0\u4e48\u8fd8\u8981&#034;\u6df1&#034;&#xff1f;<\/p>\n<p>\u56e0\u4e3a&#034;\u7406\u8bba\u4e0a\u80fd&#034;\u548c&#034;\u5b9e\u9645\u4e0a\u597d\u5b66&#034;\u662f\u4e24\u56de\u4e8b\u3002\u540c\u6837\u7684\u51fd\u6570&#xff0c;\u6d45\u7f51\u7edc\u53ef\u80fd\u9700\u8981\u6307\u6570\u7ea7\u591a\u7684\u795e\u7ecf\u5143&#xff0c;\u6df1\u7f51\u7edc\u53ea\u8981\u591a\u9879\u5f0f\u7ea7\u3002\u6df1\u5c42\u7ed3\u6784\u81ea\u5e26\u4e00\u79cd&#034;\u590d\u7528&#034;\u7684\u5f52\u7eb3\u504f\u7f6e&#xff1a;\u5e95\u5c42\u5b66\u8fb9\u7f18&#xff0c;\u4e2d\u5c42\u5b66\u7eb9\u7406&#xff0c;\u9ad8\u5c42\u5b66\u7269\u4f53&#xff0c;\u8fd9\u79cd\u5c42\u6b21\u5316\u590d\u7528\u662f\u6d45\u5c42\u505a\u4e0d\u5230\u7684\u3002<\/p>\n<p>\u6253\u4e2a\u6bd4\u65b9&#xff1a;\u76d6 10 \u5c42\u697c&#xff0c;\u4f60\u53ef\u4ee5\u7528 100 \u4e2a\u5de5\u4eba\u5e73\u94fa\u7740\u5e72&#xff08;\u5bbd&#xff09;&#xff0c;\u4e5f\u53ef\u4ee5\u642d\u811a\u624b\u67b6\u4e00\u5c42\u5c42\u5f80\u4e0a&#xff08;\u6df1&#xff09;\u3002\u540e\u8005\u6548\u7387\u9ad8\u5f97\u591a\u3002<\/p>\n<h4>\u4e03\u3001\u6df1\u5ea6\u5b66\u4e60\u548c\u4f20\u7edf\u673a\u5668\u5b66\u4e60\u5dee\u5728\u54ea<\/h4>\n<table>\n<tr>\u7ef4\u5ea6\u4f20\u7edf\u673a\u5668\u5b66\u4e60\u6df1\u5ea6\u5b66\u4e60<\/tr>\n<tbody>\n<tr>\n<td>\u7279\u5f81<\/td>\n<td>\u4eba\u5de5\u8bbe\u8ba1&#xff08;SIFT\u3001TF-IDF\u3001\u7edf\u8ba1\u91cf&#xff09;<\/td>\n<td>\u81ea\u52a8\u5b66\u4e60&#xff0c;\u7aef\u5230\u7aef<\/td>\n<\/tr>\n<tr>\n<td>\u6570\u636e\u91cf<\/td>\n<td>\u51e0\u5343\u5230\u51e0\u4e07\u6761\u5373\u53ef<\/td>\n<td>\u901a\u5e38\u5341\u4e07\u6761\u8d77\u6b65<\/td>\n<\/tr>\n<tr>\n<td>\u7b97\u529b<\/td>\n<td>CPU \u591f\u7528<\/td>\n<td>\u4f9d\u8d56 GPU<\/td>\n<\/tr>\n<tr>\n<td>\u53ef\u89e3\u91ca\u6027<\/td>\n<td>\u8f83\u597d&#xff08;\u51b3\u7b56\u6811\u3001\u7ebf\u6027\u6a21\u578b&#xff09;<\/td>\n<td>\u8f83\u5dee&#xff08;\u9ed1\u76d2&#xff0c;\u4f46\u53ef\u4ee5\u4e8b\u540e\u89e3\u91ca&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u9002\u7528\u573a\u666f<\/td>\n<td>\u8868\u683c\u6570\u636e\u3001\u5c0f\u6837\u672c\u3001\u5f3a\u4e1a\u52a1\u89c4\u5219<\/td>\n<td>\u56fe\u50cf\u3001\u8bed\u97f3\u3001\u6587\u672c\u3001\u591a\u6a21\u6001<\/td>\n<\/tr>\n<tr>\n<td>\u8c03\u53c2\u91cd\u70b9<\/td>\n<td>\u7279\u5f81\u5de5\u7a0b<\/td>\n<td>\u7f51\u7edc\u7ed3\u6784 &#043; \u4f18\u5316\u7b56\u7565 &#043; \u6570\u636e\u8d28\u91cf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e00\u53e5\u8bdd\u603b\u7ed3\u8fd9\u4e2a\u533a\u522b&#xff1a;<\/p>\n<p>\u4f20\u7edf\u673a\u5668\u5b66\u4e60\u662f\u4eba\u628a\u77e5\u8bc6&#034;\u5582&#034;\u7ed9\u6a21\u578b&#xff1b;\u6df1\u5ea6\u5b66\u4e60\u662f\u6a21\u578b\u81ea\u5df1\u4ece\u6570\u636e\u91cc&#034;\u957f&#034;\u51fa\u77e5\u8bc6\u3002<\/p>\n<p>\u4f46\u8981\u63d0\u9192\u4e00\u53e5&#xff1a;\u8868\u683c\u6570\u636e\u4e0a&#xff0c;XGBoost \/ LightGBM \u81f3\u4eca\u4ecd\u7ecf\u5e38\u540a\u6253\u6df1\u5ea6\u5b66\u4e60\u3002 \u522b\u62ff\u9524\u5b50\u770b\u4ec0\u4e48\u90fd\u50cf\u9489\u5b50\u3002<\/p>\n<h4>\u516b\u3001\u5168\u666f&#xff1a;\u4e0d\u540c\u6570\u636e\u5f62\u6001\u5bf9\u5e94\u4e0d\u540c\u7ed3\u6784<\/h4>\n<p>\u65e2\u7136\u540e\u9762 11 \u7bc7\u90fd\u8981\u8bb2\u7ed3\u6784&#xff0c;\u5148\u7ed9\u4e00\u5f20\u5730\u56fe&#xff0c;\u8ba9\u4f60\u77e5\u9053\u81ea\u5df1\u5728\u54ea\u3002<\/p>\n<table>\n<tr>\u6570\u636e\u7c7b\u578b\u5178\u578b\u7ed3\u6784\u6838\u5fc3\u5f52\u7eb3\u504f\u7f6e\u5bf9\u5e94\u7bc7\u76ee<\/tr>\n<tbody>\n<tr>\n<td>\u8868\u683c \/ \u5411\u91cf<\/td>\n<td>MLP&#xff08;\u5168\u8fde\u63a5&#xff09;<\/td>\n<td>\u7279\u5f81\u4e4b\u95f4\u53ef\u4ee5\u4efb\u610f\u7ec4\u5408<\/td>\n<td>\u7b2c 2 \u7bc7<\/td>\n<\/tr>\n<tr>\n<td>\u56fe\u50cf<\/td>\n<td>CNN<\/td>\n<td>\u5c40\u90e8\u6027 &#043; \u5e73\u79fb\u4e0d\u53d8\u6027<\/td>\n<td>\u7b2c 6 \u7bc7<\/td>\n<\/tr>\n<tr>\n<td>\u8bed\u97f3 \/ \u65f6\u5e8f<\/td>\n<td>RNN\u3001LSTM\u3001TCN<\/td>\n<td>\u65f6\u95f4\u4e0a\u6709\u987a\u5e8f\u4f9d\u8d56<\/td>\n<td>\u7b2c 7 \u7bc7<\/td>\n<\/tr>\n<tr>\n<td>\u6587\u672c \/ \u957f\u5e8f\u5217<\/td>\n<td>Transformer<\/td>\n<td>\u4efb\u610f\u4e24\u70b9\u90fd\u53ef\u80fd\u6709\u4f9d\u8d56<\/td>\n<td>\u7b2c 8 \u7bc7<\/td>\n<\/tr>\n<tr>\n<td>\u4e00\u5207&#xff08;\u5927\u6a21\u578b&#xff09;<\/td>\n<td>Transformer &#043; \u6d77\u91cf\u9884\u8bad\u7ec3<\/td>\n<td>\u89c4\u6a21\u5316 &#043; \u81ea\u76d1\u7763<\/td>\n<td>\u7b2c 9 \u7bc7<\/td>\n<\/tr>\n<tr>\n<td>\u751f\u6210\u4efb\u52a1<\/td>\n<td>VAE \/ GAN \/ Diffusion<\/td>\n<td>\u5b66\u4f1a\u6570\u636e\u5206\u5e03\u672c\u8eab<\/td>\n<td>\u7b2c 10 \u7bc7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u770b\u8fd9\u5f20\u8868\u4f60\u4f1a\u53d1\u73b0\u4e00\u4ef6\u4e8b&#xff1a;\u7f51\u7edc\u7ed3\u6784\u4e0d\u662f\u62cd\u8111\u888b\u53d1\u660e\u7684&#xff0c;\u662f\u88ab\u6570\u636e\u7ed3\u6784&#034;\u903c&#034;\u51fa\u6765\u7684\u3002 \u4f60\u7684\u6570\u636e\u6709\u4ec0\u4e48\u6837\u7684\u89c4\u5f8b&#xff0c;\u5c31\u8be5\u7528\u80fd\u8868\u8fbe\u8fd9\u79cd\u89c4\u5f8b\u7684\u5f52\u7eb3\u504f\u7f6e\u3002\u8fd9\u662f\u7406\u89e3\u6240\u6709\u67b6\u6784\u7684\u94a5\u5319\u3002<\/p>\n<hr \/>\n<h3>\u5c0f\u7ed3<\/h3>\n<p>\u672c\u7bc7\u8bb2\u4e86\u56db\u4ef6\u4e8b&#xff0c;\u90fd\u662f\u540e\u9762\u6240\u6709\u5185\u5bb9\u7684\u5730\u57fa&#xff1a;<\/p>\n<li>\n<p>\u6a21\u578b\u5c31\u662f&#034;\u5e26\u672a\u77e5\u53c2\u6570\u7684\u51fd\u6570&#034;\u3002\u4ece $\\\\hat{y} &#061; wx&#043;b$ \u5230 GPT&#xff0c;\u672c\u8d28\u6ca1\u53d8&#xff0c;\u53ea\u662f\u53c2\u6570\u91cf\u4ece 2 \u4e2a\u53d8\u6210\u51e0\u5343\u4ebf\u4e2a\u3002<\/p>\n<\/li>\n<li>\n<p>\u635f\u5931\u51fd\u6570\u628a&#034;\u9884\u6d4b\u5f97\u597d\u4e0d\u597d&#034;\u53d8\u6210\u4e00\u4e2a\u53ef\u4ee5\u6700\u5c0f\u5316\u7684\u6570\u5b57\u3002\u56de\u5f52\u7528\u5747\u65b9\u8bef\u5dee&#xff0c;\u5206\u7c7b\u7528\u4ea4\u53c9\u71b5&#xff08;\u7b2c 4 \u7bc7\u8be6\u8bb2&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u68af\u5ea6\u4e0b\u964d&#xff1a;\u7b97\u68af\u5ea6&#xff08;\u5f80\u54ea\u8d70\u6700\u9661&#xff09;&#xff0c;\u7136\u540e\u671d\u53cd\u65b9\u5411\u8fc8\u4e00\u6b65&#xff08;$\\\\theta \\\\leftarrow \\\\theta &#8211; \\\\eta \\\\nabla_\\\\theta L$&#xff09;\u3002\u5b66\u4e60\u7387\u51b3\u5b9a\u6b65\u5b50\u5927\u5c0f&#xff0c;\u592a\u5927\u7206\u70b8&#xff0c;\u592a\u5c0f\u78e8\u8e6d\u3002<\/p>\n<\/li>\n<li>\n<p>\u6df1\u5ea6\u7684\u610f\u4e49\u5728\u4e8e&#xff1a;\u975e\u7ebf\u6027\u6fc0\u6d3b &#043; \u591a\u5c42\u5806\u53e0 &#061; \u8868\u793a\u5b66\u4e60 &#061; \u80fd\u62df\u5408\u4efb\u610f\u590d\u6742\u51fd\u6570\u3002\u4e07\u80fd\u8fd1\u4f3c\u5b9a\u7406\u4fdd\u8bc1\u4e86&#034;\u80fd&#034;&#xff0c;\u5c42\u6b21\u5316\u7ed3\u6784\u4fdd\u8bc1\u4e86&#034;\u597d\u5b66&#034;\u3002<\/p>\n<\/li>\n<p>\u8bad\u7ec3\u7684\u4e94\u6b65\u95ed\u73af&#xff0c;\u8bf7\u52a1\u5fc5\u80cc\u4e0b\u6765&#xff1a;<\/p>\n<p>\u524d\u5411\u4f20\u64ad \u2192 \u8ba1\u7b97\u635f\u5931 \u2192 \u53cd\u5411\u4f20\u64ad\u6c42\u68af\u5ea6 \u2192 \u66f4\u65b0\u53c2\u6570 \u2192 \u91cd\u590d<\/p>\n<p>\u4e0b\u4e00\u7bc7&#xff0c;\u6211\u4eec\u628a&#034;\u4e24\u4e2a\u53c2\u6570&#034;\u5347\u7ea7\u6210&#034;\u6210\u767e\u4e0a\u5343\u4e2a\u53c2\u6570&#034;&#xff0c;\u770b\u770b\u5355\u4e2a\u795e\u7ecf\u5143\u5230\u5e95\u5728\u7b97\u4ec0\u4e48&#xff0c;\u4ee5\u53ca\u4e3a\u4ec0\u4e48\u5fc5\u987b\u8981\u6709\u6fc0\u6d3b\u51fd\u6570\u2014\u2014\u987a\u4fbf\u7528\u4ee3\u7801\u4eb2\u624b\u590d\u73b0 1969 \u5e74\u90a3\u4e2a\u8ba9\u795e\u7ecf\u7f51\u7edc\u505c\u6ede\u4e8c\u5341\u5e74\u7684\u5f02\u6216\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f15\u8a00\u9762\u8bd5\u7684\u65f6\u5019\u6211\u5e38\u95ee\u4e00\u4e2a\u95ee\u9898&#xff1a;\\&#8221;\u795e\u7ecf\u7f51\u7edc\u8bad\u7ec3\u7684\u65f6\u5019&#xff0c;\u5230\u5e95\u5728\u6539\u52a8\u4ec0\u4e48&#xff1f;\\&#8221;\u5341\u4e2a\u4eba\u91cc\u6709\u516d\u4e2a\u56de\u7b54\\&#8221;\u5728\u8c03\u6574\u6743\u91cd\\&#8221;&#xff0c;\u7136\u540e\u8ffd\u95ee\\&#8221;\u600e\u4e48\u8c03\\&#8221;&#xff0c;\u5c31\u5361\u4f4f\u4e86\u3002\u5269\u4e0b\u56db\u4e2a\u80fd\u8bf4\u51fa\\&#8221;\u68af\u5ea6\u4e0b\u964d\\&#8221;&#xff0c;\u4f46\u518d\u95ee\\&#8221;\u68af\u5ea6\u662f\u4ec0\u4e48\u3001\u4e3a\u4ec0\u4e48\u6cbf\u7740\u5b83\u53cd\u65b9\u5411\u8d70\u5c31\u80fd\u964d loss\\&#8221;&#xff0c;\u57fa\u672c\u5168\u519b\u8986\u6ca1\u3002\u8fd9\u4e0d\u662f\u4ed6\u4eec\u7684\u9519\u3002\u7edd\u5927\u90e8\u5206\u6559\u7a0b\u7684\u8bb2\u6cd5\u662f&#xff1a;\u5148\u7529\u4e00\u4e2a\u591a\u5c42\u7f51\u7edc\u7ed3\u6784\u56fe&#xff0c;\u518d\u7529\u4e00\u5806\u516c\u5f0f&#xff0c;\u6700\u540e\u4e22\u4e00\u6bb5 30 \u884c\u7684\u8bad\u7ec3\u4ee3<\/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":[12392,81,50,86],"topic":[],"class_list":["post-121727","post","type-post","status-publish","format-standard","hentry","category-server","tag-12392","tag-python","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\u5165\u95e8\uff08\u4e00\uff09\uff1a\u6df1\u5ea6\u5b66\u4e60\u5230\u5e95\u662f\u4ec0\u4e48\uff1f\u4ece\u62df\u5408\u4e00\u6761\u76f4\u7ebf\u8bb2\u8d77 - \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\/121727.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\u5165\u95e8\uff08\u4e00\uff09\uff1a\u6df1\u5ea6\u5b66\u4e60\u5230\u5e95\u662f\u4ec0\u4e48\uff1f\u4ece\u62df\u5408\u4e00\u6761\u76f4\u7ebf\u8bb2\u8d77 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u5f15\u8a00\u9762\u8bd5\u7684\u65f6\u5019\u6211\u5e38\u95ee\u4e00\u4e2a\u95ee\u9898&#xff1a;&quot;\u795e\u7ecf\u7f51\u7edc\u8bad\u7ec3\u7684\u65f6\u5019&#xff0c;\u5230\u5e95\u5728\u6539\u52a8\u4ec0\u4e48&#xff1f;&quot;\u5341\u4e2a\u4eba\u91cc\u6709\u516d\u4e2a\u56de\u7b54&quot;\u5728\u8c03\u6574\u6743\u91cd&quot;&#xff0c;\u7136\u540e\u8ffd\u95ee&quot;\u600e\u4e48\u8c03&quot;&#xff0c;\u5c31\u5361\u4f4f\u4e86\u3002\u5269\u4e0b\u56db\u4e2a\u80fd\u8bf4\u51fa&quot;\u68af\u5ea6\u4e0b\u964d&quot;&#xff0c;\u4f46\u518d\u95ee&quot;\u68af\u5ea6\u662f\u4ec0\u4e48\u3001\u4e3a\u4ec0\u4e48\u6cbf\u7740\u5b83\u53cd\u65b9\u5411\u8d70\u5c31\u80fd\u964d loss&quot;&#xff0c;\u57fa\u672c\u5168\u519b\u8986\u6ca1\u3002\u8fd9\u4e0d\u662f\u4ed6\u4eec\u7684\u9519\u3002\u7edd\u5927\u90e8\u5206\u6559\u7a0b\u7684\u8bb2\u6cd5\u662f&#xff1a;\u5148\u7529\u4e00\u4e2a\u591a\u5c42\u7f51\u7edc\u7ed3\u6784\u56fe&#xff0c;\u518d\u7529\u4e00\u5806\u516c\u5f0f&#xff0c;\u6700\u540e\u4e22\u4e00\u6bb5 30 \u884c\u7684\u8bad\u7ec3\u4ee3\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/121727.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-03T06:08:39+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=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/121727.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/121727.html\",\"name\":\"\u6df1\u5ea6\u5b66\u4e60\u5165\u95e8\uff08\u4e00\uff09\uff1a\u6df1\u5ea6\u5b66\u4e60\u5230\u5e95\u662f\u4ec0\u4e48\uff1f\u4ece\u62df\u5408\u4e00\u6761\u76f4\u7ebf\u8bb2\u8d77 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-11-03T06:08:39+00:00\",\"dateModified\":\"2026-11-03T06:08:39+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/121727.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/121727.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/121727.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\u5165\u95e8\uff08\u4e00\uff09\uff1a\u6df1\u5ea6\u5b66\u4e60\u5230\u5e95\u662f\u4ec0\u4e48\uff1f\u4ece\u62df\u5408\u4e00\u6761\u76f4\u7ebf\u8bb2\u8d77\"}]},{\"@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\u5165\u95e8\uff08\u4e00\uff09\uff1a\u6df1\u5ea6\u5b66\u4e60\u5230\u5e95\u662f\u4ec0\u4e48\uff1f\u4ece\u62df\u5408\u4e00\u6761\u76f4\u7ebf\u8bb2\u8d77 - \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\/121727.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6df1\u5ea6\u5b66\u4e60\u5165\u95e8\uff08\u4e00\uff09\uff1a\u6df1\u5ea6\u5b66\u4e60\u5230\u5e95\u662f\u4ec0\u4e48\uff1f\u4ece\u62df\u5408\u4e00\u6761\u76f4\u7ebf\u8bb2\u8d77 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u5f15\u8a00\u9762\u8bd5\u7684\u65f6\u5019\u6211\u5e38\u95ee\u4e00\u4e2a\u95ee\u9898&#xff1a;\"\u795e\u7ecf\u7f51\u7edc\u8bad\u7ec3\u7684\u65f6\u5019&#xff0c;\u5230\u5e95\u5728\u6539\u52a8\u4ec0\u4e48&#xff1f;\"\u5341\u4e2a\u4eba\u91cc\u6709\u516d\u4e2a\u56de\u7b54\"\u5728\u8c03\u6574\u6743\u91cd\"&#xff0c;\u7136\u540e\u8ffd\u95ee\"\u600e\u4e48\u8c03\"&#xff0c;\u5c31\u5361\u4f4f\u4e86\u3002\u5269\u4e0b\u56db\u4e2a\u80fd\u8bf4\u51fa\"\u68af\u5ea6\u4e0b\u964d\"&#xff0c;\u4f46\u518d\u95ee\"\u68af\u5ea6\u662f\u4ec0\u4e48\u3001\u4e3a\u4ec0\u4e48\u6cbf\u7740\u5b83\u53cd\u65b9\u5411\u8d70\u5c31\u80fd\u964d loss\"&#xff0c;\u57fa\u672c\u5168\u519b\u8986\u6ca1\u3002\u8fd9\u4e0d\u662f\u4ed6\u4eec\u7684\u9519\u3002\u7edd\u5927\u90e8\u5206\u6559\u7a0b\u7684\u8bb2\u6cd5\u662f&#xff1a;\u5148\u7529\u4e00\u4e2a\u591a\u5c42\u7f51\u7edc\u7ed3\u6784\u56fe&#xff0c;\u518d\u7529\u4e00\u5806\u516c\u5f0f&#xff0c;\u6700\u540e\u4e22\u4e00\u6bb5 30 \u884c\u7684\u8bad\u7ec3\u4ee3","og_url":"https:\/\/www.wsisp.com\/helps\/121727.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-11-03T06:08:39+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/121727.html","url":"https:\/\/www.wsisp.com\/helps\/121727.html","name":"\u6df1\u5ea6\u5b66\u4e60\u5165\u95e8\uff08\u4e00\uff09\uff1a\u6df1\u5ea6\u5b66\u4e60\u5230\u5e95\u662f\u4ec0\u4e48\uff1f\u4ece\u62df\u5408\u4e00\u6761\u76f4\u7ebf\u8bb2\u8d77 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-11-03T06:08:39+00:00","dateModified":"2026-11-03T06:08:39+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/121727.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/121727.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/121727.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\u5165\u95e8\uff08\u4e00\uff09\uff1a\u6df1\u5ea6\u5b66\u4e60\u5230\u5e95\u662f\u4ec0\u4e48\uff1f\u4ece\u62df\u5408\u4e00\u6761\u76f4\u7ebf\u8bb2\u8d77"}]},{"@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\/121727","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=121727"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/121727\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=121727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=121727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=121727"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=121727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}