TripleDataset#

class pinnx.problem.TripleDataset(X_train, y_train, X_test, y_test, approximator=None, loss_fn='MSE', loss_weights=None)[source]#

Dataset with each data point as a triple.

The couple of the first two elements are the input, and the third element is the output. This dataset can be used with the network DeepONet for operator learning.

Parameters:
  • X_train – A tuple of two NumPy arrays.

  • y_train – A NumPy array.

References

L. Lu, P. Jin, G. Pang, Z. Zhang, & G. E. Karniadakis. Learning nonlinear operators via DeepONet based on the universal approximation theorem of operators. Nature Machine Intelligence, 3, 218–229, 2021.

losses(inputs, outputs, targets, **kwargs)[source]#

Return a list of losses, i.e., constraints.

test()[source]#

Return a test dataset.

train_next_batch(batch_size=None)[source]#

Return a training dataset of the size batch_size.