crossEntropyLossFromOneHot

fun crossEntropyLossFromOneHot(x: DTensor, oneHotLabels: DTensor): 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.