Modified loss function in NeuralPDE

Is it possible to modify the loss function in PINNs? like instead of loss function of variables, may I modify it to loss of sin or cos of variables?

See the additional_loss function. Unless you mean something different?

I saw that the additional_loss function just have the syntax that additional_loss(phi, θ, p). The problem’s variables include the phase angle, and there are the functions of sin and cos of them. If I use additional_loss(phi, θ, p) the network could estimate the loss by sin or cos of phase angle or do I need to implement the specific function at the argument of additional_loss?

The tutorial has the information for the adaptive loss function, so there are any functions for additional_loss or do I need to define the new function for additional_loss?

You just define a new function. It can be any differentiable Julia function.