How to write kl-divergence loss and cosine similarity loss by using symbol?

#1

How to write kl-divergence loss and cosine similarity loss by using symbol?
I want to measure the similarity of two feature map with (n, 2)->(n, 2).
Any advice will be appreciated, thanks