cvxgrp/cvxpylayers

Getting dx/dp instead of df/dp

Zhuojun-PhD opened this issue · 0 comments

Hello,

Thanks for the package!

I am trying to retrieve the gradient of the optimal decision with respect to a parameter $\theta$, i.e., $\nabla_\theta x$.
I established a toy problem in order to compute $\nabla_k x$:

image

However, if I understand correctly, the dimension of $\nabla_k x$ should be $\mathbb{R}^n$.

So I am curious that if there is any way I get retrieve $\nabla_k x$ instead of $\nabla_k f(x)$?

Thanks for the reply in advance,
Zhuojun