l1 and l2 both have logarithm of a value less then 1 and some other constants. Hence they will have the same sign.
It should work as it is almost same as Categorical CrossEntropy and concept is taken from a recent CVPR research paper. I think there is some flaw in implementation.
If I put ro=1, then it will become Categorical CrossEntropy. Am I correct?