Constrain outputs in a regression problem

Hi, everyone.

I am attempting to constrain some outputs of my regression network, say x, y, z = model(data), where x, y, z are scalars. The constrain that I want to impose is that when predicting all three dependent variables, the condition “x + y <=1.0” must be honored. Given this description, can I implement this in a forward function?

Thank you for your attention!

Hello, my apology for the late reply. We are slowly converging to deprecate this forum in favor of the GH build-in version… Could we kindly ask you to recreate your question there - Lightning Discussions

1 Like