ytm.guided.backends.act_loss.SCE#

class ytm.guided.backends.act_loss.SCE(alpha: float = 1.0, beta: float = 1.0, eps: float = 1e-4, eps_hat: float = 1e-7)#

Bases: ActLoss

Softmax with symmetric cross-entropy (cross-entropy plus reverse cross-entropy), for noisy labels.

Parameters:
alphafloat, default=1.0

Weight of the cross-entropy term, must be >= 0.

betafloat, default=1.0

Weight of the reverse cross-entropy term, must be >= 0.

epsfloat, default=1e-4

Added to the targets inside the reverse term’s log, must be > 0.

eps_hatfloat, default=1e-7

Added to the predictions inside the cross-entropy log, must be > 0.