ddn
ddn copied to clipboard
optimization problem with multple target variables
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.
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.