crossEntropyLoss

fun crossEntropyLoss(x: DTensor, labels: DTensor, fromOneHot: Boolean = false): DScalar

x is the output of the network: xi,j is its guess on whether input i is classified as a j. labels is the actual label: labelsi,j is 1 iff input i is classified as a j; 0 otherwise.