Opt icon indicating copy to clipboard operation
Opt copied to clipboard

Best Practices for energy formulation

Open Kalkasas opened this issue 6 years ago • 1 comments

I am currently trying to implement 3D model fitting using a model which uses linear blend skinning. I am running into memory issues because I think the underlying expression graph becomes too big and/or the resulting partial derivatives during symbolic differentiation become too large.

Can you point me to some best practices regarding the ordering of operations to help the underlying code generation process in a better way regarding factoization, substitution...

I implemented my problem on the CPU before using ADOL-C for automatic differentiation and a naive port to Opt does not seem to work. An additional advantage I had there was that I could share computation of subexpressions across some residuals i.e. sharing the kinematic tree computation.

Kalkasas avatar Dec 23 '17 01:12 Kalkasas

This is a problem we have not yet run into, so I do not have much advice. If you provide a test case I could try and reproduce.

Our autodiff implementation is contained in https://github.com/niessner/Opt/blob/master/API/src/ad.t if you prefer to dig in yourself.

The current version of Opt supports subexpression sharing only for unknown-wise residuals (using ComputedArray/ComputedImage). It would be advantageous to extend that.

Mx7f avatar Jan 08 '18 23:01 Mx7f