In NeuralPDE you normally define the PDE (lhs-rhs=0) symbolically and the loss function is built internally, loosely \int dvars ||lhs(vars) - rhs(vars)||^2 .
Is there a way to specify the objective function symbolically directly? Let’s say you are crazy enough and just want to optimize \int dvars \, [cos(lhs(vars)) + sin(rhs (vars)) ] . What would be the easiest way to do that?
You crazy bastard. There’s no way to do that right now without hacking the code, but that would be cool. Open an issue and we can see how to support that. Right now you can simply add new loss terms with additional_loss, but not change the PINN loss.