ytm.guided.backends.act_loss.SoftmaxCE#

class ytm.guided.backends.act_loss.SoftmaxCE(eps: float = 1e-7, weights: list[float] | ndarray | None = None)#

Bases: ActLoss

Softmax with cross-entropy, for single-label classification.

Parameters:
epsfloat, default=1e-7

Added inside the log, must be > 0.

weightsarray-like of float, default=None

Per-class weights, one per class. None weights every class by 1.