set the template of Function for Cross Entropy