mindflow.pde.FlowWithLoss

class mindflow.pde.FlowWithLoss(model, loss_fn='mse')[source]

Base class of user-defined data-driven flow prediction problems.

Parameters
  • model (mindspore.nn.Cell) – A training or test model.

  • loss_fn (Union[str, Cell]) – Loss function. Default: "mse".

Raises
Supported Platforms:

Ascend GPU

get_loss(inputs, labels)[source]

Compute the loss of the model.

Parameters
  • inputs (Tensor) – The input data of model.

  • labels (Tensor) – True values of the samples.