Imported from https://github.com/zsef123/Large_Margin_Loss_PyTorch
