{"id":9221,"date":"2024-03-20T11:40:51","date_gmt":"2024-03-20T03:40:51","guid":{"rendered":"\/?p=9221"},"modified":"2024-03-20T11:43:10","modified_gmt":"2024-03-20T03:43:10","slug":"%e7%a5%9e%e7%bb%8f%e7%bd%91%e7%bb%9c%e4%b8%ad%ef%bc%8c%e4%bb%a3%e4%bb%b7%e5%87%bd%e6%95%b0%e5%92%8c%e6%8d%9f%e5%a4%b1%e5%87%bd%e6%95%b0%e6%98%af%e4%b8%80%e4%b8%aa%e6%a6%82%e5%bf%b5%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"\/?p=9221","title":{"rendered":"\u795e\u7ecf\u7f51\u7edc\u4e2d\uff0c\u4ee3\u4ef7\u51fd\u6570\u548c\u635f\u5931\u51fd\u6570\u662f\u4e00\u4e2a\u6982\u5ff5\u5417\uff1f\u4ec0\u4e48\u662f\u635f\u5931\u51fd\u6570\uff1f"},"content":{"rendered":"<h2>\u533a\u522b<\/h2>\n<p>\u5728\u795e\u7ecf\u7f51\u7edc\u4e2d\uff0c\u4ee3\u4ef7\u51fd\u6570\uff08Cost Function\uff09\u548c\u635f\u5931\u51fd\u6570\uff08Loss Function\uff09\u5e76\u4e0d\u5b8c\u5168\u662f\u540c\u4e00\u4e2a\u6982\u5ff5\uff0c\u4f46\u5b83\u4eec\u7d27\u5bc6\u76f8\u5173\uff0c\u5e76\u4e14\u5728\u67d0\u4e9b\u4e0a\u4e0b\u6587\u4e2d\u53ef\u80fd\u4f1a\u88ab\u6df7\u7528\u3002<\/p>\n<p>\u635f\u5931\u51fd\u6570\u901a\u5e38\u662f\u6307\u5355\u4e2a\u8bad\u7ec3\u6837\u672c\u7684\u8bef\u5dee\u5ea6\u91cf\uff0c\u7528\u4e8e\u91cf\u5316\u6a21\u578b\u9884\u6d4b\u4e0e\u5b9e\u9645\u6807\u7b7e\u4e4b\u95f4\u7684\u5dee\u8ddd\u3002\u5b83\u8868\u793a\u795e\u7ecf\u7f51\u7edc\u5bf9\u5355\u4e2a\u6570\u636e\u70b9\u7684\u62df\u5408\u7a0b\u5ea6\u3002\u5bf9\u4e8e\u6bcf\u4e2a\u6837\u672c\uff0c\u6211\u4eec\u90fd\u4f1a\u8ba1\u7b97\u4e00\u4e2a\u635f\u5931\u503c\u3002\u5728\u673a\u5668\u5b66\u4e60\u7684\u4efb\u52a1\u4e2d\uff0c\u5e38\u7528\u7684\u635f\u5931\u51fd\u6570\u6709\u5747\u65b9\u8bef\u5dee\uff08Mean Squared Error, MSE\uff09\u7528\u4e8e\u56de\u5f52\u4efb\u52a1\uff0c\u4ea4\u53c9\u71b5\u635f\u5931\uff08Cross-Entropy Loss\uff09\u7528\u4e8e\u5206\u7c7b\u4efb\u52a1\u7b49\u3002<\/p>\n<p>\u4ee3\u4ef7\u51fd\u6570\u5219\u662f\u635f\u5931\u51fd\u6570\u5728\u6574\u4e2a\u8bad\u7ec3\u96c6\u4e0a\u7684\u5e73\u5747\u503c\uff08\u6216\u603b\u548c\uff09\uff0c\u5b83\u91cf\u5316\u4e86\u6a21\u578b\u5728\u6574\u4e2a\u8bad\u7ec3\u6570\u636e\u96c6\u4e0a\u7684\u603b\u4f53\u6027\u80fd\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u4ee3\u4ef7\u51fd\u6570\u662f\u5bf9\u6574\u4e2a\u6570\u636e\u96c6\u6240\u6709\u6837\u672c\u635f\u5931\u7684\u4e00\u4e2a\u6c47\u603b\u3002\u901a\u8fc7\u6700\u5c0f\u5316\u4ee3\u4ef7\u51fd\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u4f18\u5316\u795e\u7ecf\u7f51\u7edc\u7684\u6743\u91cd\u548c\u504f\u7f6e\uff0c\u4ece\u800c\u4f7f\u5f97\u6a21\u578b\u5728\u6574\u4e2a\u6570\u636e\u96c6\u4e0a\u7684\u9884\u6d4b\u6027\u80fd\u5f97\u5230\u63d0\u5347\u3002<\/p>\n<p>\u7b80\u800c\u8a00\u4e4b\uff0c\u635f\u5931\u51fd\u6570\u662f\u9488\u5bf9\u5355\u4e2a\u6837\u672c\u7684\u8bef\u5dee\u5ea6\u91cf\uff0c\u800c\u4ee3\u4ef7\u51fd\u6570\u662f\u9488\u5bf9\u6574\u4e2a\u8bad\u7ec3\u96c6\u7684\u603b\u4f53\u8bef\u5dee\u5ea6\u91cf\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u8fd9\u4e24\u8005\u7ecf\u5e38\u88ab\u4e00\u8d77\u4f7f\u7528\u6765\u6307\u5bfc\u795e\u7ecf\u7f51\u7edc\u7684\u8bad\u7ec3\u8fc7\u7a0b\uff0c\u5e76\u4e14\u67d0\u4e9b\u6587\u732e\u6216\u8d44\u6599\u4e2d\u53ef\u80fd\u4f1a\u5c06\u8fd9\u4e24\u8005\u89c6\u4e3a\u540c\u4e49\u8bcd\u3002\u4e0d\u8fc7\uff0c\u5728\u4e25\u8c28\u7684\u4e0a\u4e0b\u6587\u4e2d\uff0c\u533a\u5206\u8fd9\u4e24\u8005\u662f\u6709\u5e2e\u52a9\u7684\u3002<\/p>\n<h2>\u635f\u5931\u51fd\u6570<\/h2>\n<h3>1\u3001\u4ec0\u4e48\u662f\u635f\u5931\u51fd\u6570<\/h3>\n<ul>\n<li>\u635f\u5931\u51fd\u6570\uff08loss function\uff09\u6216\u4ee3\u4ef7\u51fd\u6570\uff08cost function\uff09\u662f\u5c06\u968f\u673a\u4e8b\u4ef6\u6216\u5176\u6709\u5173\u968f\u673a\u53d8\u91cf\u7684\u53d6\u503c\u6620\u5c04\u4e3a\u975e\u8d1f\u5b9e\u6570\u4ee5\u8868\u793a\u8be5\u968f\u673a\u4e8b\u4ef6\u7684\u201c\u98ce\u9669\u201d\u6216\u201c\u635f\u5931\u201d\u7684\u51fd\u6570\u3002<\/li>\n<li>\u795e\u7ecf\u7f51\u7edc\u4ee5\u67d0\u4e2a\u6307\u6807\u4e3a\u7ebf\u7d22\u5bfb\u627e<strong>\u6700\u4f18\u6743\u91cd\u53c2\u6570<\/strong>\u3002\u795e\u7ecf\u7f51\u7edc\u7684\u5b66\u4e60\u4e2d\u6240\u7528\u7684\u6307\u6807\u79f0\u4e3a\u635f\u5931\u51fd\u6570\uff08loss function\uff09\u3002\u8fd9\u4e2a\u635f\u5931\u51fd\u6570\u53ef\u4ee5\u4f7f\u7528\u4efb\u610f\u51fd\u6570\uff0c\u4f46\u4e00\u822c\u7528\u5747\u65b9\u8bef\u5dee\u548c\u4ea4\u53c9\u71b5\u8bef\u5dee\u7b49\u3002<\/li>\n<li>\u635f\u5931\u51fd\u6570\u662f\u8868\u793a\u795e\u7ecf\u7f51\u7edc<strong>\u6027\u80fd<\/strong>\u7684\u201c\u6076\u52a3\u7a0b\u5ea6\u201d\u7684\u6307\u6807\uff0c\u5373\u5f53\u524d\u7684\u795e\u7ecf\u7f51\u7edc\u5bf9\u76d1\u7763\u6570\u636e\u5728\u591a\u5927\u7a0b\u5ea6\u4e0a\u4e0d\u62df\u5408\uff0c\u5728\u591a\u5927\u7a0b\u5ea6\u4e0a\u4e0d\u4e00\u81f4\u3002<br \/>\n\u8fd9\u662f\u6587\u5fc3\u4e00\u8a00\u8bf4\u7684\uff0c\u6211\u770b\u4e86\u5176\u4ed6\u7684\u6587\u7ae0\u548c\u4e66\u7c4d\uff0c\u4f7f\u7528\u6bd4\u8f83\u6df7\u4e71\uff0c\u8fd8\u662f\u770b\u4e0a\u4e0b\u6587\u3002<\/p>\n<h3>2\u3001\u5747\u65b9\u8bef\u5dee\uff08MSE\uff09<\/h3>\n<p>\u4e8c\u6b21\u4ee3\u4ef7\u51fd\u6570<\/p>\n<\/li>\n<\/ul>\n<p><img src=\"https:\/\/lemon-guess.oss-cn-hangzhou.aliyuncs.com\/img\/c6cd1ad114f6443482512341499f077f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<ul>\n<li>yk\u662f\u8868\u793a\u795e\u7ecf\u7f51\u7edc\u7684\u8f93\u51fa\uff0ctk\u8868\u793a\u76d1\u7763\u6570\u636e\uff0ck\u8868\u793a\u6570\u636e\u7684\u7ef4\u6570\u3002<\/li>\n<li>\u795e\u7ecf\u7f51\u7edc\u7684\u8f93\u51fay\u662f\u6fc0\u6d3b\u51fd\u6570\u7684\u8f93\u51fa\uff0c\u5176\u4e2dsoftmax\u51fd\u6570\u7684\u8f93\u51fa\u4e3a\u6982\u7387\u7684\u8f93\u51fa\u3002t\u662f\u76d1\u7763\u6570\u636e\uff0c\u5c06\u6b63\u786e\u89e3\u6807\u7b7e\u8bbe\u4e3a1\uff0c\u5176\u4ed6\u5747\u8bbe\u4e3a0\u3002\u5c06\u6b63\u786e\u89e3\u6807\u7b7e\u8868\u793a\u4e3a1\uff0c\u5176\u4ed6\u6807\u7b7e\u8868\u793a\u4e3a0\u7684\u8868\u793a\u65b9\u6cd5\u79f0\u4e3aone-hot\u8868\u793a\u3002<\/li>\n<li>\u5747\u65b9\u8bef\u5dee\u4f1a\u8ba1\u7b97\u795e\u7ecf\u7f51\u7edc\u7684\u8f93\u51fa\u548c\u6b63\u786e\u89e3\u76d1\u7763\u6570\u636e\u7684\u5404\u4e2a\u5143\u7d20\u4e4b\u5dee\u7684\u5e73\u65b9\uff0c\u518d\u6c42\u603b\u548c\u3002<\/li>\n<\/ul>\n<h3>3\u3001\u4ea4\u53c9\u71b5\u8bef\u5dee\uff08cross_entropy_error\uff09<\/h3>\n<p><img src=\"https:\/\/lemon-guess.oss-cn-hangzhou.aliyuncs.com\/img\/331739cc04ac408892a42309653b6ffc.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<ul>\n<li>log\u8868\u793a\u4ee5e\u4e3a\u5e95\u6570\u7684\u81ea\u7136\u5bf9\u6570\uff08log e\uff09\u3002yk\u662f\u795e\u7ecf\u7f51\u7edc\u7684\u8f93\u51fa\uff0ctk\u662f\u6b63\u786e\u89e3\u6807\u7b7e\u3002\u5e76\u4e14\uff0ctk\u4e2d\u53ea\u6709\u6b63\u786e\u89e3\u6807\u7b7e\u7684\u7d22\u5f15\u4e3a1\uff0c\u5176\u4ed6\u5747\u4e3a0\uff08one-hot\u8868\u793a\uff09\u3002<\/li>\n<li>\u4ea4\u53c9\u71b5\u8bef\u5dee\u7684\u503c\u662f\u7531\u6b63\u786e\u89e3\u6807\u7b7e\u6240\u5bf9\u5e94\u7684\u8f93\u51fa\u7ed3\u679c\u51b3\u5b9a\u7684\u3002<\/li>\n<\/ul>\n<h3>4\u3001mini-batch\u5b66\u4e60<\/h3>\n<ul>\n<li>\u8ba1\u7b97\u635f\u5931\u51fd\u6570\u65f6\u5fc5\u987b\u5c06\u6240\u6709\u7684\u8bad\u7ec3\u6570\u636e\u4f5c\u4e3a\u5bf9\u8c61\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u5982\u679c\u8bad\u7ec3\u6570\u636e\u6709100\u4e2a\u7684\u8bdd\uff0c\u6211\u4eec\u5c31\u8981\u628a\u8fd9100\u4e2a\u635f\u5931\u51fd\u6570\u7684\u603b\u548c\u4f5c\u4e3a\u5b66\u4e60\u7684\u6307\u6807\u3002<\/li>\n<li>\u6bd4\u5982\uff0c\u4ece60000\u4e2a\u8bad\u7ec3\u6570\u636e\u4e2d\u968f\u673a\u9009\u62e9100\u7b14\uff0c\u518d\u7528\u8fd9100\u7b14\u6570\u636e\u8fdb\u884c\u5b66\u4e60\u3002\u8fd9\u79cd\u5b66\u4e60\u65b9\u5f0f\u79f0\u4e3amini-batch\u5b66\u4e60\u3002<\/li>\n<\/ul>\n<h3>5\u3001mini-batch\u7248\u4ea4\u53c9\u71b5\u8bef\u5dee\u7684\u5b9e\u73b0<\/h3>\n<p><img src=\"https:\/\/lemon-guess.oss-cn-hangzhou.aliyuncs.com\/img\/8d76e15807e4490c83017811859b30d8.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<ul>\n<li>\u6c42\u5355\u4e2a\u6570\u636e\u7684\u4ea4\u53c9\u71b5\u8bef\u5dee\u65f6\uff0c\u9700\u8981\u6539\u53d8\u6570\u636e\u7684\u5f62\u72b6\u3002\u5e76\u4e14\uff0c\u5f53\u8f93\u5165\u4e3amini-batch\u65f6\uff0c\u8981\u7528batch\u7684\u4e2a\u6570\u8fdb\u884c\u6b63\u89c4\u5316\uff0c\u8ba1\u7b97\u5355\u4e2a\u6570\u636e\u7684\u5e73\u5747\u4ea4\u53c9\u71b5\u8bef\u5dee\u3002<\/li>\n<\/ul>\n<h3>6\u3001\u8bbe\u7f6e\u635f\u5931\u51fd\u6570\u7684\u539f\u56e0<\/h3>\n<ul>\n<li>\u5728\u795e\u7ecf\u7f51\u7edc\u7684\u5b66\u4e60\u4e2d\uff0c\u5bfb\u627e\u6700\u4f18\u53c2\u6570\uff08\u6743\u91cd\u548c\u504f\u7f6e\uff09\u65f6\uff0c\u8981\u5bfb\u627e\u4f7f\u635f\u5931\u51fd\u6570\u7684\u503c\u5c3d\u53ef\u80fd\u5c0f\u7684\u53c2\u6570\u3002\u4e3a\u4e86\u627e\u5230\u4f7f\u635f\u5931\u51fd\u6570\u7684\u503c\u5c3d\u53ef\u80fd\u5c0f\u7684\u5730\u65b9\uff0c\u9700\u8981\u8ba1\u7b97\u53c2\u6570\u7684\u5bfc\u6570\uff08\u786e\u5207\u5730\u8bb2\u662f\u68af\u5ea6\uff09\uff0c\u7136\u540e<strong>\u4ee5\u8fd9\u4e2a\u5bfc\u6570\u4e3a\u6307\u5f15\uff0c\u9010\u6b65\u66f4\u65b0\u53c2\u6570\u7684\u503c<\/strong>\u3002<\/li>\n<li>\u5728\u8fdb\u884c\u795e\u7ecf\u7f51\u7edc\u7684\u5b66\u4e60\u65f6\uff0c\u4e0d\u80fd\u5c06\u8bc6\u522b\u7cbe\u5ea6\u4f5c\u4e3a\u6307\u6807\u3002\u56e0\u4e3a\u5982\u679c\u4ee5\u8bc6\u522b\u7cbe\u5ea6\u4e3a\u6307\u6807\uff0c\u5219\u53c2\u6570\u7684\u5bfc\u6570\u5728\u7edd\u5927\u591a\u6570\u5730\u65b9\u90fd\u4f1a\u53d8\u4e3a0\u3002<\/li>\n<li>\u8bc6\u522b\u7cbe\u5ea6\u5bf9\u5fae\u5c0f\u7684\u53c2\u6570\u53d8\u5316\u57fa\u672c\u4e0a\u6ca1\u6709\u4ec0\u4e48\u53cd\u5e94\uff0c\u5373\u4fbf\u6709\u53cd\u5e94\uff0c\u5b83\u7684\u503c\u4e5f\u662f\u4e0d\u8fde\u7eed\u5730\u3001\u7a81\u7136\u5730\u53d8\u5316\uff08\u4e0e\u9636\u8dc3\u51fd\u6570\u7c7b\u4f3c\uff09\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u533a\u522b \u5728\u795e\u7ecf\u7f51\u7edc\u4e2d\uff0c\u4ee3\u4ef7\u51fd\u6570\uff08Cost Function\uff09\u548c\u635f\u5931\u51fd\u6570\uff08Loss Function\uff09\u5e76\u4e0d\u5b8c\u5168\u662f\u540c\u4e00\u4e2a\u6982\u5ff5\uff0c\u4f46\u5b83\u4eec\u7d27\u5bc6\u76f8\u5173\uff0c   \u2026 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[254],"tags":[256,255,257],"_links":{"self":[{"href":"\/index.php?rest_route=\/wp\/v2\/posts\/9221"}],"collection":[{"href":"\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9221"}],"version-history":[{"count":2,"href":"\/index.php?rest_route=\/wp\/v2\/posts\/9221\/revisions"}],"predecessor-version":[{"id":9223,"href":"\/index.php?rest_route=\/wp\/v2\/posts\/9221\/revisions\/9223"}],"wp:attachment":[{"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9221"},{"taxonomy":"post_tag","embeddable":true,"href":"\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}