TripleCartesianProd#

class pinnx.problem.TripleCartesianProd(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 ordered pair of the first two elements are created from a Cartesian product of the first two lists. If we compute the Cartesian product of the first two arrays, then we have a TripleDataset dataset.

This dataset can be used with the network DeepONetCartesianProd for operator learning.

Parameters:
  • X_train – A tuple of two NumPy arrays. The first element has the shape (N1, dim1), and the second element has the shape (N2, dim2).

  • y_train – A NumPy array of shape (N1, N2).

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.