我有一个接受多元变量x的函数,这里x=[x1,x2,x3]。假设我的函数看起来像:
f(x,T)=美国运输部(x,T)+np.exp.公司(美国运输部(x,T)其中T是常数。在
我对查找df/dx1、df/dx2和df/dx3函数很感兴趣。在
我使用scipydiff取得了一些成功,但是我有点怀疑,因为它使用的是数值差异。昨天,我的同事指给我签名。因为它似乎是一个流行的包,我希望这里的人知道如何使用这个包获得部分差异化。我对这个库的初始测试表明grad函数只对第一个参数进行微分。我不知道如何把它扩展到其他论点。任何帮助都将不胜感激。在
谢谢。在
Tags:
我在autograd源代码中找到了grad函数的以下描述:
所以
^{pr2}$另外,一定要使用numpy libaray,它带有autograd
而不是
为了利用所有numpy函数。在
相关问题 更多 >
编程相关推荐