add the crossEntropy function to compute the cross entropy