Defined in File loss.h
public marian::RationalLoss(Class RationalLoss)
public marian::MeanMultiRationalLoss(Class MeanMultiRationalLoss)
public marian::ScaledMultiRationalLoss(Class ScaledMultiRationalLoss)
public marian::SumMultiRationalLoss(Class SumMultiRationalLoss)
MultiRationalLoss: public marian::RationalLoss¶
Base class for multi-objective losses Base class for multi-objective losses which is a list of RationalLoss but also defines how to accumulate that list into a single RationalLoss.
Subclassed by marian::MeanMultiRationalLoss, marian::ScaledMultiRationalLoss, marian::SumMultiRationalLoss
MultiRationalLoss(const RationalLoss &rl)¶
push_back(const RationalLoss ¤t)¶
const RationalLoss &
accumulateLoss(const RationalLoss ¤t) = 0¶
Accumulation rule for losses In the default case this would just be a sum, see SumMultiRationalLoss, but there are special cases like ScaledMultiRationalLoss (scale other loses according to first label count) or MeanMultiRationalLoss (sum of means) where the accumulation is more complex.
accumulateCount(const RationalLoss ¤t) = 0¶
Accumulation rule for labels Similar as above, the naive case is summation, but for instance MeanMultiRationalLoss is including all label counts in the loss hence label counts are always just 1 which is passed through without summation or other modifications.