3

I would like to ask if some one can explain to me what are the differences of syntax-directed tangent-linear code and adjoint code.

It is related to derivation of code with a compiler.

I understand that they are different ways to make the derivations of the mathematical equations in a program, but, I don't know exactly how to interpret them.

Thanks in advance.

Regards.

4

1 回答 1

0

据我了解,自动创建衍生代码只有两种方法:

  • 前向分化
  • 后向分化

据我了解,向后微分只是学术性的,因为它需要记住在数组中执行的操作,最后返回这个数组并解释这个数组的内容。结果(由于解释)这样的代码非常慢。

据我记得,后退方法与链式法则有关。

也可以混合使用两种方法:如果您有一段代码:

    a=f(b);

并且函数 f() 不是微不足道的,并且 b 带有许多导数,那么它有助于计算

    a=f(b);
    da_db=df(b);
    da_dc=da_db*db_dc;
    da_dd=da_db*db_dd;
于 2013-11-07T21:09:06.217 回答