Deep learning constrained optimization

Hi :slight_smile:
I was wondering if anyone has seen an example code / video showcasing constrained optimization (minimizing a loss function under a constraint), using neural nets.
It’s a topic that is discussed in general, but I’m having trouble finding examples showcasing this.

Thanks in advance for any help.