Can some one help me in implementing this loss function?

I was trying to build a multi class classification model on CIFAR-10 dataset and I was trying to build a loss function that was mentioned in this paper: Improved Loss Function for Image Classification

However, it seems that there is something wrong with my implementation.

Can someone help me, please?
This is the colab link: Google Colab

Thanks

@ibrahim97
You can debug your loss function by providing custom inputs and outputs. Compare the loss computed by this function and the actual value that you can compute manually for the custom inputs and outputs.