Self-supervised Learning: Generative or Contrastive