how to encode constraints to the output of neural networks 9bce302b9687