Setting constraints on unknown functions/fields #1001
-
|
I was wondering if there is a way to set constraints on functions, e.g. that it must be all positive. More specifically, if you are trying to solve a problem such as the "Inverse problem for the Poisson equation with unknown forcing field", and you know that the forcing field has to be positive. Is there a way to implement such a constraint? NB! I am not working on that exact equation, but I need a way to force the unknown field in my set of equations to be positive, but I haven't been able to do this in practice. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Plz refer this one: #515...In the code, they use |
Beta Was this translation helpful? Give feedback.
Plz refer this one: #515...In the code, they use
beta=tf.math.softplus(tf.Variable(0, trainable=True, dtype=tf.float32))to strictly put the positive constraint on the variable...