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

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