Imported from https://github.com/Confusezius/selfsupervised_learning