Imported from https://github.com/rosinality/id-gan-pytorch