Imported from https://github.com/cvqluu/GE2E-Loss
