Skip to main content

//clika-runtime/io.clika.runtime/Ops/klDiv

klDiv

[common]
fun klDiv(input: Tensor, target: Tensor, reduction: Reduction = Reduction.MEAN, logTarget: Boolean = false): Tensor

klDiv(input: Tensor, target: Tensor, reduction: Reduction = Reduction.MEAN, logTarget: Boolean = false): the kl_div operator. Kullback–Leibler divergence loss. input is given in LOG space; target is probabilities unless log_target is set (then both are logs):