# \#diffopt

**URL:** https://discourse.julialang.org/tag/diffopt/1648.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [DiffOpt / JuMP: zero gradient for variable fixed by equality constraint](https://discourse.julialang.org/t/diffopt-jump-zero-gradient-for-variable-fixed-by-equality-constraint/134041)

<div class="topic-metadata">

**Author:** [@yeomoon](https://discourse.julialang.org/u/yeomoon)\
**Replies:** 12\
**Last updated:** [November 28, 2025, 5:36am UTC](https://discourse.julialang.org/t/diffopt-jump-zero-gradient-for-variable-fixed-by-equality-constraint/134041 "2025-11-28T05:36:03Z")

</div>

Hi all, I’m trying to train a neural network that is followed by a differentiable optimization layer in Julia. Conceptually it’s: Flux NN → Economic Dispatch layer (ED layer) → Loss The ED layer is implemented as a …

---

## [Differentiate through SecondOrderCone](https://discourse.julialang.org/t/differentiate-through-secondordercone/130365)

<div class="topic-metadata">

**Author:** [@gustave\_Robichon](https://discourse.julialang.org/u/gustave_Robichon)\
**Replies:** 8\
**Last updated:** [July 4, 2025, 10:45am UTC](https://discourse.julialang.org/t/differentiate-through-secondordercone/130365 "2025-07-04T10:45:14Z")

</div>

Hello :slight\_smile: I want to differentiate an Optimization Program. I use DiffOpt for this, which is built over JuMP. I have some data, that I want to fit by a function of a few parameters. This can be done with diffe…

---

## [Differentiating through a QP - order of constraints](https://discourse.julialang.org/t/differentiating-through-a-qp-order-of-constraints/119275)

<div class="topic-metadata">

**Author:** [@blob](https://discourse.julialang.org/u/blob)\
**Replies:** 3\
**Last updated:** [September 20, 2024, 6:04am UTC](https://discourse.julialang.org/t/differentiating-through-a-qp-order-of-constraints/119275 "2024-09-20T06:04:17Z")

</div>

This is a follow-up to this topic. I have a QP that I want to differentiate through using DiffOpt. In contrast to the example from the tutorial, I have two constraints: n = 2 # variable dimension m = 2; # no of inequal…

---

## [DiffOpt - differentiating through a QP/different from manual](https://discourse.julialang.org/t/diffopt-differentiating-through-a-qp-different-from-manual/118141)

<div class="topic-metadata">

**Author:** [@blob](https://discourse.julialang.org/u/blob)\
**Replies:** 3\
**Last updated:** [August 14, 2024, 9:34am UTC](https://discourse.julialang.org/t/diffopt-differentiating-through-a-qp-different-from-manual/118141 "2024-08-14T09:34:30Z")

</div>

I want to differentiate through a QP following the tutorial from DiffOpt. The QP in question: I would like to differentiate wrt to h, q, and G. I do that in three ways: Using the paper cited on DiffOpt website: dwh,…
