Validate and fix the way the directional weighting the custom loss function behaves.
Validate and fix the way the directional weighting the custom loss function behaves.