Learning Structured Representations with Equivariant Contrastive Learning