ddn icon indicating copy to clipboard operation
ddn copied to clipboard

optimization problem with multple target variables

Open mhayoz opened this issue 2 years ago • 1 comments

I have an optimization problem with two target variables in the following form:

$y_1, y_2 = \argmin_{y_1, y_2} f(x,y_1, y_2)$

where $y_1$ and $y_2$ do not have the same shape. Is it possible to use your pytorch implementation of DDN for this?

Thank you in advance for your answer.

mhayoz avatar Dec 05 '22 09:12 mhayoz

The best way to handle this is to vectorize both y_1 and y_2 and concatenate them into a single variable for the purposes of differentiation. Within your optimisation procedure (and outside of the node) you can separate them again into different variables.

sgould avatar Dec 05 '22 17:12 sgould