Contrastive learning can be applied to both supervised as well as self-supervised settings.