Python - Automatic Differentiation 自动微分
Posted SpikeKing
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python - Automatic Differentiation 自动微分相关的知识,希望对你有一定的参考价值。
区分函数的Automatic Differentiation(自动微分)、Manual Differentiation(手动微分)、Numerical Differentiation(数值微分),自动微分属于链式求导。自动微分属于,前向传播(forward)过程,计算函数值时,同时计算微分值。
参考:Automatic Differentiation in Machine Learning a Survey
不同的微分方法,对应关系如下:
具体源码如下,可作为题目:
class Solution:
def func(self, x):
"""
![](https://image.cha138.com/20220712/9cc1a86c489245de8589d4072ad8a0d7.jpg)
![](https://image.cha138.com/20220712/c920a47162fc44f1a85e9bb4cb88d64a.jpg)
以上是关于Python - Automatic Differentiation 自动微分的主要内容,如果未能解决你的问题,请参考以下文章