ytm.guided.backends.act_loss.ASL#

class ytm.guided.backends.act_loss.ASL(gamma_pos: float = 0.0, gamma_neg: float = 4.0, clip: float = 0.05, eps: float = 1e-7)#

Bases: ActLoss

Sigmoid with asymmetric loss, for multi-label classification with many negatives.

Parameters:
gamma_posfloat, default=0.0

Focusing exponent of the positive term, must be >= 0.

gamma_negfloat, default=4.0

Focusing exponent of the negative term, must be >= 0.

clipfloat, default=0.05

Probability margin shifted off the negatives, in [0, 1). 0 turns it off.

epsfloat, default=1e-7

Clamps probabilities to [eps, 1 - eps], must be > 0.