enter image description here
This special loss function makes me confused. Whether I need to set the if else condition before each computes and how to implement this pena