Problem#
- class pinnx.problem.Problem(approximator=None, loss_fn='MSE', loss_weights=None)[source]#
Base Problem Class.
A problem is defined by the approximator and the loss function.
- approximator#
The approximator.
- loss_fn#
The loss function.
- loss_weights#
A list specifying scalar coefficients (Python floats) to weight the loss contributions. The loss value that will be minimized by the trainer will then be the weighted sum of all individual losses, weighted by the loss_weights coefficients.
- define_approximator(approximator)[source]#
Define the approximator.
- Parameters:
approximator (
Module) – The approximator.- Return type:
- losses_test(inputs, outputs, targets, **kwargs)[source]#
Return a list of losses for test dataset, i.e., constraints.
- losses_train(inputs, outputs, targets, **kwargs)[source]#
Return a list of losses for training dataset, i.e., constraints.