3 ms·
As far as I understand, the adjoint method computes gradients for functions that obey hard constraints (such as fluid solvers), and the main advantage is that i
by duvenaud 11y ago
As far as I understand, the adjoint method computes gradients for functions that obey hard constraints (such as fluid solvers), and the main advantage is that it avoids differentiating through iterative constraint satisfaction procedures.
I had some success with naively differentiating through fluid solvers, though. Here is a fluid field whose initial velocities have been initialized so that it will end up matching a given image (i.e. blowing a fancy smoke ring:)
https://github.com/HIPS/autograd/blob/master/examples/fluidsim/animated.gif https://github.com/HIPS/autograd/blob/master/examples/fluids...
and here's a free-form wing shape in the middle of being optimized to maximize lift-to-drag ratio:
https://github.com/HIPS/autograd/blob/master/examples/fluidsim/wing.png https://github.com/HIPS/autograd/blob/master/examples/fluids...
I too find it baffling when I see engineers doing gradient-free optimization of simulated objective functions, although it's not always easy to compute gradients, especially when using massive Fortran codebases or very large-scale simulations.