Imported from https://github.com/orobix/Prototypical-Networks-for-Few-shot-Learning-PyTorch