Imported from https://github.com/google-research/google-research/tree/master/mutual_information_representation_learning