dacapo.experiments.tasks.losses.dummy_loss

Module Contents

Classes

DummyLoss

A class representing a dummy loss function that calculates the absolute difference between each prediction and target.

class dacapo.experiments.tasks.losses.dummy_loss.DummyLoss

A class representing a dummy loss function that calculates the absolute difference between each prediction and target.

Inherits the Loss class.

compute(prediction, target, weight=None)

Calculate the total loss between prediction and target.

compute(prediction, target, weight=None)

Method to calculate the total dummy loss.

Parameters:
  • prediction (float or int) – predicted output

  • target (float or int) – true output

  • weight (float or int, optional) – weight parameter for the loss, by default None

Returns:

Total loss calculated as the sum of absolute differences between prediction and target.

Return type:

float or int