cross Entropy Loss From One Hot
fun crossEntropyLossFromOneHot(x: DTensor, oneHotLabels: DTensor): DScalar
Content copied to clipboard
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.