Fixed switch and test l2hingeloss
Fix the loss to follow the convention