Loss

class dragon.vm.tensorflow.keras.losses.Loss(
  reduction='mean',
  name=None
)[source]

The base class for loss criterion.

__init__

Loss.__init__(
  reduction='mean',
  name=None
)[source]

Create a Loss criterion.

Parameters:
  • reduction ({'none', 'sum', 'mean', 'valid'}, optional) – The reduction method.
  • name (str, optional) – The operation name.

Methods

__call__

Loss.__call__(
  y_true,
  y_pred
)[source]

Compute the defined loss function.

Parameters:
Returns:

dragon.Tensor – The loss.