Imported from https://github.com/mf1024/Contrastive-Predictive-Coding-for-Image-Recognition-in-PyTorch