Hiiiii Sakuraiiiii!



 sakuraiiiii:

I can minimize abs(\nambla L) whose minimum is 0, where L=f(x)+\lambda h(x) + \mu g(x). Is it will be worked?


In principle, you could do this.  The problem (in general, and in
the specific context of pytorch) is how are you going to calculate
abs (nabla L)?
If you can do it analytically, great.  (But then you might even be able
to solve your full optimization problem analytically.)
You could imagine using pytorch’s autograd to numerically calculate
nabla L, but if you then want to use gradient descent to minimize
abs (nabla L), you will be, in effect, calculating second derivatives
of L with respect to the parameters of your model and your Lagrange
multiplier.
Research using and calculating the Hessian matrix in pytorch to
see what people have been able to do with this and the difficulties
involved.
Best.
K. Frank