{"id":569,"date":"2023-07-25T18:48:52","date_gmt":"2023-07-25T10:48:52","guid":{"rendered":"https:\/\/blog.cirno.fun\/?p=569"},"modified":"2025-03-19T00:31:52","modified_gmt":"2025-03-18T16:31:52","slug":"chap7-%e5%8f%8d%e5%90%91%e4%bc%a0%e6%92%ad%e7%9a%84%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/blog.sssn.tech\/?p=569","title":{"rendered":"[Chap7]-\u53cd\u5411\u4f20\u64ad\u7684\u6ce8\u610f\u4e8b\u9879"},"content":{"rendered":"<h2>\u68af\u5ea6\u68c0\u9a8c<\/h2>\n<p>\u53cd\u5411\u4f20\u64ad\u7b97\u6cd5\u7684\u5b9e\u73b0\u8fc7\u7a0b\u6bd4\u8f83\u590d\u6742\uff0c\u5bb9\u6613\u4ea7\u751f\u5c0f\u9519\u8bef\uff0c\u5e76\u4e14\u8fd9\u4e9b\u5c0f\u9519\u8bef\u6709\u65f6\u5e76\u4e0d\u660e\u663e\u2014\u2014\u4ece\u5c0f\u6570\u636e\u7684\u7ed3\u679c\u6765\u770b\uff0c\u5e76\u6ca1\u6709\u4e25\u91cd\u5f71\u54cd\u7ed3\u679c\uff0c\u8fd9\u662f\u975e\u5e38\u81f4\u547d\u7684\uff0c\u56e0\u4e3a\u9519\u8bef\u4f1a\u968f\u7740\u6570\u636e\u589e\u591a\u53d8\u5f97\u66f4\u52a0\u660e\u663e\uff0c\u4f46\u6211\u4eec\u518d\u8c03\u8bd5\u7684\u65f6\u5019\u5374\u5f80\u5f80\u4e0d\u80fd\u5b9a\u4f4d\u4ed6\u7684\u5177\u4f53\u4f4d\u7f6e<\/p>\n<p>\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u95ee\u9898\uff0c\u6211\u4eec\u91c7\u53d6<strong>\u6570\u503c\u68af\u5ea6\u68c0\u9a8c<\/strong>(Numerical Gradient Checking)\u65b9\u6cd5\u6765\u68c0\u6d4b\u6211\u4eec\u7684\u504f\u5bfc\u662f\u5426\u8ba1\u7b97\u6b63\u786e<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.sssn.tech\/wp-content\/uploads\/2023\/07\/image-1690281644691.png\" alt=\"file\" \/><\/p>\n<p>\u5373\u5bf9\u4e8e\u67d0\u4e2a\u7279\u5b9a\u7684 \ud835\udf03\uff0c\u6211\u4eec\u8ba1\u7b97\u51fa\u5728 \ud835\udf03-\ud835\udf00 \u5904\u548c \ud835\udf03+\ud835\udf00 \u7684\u4ee3\u4ef7\u503c\uff08\ud835\udf00\u662f\u4e00\u4e2a\u975e\u5e38\u5c0f\u7684\u503c\uff0c\u901a\u5e38\u9009\u53d61e-5\u5de6\u53f3\uff09\uff0c\u7136\u540e\u6c42\u4e24\u4e2a\u4ee3\u4ef7\u7684\u5e73\u5747\uff0c\u7528\u4ee5\u4f30\u8ba1\u5728 \ud835\udf03\u5904\u7684\u4ee3\u4ef7\u503c<\/p>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u662f\u53cc\u4fa7\u4f30\u7b97\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u53ea\u5bf9\u4e00\u4e2a\u65b9\u5411\u4f30\u7b97\uff0c\u4e0d\u8fc7\u53cc\u4fa7\u7684\u65b9\u6cd5\u7cbe\u5ea6\u7a0d\u597d\u4e00\u4e9b<\/p>\n<p>\u4e0b\u9762\u662f\u9488\u5bf9\u4e00\u4e2atheta1\u7684\u68c0\u9a8c<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.sssn.tech\/wp-content\/uploads\/2023\/07\/image-1690281820287.png\" alt=\"file\" \/><\/p>\n<h2>\u968f\u673a\u521d\u59cb\u5316<\/h2>\n<p>\u4efb\u4f55\u4f18\u5316\u7b97\u6cd5\u90fd\u9700\u8981\u521d\u59cb\u53c2\u6570\uff0c\u6709\u4eba\u4f1a\u89c9\u5f97\u6240\u6709\u521d\u59cb\u53c2\u6570\u90fd\u662f0\u662f\u53ef\u884c\u7684\uff0c\u4f46\u8fd9\u53ea\u5bf9\u903b\u8f91\u56de\u5f52\u53ef\u884c\uff0c\u5bf9\u795e\u7ecf\u7f51\u7edc\u4e0d\u53ef\u884c\uff0c\u56e0\u4e3a\u5f53\u6211\u4eec\u5c06\u6240\u6709\u53c2\u6570\u7f6e\u96f6\uff0c\u8fd9\u610f\u5473\u7740\u7b2c\u4e8c\u5c42\u7684\u6240\u6709\u795e\u7ecf\u5143\u90fd\u662f\u76f8\u540c\u7684\u503c\uff0c\u6700\u540e\u4e00\u5c42\u4e5f\u662f\uff0c\u7136\u540e\u5728\u53cd\u5411\u4f20\u64ad\u65f6\u5019\uff0cdelta\u4e5f\u90fd\u53d8\u6210\u4e00\u6837\u7684\uff0c\u4e8b\u5b9e\u4e0a\uff0c\u5982\u679c\u6211\u4eec\u5c06\u6240\u6709\u53c2\u6570\u90fd\u521d\u59cb\u5316\u4e3a\u540c\u4e00\u4e2a\u975e\u96f6\u7684\u6570\uff0c\u7ed3\u679c\u4e5f\u4e00\u6837<\/p>\n<p>\u6211\u4eec\u901a\u5e38\u968f\u673a\u521d\u59cb\u5316\u53c2\u6570\u5728\u6b63\u8d1fepsilon\u8303\u56f4\u5185\uff0c\u6bd4\u5982\u6211\u4eec\u9700\u8981\u968f\u673a\u521d\u59cb\u5316\u4e00\u4e2a10\u00d711\u7684\u77e9\u9635\uff0c\u4ee3\u7801\u662f<\/p>\n<pre><code>Theta1 = rand(10, 11) * (2*eps) \u2013 eps\n<\/code><\/pre>\n<h2>\u603b\u7ed3\u4e00\u4e0b<\/h2>\n<p>\u5c0f\u7ed3\u4e00\u4e0b\u4f7f\u7528\u795e\u7ecf\u7f51\u7edc\u65f6\u7684\u6b65\u9aa4\uff1a<\/p>\n<ul>\n<li>\u7f51\u7edc\u7ed3\u6784\uff1a\u7b2c\u4e00\u4ef6\u8981\u505a\u7684\u4e8b\u662f\u9009\u62e9\u7f51\u7edc\u7ed3\u6784\uff0c\u5373\u51b3\u5b9a\u9009\u62e9\u591a\u5c11\u5c42\u4ee5\u53ca\u51b3\u5b9a\u6bcf\u5c42\u5206\u522b\u6709\u591a\u5c11\u4e2a\u5355\u5143\u3002<\/li>\n<li>\u7b2c\u4e00\u5c42\u7684\u5355\u5143\u6570\u5373\u6211\u4eec\u8bad\u7ec3\u96c6\u7684\u7279\u5f81\u6570\u91cf\u3002<\/li>\n<li>\u6700\u540e\u4e00\u5c42\u7684\u5355\u5143\u6570\u662f\u6211\u4eec\u8bad\u7ec3\u96c6\u7684\u7ed3\u679c\u7684\u7c7b\u7684\u6570\u91cf\u3002<\/li>\n<li>\u5982\u679c\u9690\u85cf\u5c42\u6570\u5927\u4e8e 1\uff0c\u786e\u4fdd\u6bcf\u4e2a\u9690\u85cf\u5c42\u7684\u5355\u5143\u4e2a\u6570\u76f8\u540c\uff0c\u901a\u5e38\u60c5\u51b5\u4e0b\u9690\u85cf\u5c42\u5355\u5143\u7684\u4e2a\u6570 \u8d8a\u591a\u8d8a\u597d\u3002<\/li>\n<\/ul>\n<p>\u8bad\u7ec3\u7f51\u7edc\u7684\u57fa\u672c\u6b65\u9aa4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.sssn.tech\/wp-content\/uploads\/2023\/07\/image-1690282234144.png\" alt=\"file\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u68af\u5ea6\u68c0\u9a8c \u53cd\u5411\u4f20\u64ad\u7b97\u6cd5\u7684\u5b9e\u73b0\u8fc7\u7a0b\u6bd4\u8f83\u590d\u6742\uff0c\u5bb9\u6613\u4ea7\u751f\u5c0f\u9519\u8bef\uff0c\u5e76\u4e14\u8fd9\u4e9b\u5c0f\u9519\u8bef\u6709\u65f6\u5e76\u4e0d [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,18],"tags":[],"class_list":["post-569","post","type-post","status-publish","format-standard","hentry","category-11","category-18"],"_links":{"self":[{"href":"https:\/\/blog.sssn.tech\/index.php?rest_route=\/wp\/v2\/posts\/569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sssn.tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sssn.tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sssn.tech\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sssn.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=569"}],"version-history":[{"count":2,"href":"https:\/\/blog.sssn.tech\/index.php?rest_route=\/wp\/v2\/posts\/569\/revisions"}],"predecessor-version":[{"id":831,"href":"https:\/\/blog.sssn.tech\/index.php?rest_route=\/wp\/v2\/posts\/569\/revisions\/831"}],"wp:attachment":[{"href":"https:\/\/blog.sssn.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sssn.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sssn.tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}