Possible working version of HingeLoss