Purpose of tensor_jacobian_product in adjoint optimization examples #2098
-
In some of the tutorials nlopt's gradient array is populated with simply the gradient returned by the adjoint solver, but in some a tensor_jacobian product is used, as shown below.
What is the purpose of doing that versus just populating it with the gradient? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Chain rule. The adjoint solver doesn't know what other operations you perform on your design variables before you provide them to the solver itself. But your optimization algorithm needs to know the gradient w.r.t. the actual design parameters. For example, if you filter and threshold your design variables ( So Our recent paper discusses these nuances in detail (see section 4). |
Beta Was this translation helpful? Give feedback.
Chain rule.
The adjoint solver doesn't know what other operations you perform on your design variables before you provide them to the solver itself. But your optimization algorithm needs to know the gradient w.r.t. the actual design parameters.
For example, if you filter and threshold your design variables ($\rho$ ), s.t. $\bar{\rho}=m(\rho)$ (where $m()$ is the final mapping function), the adjoint solver only ever sees $\bar{\rho}$ . Which means the gradient it provides is $\frac{\partial f}{\partial \bar{\rho}}$ , when you really want $\frac{\partial f}{\partial \rho}$ .
So
tensor_jacobian_products
backpropagates…