{"id":13019,"date":"2024-08-18T16:57:00","date_gmt":"2024-08-18T08:57:00","guid":{"rendered":"https:\/\/www.orczhou.com\/?p=13019"},"modified":"2026-01-16T11:02:48","modified_gmt":"2026-01-16T03:02:48","slug":"computation-graphs-chain-rule-derivative","status":"publish","type":"post","link":"https:\/\/www.orczhou.com\/index.php\/2024\/08\/computation-graphs-chain-rule-derivative\/","title":{"rendered":"\u4f7f\u7528\u8ba1\u7b97\u56fe\u8fdb\u884c\u5fae\u5206\/\u6c42\u5bfc\u8fd0\u7b97"},"content":{"rendered":"\n\n\n\n<p style=\"margin-top:4px\">\u5728\u4f7f\u7528\u68af\u5ea6\u4e0b\u964d\u6cd5\u8fdb\u884c\u56de\u5f52\u65f6\uff0c\u9700\u8981\u9891\u7e41\u7684\u8fdb\u884c\u504f\u5bfc\u6570\u7684\u8ba1\u7b97\u3002\u5728\u5f88\u591a\u7684\u76f8\u5173\u4ecb\u7ecd\u4e2d\u4f1a\u5c55\u793a\u4f7f\u7528\u8ba1\u7b97\u56fe\u8fdb\u884c\u504f\u5bfc\u6570\u7684\u8ba1\u7b97\u3002\u8fd9\u91cc\u7b80\u8ff0\u5bf9\u8be5\u65b9\u6cd5\u7684\u4e00\u4e9b\u7406\u89e3\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u6982\u8ff0<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8ba1\u7b97\u56fe\u6c42\u5bfc\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u662f\u5bf9\u6c42\u5bfc\u7684\u94fe\u5f0f\u6cd5\u5219\u7684\u56fe\u8868\u793a<\/li>\n\n\n\n<li>\u5728\u8ba1\u7b97\u56fe\u4e2d\uff0c\u5728\u4e00\u4e2a\u5355\u5411\u8def\u5f84\u4e0a\u7684\u7b97\u5b50\uff0c\u6c42\u5bfc\u65f6\uff0c\u5c06\u5404\u4e2a\u5bfc\u6570\u76f8\u4e58\u5373\u53ef<\/li>\n\n\n\n<li>\u5728\u8ba1\u7b97\u56fe\u4e2d\uff0c\u5728\u4e00\u4e2a\u5355\u5411\u8def\u5f84\u4e0a\uff0c\u4e0a\u4e00\u4e2a\u8282\u70b9\u7684\u8f93\u51fa\uff0c\u662f\u4e0b\u4e00\u4e2a\u8282\u70b9\u7684\u8f93\u5165\uff1b\u51fd\u6570\u5173\u7cfb\u4e0a\uff0c\u5c31\u662f \\(f(g(x)) \\)\uff0c\u5373 \\(g(x) \\) \u7684\u8f93\u51fa\u662f\uff0c\\(f(x) \\)\u7684\u8f93\u5165<\/li>\n\n\n\n<li>\u4e00\u4e2a\u8282\u70b9\u7684\u4e24\u4e2a\u5165\u5ea6\uff08\u5206\u652f\uff09\uff0c\u6c42\u5bfc\u65f6\uff0c\u5c06\u5404\u4e2a\u5bfc\u6570\u76f8\u4e58\u5373\u53ef<\/li>\n\n\n\n<li>\u591a\u5143\u51fd\u6570\u6c42\u504f\u5bfc\u65f6\uff0c\u53ea\u9700\u8981\u5173\u6ce8\u5176\u504f\u5bfc\u7684\u53d8\u91cf\u5373\u53ef<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u94fe\u5f0f\u6cd5\u5219\u7684\u5178\u578b\u5f62\u5f0f<\/h3>\n\n\n\n<p>\u8fd9\u91cc\u5bf9\u6c42\u5bfc\u7684\u94fe\u5f0f\u6cd5\u5219\u7684\u5178\u578b\u5f62\u5f0f\u505a\u4e00\u4e2a\u7b80\u5355\u7684\u56de\u987e\u3002<\/p>\n\n\n\n<p>\u5728\u5bf9\u590d\u6742\u7684\u8868\u8fbe\u5f0f\u6c42\u5bfc\/\u5fae\u5206\u65f6\uff0c\u6709\u65f6\u5019\u770b\u8d77\u6765\u4f1a\u5f88\u590d\u6742\u3002\u5982\u679c\u80fd\u591f\u7075\u6d3b\u7684\u4f7f\u7528\u94fe\u5f0f\u6cd5\u5219\u53ef\u4ee5\u5de7\u5999\u5c06\u590d\u6742\u51fd\u6570\u7684\u6c42\u5bfc\u8f6c\u6362\u4e3a\u7b80\u5355\u51fd\u6570\u7684\u6c42\u5bfc\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.1 \u6cd5\u52191<\/h4>\n\n\n<p>$$<br \/>\nf(x) = g(h(x))<br \/>\n\\\\<br \/>\nf'(x) = \\frac{\\partial f}{\\partial x} = \\frac{\\partial g}{\\partial h} \\frac{\\partial h}{\\partial x}<br \/>\n$$<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u4f7f\u7528\u8be5\u6cd5\u5219\u53ef\u4ee5\u5f88\u7b80\u5355\u5bf9\u5982\u4e0b\u51fd\u6570\u6c42\u5bfc\uff1a<\/p>\n\n\n<p>$$<br \/>\nf(x) = e^{(x^2)}<br \/>\n\\\\<br \/>\ng(h) = e^h \\, h(x) = x^2<br \/>\n\\\\<br \/>\nf'(x) = \\frac{\\partial g}{\\partial h} \\frac{\\partial h}{\\partial x} = e^h * 2 * x = 2x*e^h = 2xe^{x^2}<br \/>\n$$<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u5982\u679c\u4f7f\u7528\u8ba1\u7b97\u56fe\u7684\u65b9\u5f0f\u8868\u8fbe\u5982\u4e0a\u7684\u6c42\u5bfc\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"242\" src=\"https:\/\/www.orczhou.com\/wp-content\/uploads\/2024\/08\/image-33.png\" alt=\"\" class=\"wp-image-13041\" srcset=\"https:\/\/www.orczhou.com\/wp-content\/uploads\/2024\/08\/image-33.png 580w, https:\/\/www.orczhou.com\/wp-content\/uploads\/2024\/08\/image-33-300x125.png 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><p>$$<br \/>\nf(x) = f(g(x))<br \/>\n\\\\<br \/>\n\\frac{\\partial f}{\\partial x} = \\frac{\\partial f}{\\partial g}\\frac{\\partial g}{\\partial h}<br \/>\n$$<\/p>\n<\/div>\n<\/div>\n\n\n\n<p>\u6240\u4ee5\uff1a<strong><em>\u5728\u8ba1\u7b97\u56fe\u4e2d\uff0c\u5728\u4e00\u4e2a\u5355\u5411\u8def\u5f84\u4e0a\u7684\u7b97\u5b50\uff0c\u6c42\u5bfc\u65f6\uff0c\u5c06\u5404\u4e2a\u5bfc\u6570\u76f8\u4e58\u5373\u53ef\u3002<\/em><\/strong><\/p>\n\n\n\n<!--more-->\n\n\n\n<h4 class=\"wp-block-heading\">2.2 \u6cd5\u52192<\/h4>\n\n\n\n<p><\/p>\n\n\n<p>$$<br \/>\nf(x) = f(u(x),(v(x))<br \/>\n\\\\<br \/>\nf'(x) = \\frac{\\partial f}{\\partial u} \\frac{\\partial u}{\\partial x} + \\frac{\\partial f}{\\partial v} \\frac{\\partial v}{\\partial x}<br \/>\n$$<\/p>\n\n\n\n<p>\u53ef\u4ee5\u4f7f\u7528\u4e0a\u9762\u516c\u5f0f\uff0c\u505a\u5982\u4e0b\u7684\u6c42\u5bfc\uff1a<\/p>\n\n\n<p>$$<br \/>\nf(x) = x*e^x<br \/>\n\\\\<br \/>\nu(x) = x \\, , v(x) = e^x ,\\, f(u,v) = u*v<br \/>\n\\\\<br \/>\nf'(x) = \\frac{\\partial f}{\\partial u} \\frac{\\partial u}{\\partial x} + \\frac{\\partial f}{\\partial v} \\frac{\\partial v}{\\partial x} = v*1 + u*e^x = e^x + x*e^x<br \/>\n$$<\/p>\n\n\n\n<p>\uff08\u6ce8\uff1a\u5f53\u7136\u4e0a\u9762\u7684\u51fd\u6570\u6c42\u5bfc\u6700\u597d\u7528\u4e58\u6cd5\u6cd5\u5219\u53bb\u6c42\u5bfc\uff0c\u5b8c\u5168\u6ca1\u6709\u5fc5\u8981\u4f7f\u7528\u4e0a\u9762\u7684\u65b9\u6cd5\uff0c\u8fd9\u91cc\u53ea\u662f\u6f14\u793a\u8be5\u65b9\u6cd5\u7684\u4f7f\u7528\uff09<\/p>\n\n\n\n<p>\u4f7f\u7528\u8ba1\u7b97\u56fe\u8868\u793a\u8be5\u6c42\u5bfc\uff1a<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"293\" height=\"192\" src=\"https:\/\/www.orczhou.com\/wp-content\/uploads\/2024\/08\/2024-\u9f99.jpeg\" alt=\"\" class=\"wp-image-13038\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><p>$$<br \/>\nf(x) = f(g,h)  g=g(x)  h=h(x)<br \/>\n\\\\<br \/>\n\\frac{\\partial f}{\\partial x} = \\frac{\\partial f}{\\partial g}\\frac{\\partial g}{\\partial x} + \\frac{\\partial f}{\\partial h}\\frac{\\partial h}{\\partial x}<br \/>\n$$<\/p>\n<\/div>\n<\/div>\n\n\n\n<p>\u6240\u4ee5\uff1a<strong>\u4e00\u4e2a\u8282\u70b9\u7684\u4e24\u4e2a\u5165\u5ea6\uff08\u5206\u652f\uff09\uff0c<strong><em>\u6c42\u5bfc\u65f6\uff0c\u5c06\u5404\u4e2a\u8def\u5f84\u4e0a\u7684\u5bfc\u6570\u76f8\u52a0\u5373\u53ef<\/em><\/strong><\/strong>\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.3 \u591a\u5143\u51fd\u6570\u7684\u573a\u666f<\/h4>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"326\" height=\"188\" src=\"https:\/\/www.orczhou.com\/wp-content\/uploads\/2024\/08\/fghxy.png\" alt=\"\" class=\"wp-image-13054\" srcset=\"https:\/\/www.orczhou.com\/wp-content\/uploads\/2024\/08\/fghxy.png 326w, https:\/\/www.orczhou.com\/wp-content\/uploads\/2024\/08\/fghxy-300x173.png 300w\" sizes=\"auto, (max-width: 326px) 100vw, 326px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><p>$$<br \/>\nf = f(x,y) = f(g,h) = f(g(x,y),g(x,y))<br \/>\n\\\\<br \/>\n\\frac{\\partial f}{\\partial x} = \\frac{\\partial f}{\\partial g}\\frac{\\partial g}{\\partial x} + \\frac{\\partial f}{\\partial h}\\frac{\\partial h}{\\partial x}<br \/>\n\\\\<br \/>\n\\frac{\\partial f}{\\partial y} = \\frac{\\partial f}{\\partial g}\\frac{\\partial g}{\\partial y} + \\frac{\\partial f}{\\partial h}\\frac{\\partial h}{\\partial y}<br \/>\n$$<\/p>\n<\/div>\n<\/div>\n\n\n\n<p>\u5bf9\u4e8e\u591a\u5143\u51fd\u6570\u573a\u666f\uff0c\u56e0\u4e3a\u6211\u4eec\u603b\u662f\u5173\u6ce8\u7684\u65f6\u662f\u4e00\u4e2a\u5206\u91cf\u7684\u504f\u5bfc\u6570\uff0c\u6240\u4ee5\u5176\u8ba1\u7b97\u6cd5\u5219\u5982\u4e0a\u3002\u795e\u7ecf\u7f51\u7edc\u4e2d\u7684\u76f8\u5173\u8ba1\u7b97\uff0c\u4e0e\u4e0a\u8ff0\u8ba1\u7b97\u975e\u5e38\u7c7b\u4f3c\uff0c\u8fd9\u91cc\u4e0d\u518d\u8be6\u8ff0\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u9644\u5f55\uff1a\u5bf9\u4e58\u6cd5\u6c42\u5bfc<\/h3>\n\n\n<p>$$<br \/>\nf(x) = g(x)h(x)<br \/>\n\\\\<br \/>\nf'(x) = g(x)h'(x) + g'(x)h(x)<br \/>\n$$<\/p>\n\n\n\n<p>\u7ed3\u5408\u7b80\u5355\u51fd\u6570\u6c42\u5bfc\u3001\u4e58\u6cd5\u6cd5\u5219\u3001\u94fe\u5f0f\u6cd5\u5219\uff0c\u53ef\u4ee5\u5bf9\u66f4\u590d\u6742\u7684\u51fd\u6570\u8fdb\u884c\u6c42\u5bfc\uff1a<\/p>\n\n\n<p>$$<br \/>\nf(x) = xe^{x^2}<br \/>\n\\\\<br \/>\nu(x) = x \\, g(x) = e^{(x^2)}<br \/>\n\\\\<br \/>\ng'(x) = \\frac{\\partial g}{\\partial h} \\frac{\\partial h}{\\partial x} = 2xe^{x^2}<br \/>\n\\\\<br \/>\nf'(x) = u'(x)g(x) + u(x)g'(x) = g(x) + u(x)g'(x) = e^{x^2} + x*2xe^{x^2} = e^{x^2} + 2x^2e^{x^2}<br \/>\n$$<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u4f7f\u7528\u68af\u5ea6\u4e0b\u964d\u6cd5\u8fdb\u884c\u56de\u5f52\u65f6\uff0c\u9700\u8981\u9891\u7e41\u7684\u8fdb\u884c\u504f\u5bfc\u6570\u7684\u8ba1\u7b97\u3002\u5728\u5f88\u591a\u7684\u76f8\u5173\u4ecb\u7ecd\u4e2d\u4f1a\u5c55\u793a\u4f7f\u7528\u8ba1\u7b97\u56fe\u8fdb\u884c\u504f\u5bfc\u6570\u7684\u8ba1\u7b97\u3002\u8fd9\u91cc\u7b80\u8ff0\u5bf9\u8be5\u65b9\u6cd5\u7684\u4e00\u4e9b\u7406\u89e3\u3002<\/p>\n","protected":false},"author":1,"featured_media":22454,"comment_status":"open","ping_status":"closed","sticky":false,"template":"wp-custom-template-a-1440-px-width-template","format":"standard","meta":{"_eb_attr":"","inline_featured_image":false,"_tocer_settings":[],"footnotes":""},"categories":[137],"tags":[],"class_list":["post-13019","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-learning-more"],"_links":{"self":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/13019","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/comments?post=13019"}],"version-history":[{"count":47,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/13019\/revisions"}],"predecessor-version":[{"id":22458,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/13019\/revisions\/22458"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/media\/22454"}],"wp:attachment":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/media?parent=13019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/categories?post=13019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/tags?post=13019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}