Negative losses are ok. Optimizers minimise whatever function they’re fed so negative numbers are just pushed further negative. I like my loss to be positive and going to zero (call me mad) so in these cases I wrap the loss in an exp(loss) function.