Function marian::cross_entropy

Function Documentation

Expr marian::cross_entropy(Expr a, Expr b, float labelSmoothingAlpha = 0.f, Type outputType = Type::float32)

Computes the cross-entropy loss.

See

CrossEntropyNodeOp

Parameters
  • labelSmoothingAlpha: The amount of label smoothing \(\alpha \in [0,1]\). Default is no smoothing, \(\alpha = 0 \).