Tri-Directional Contrastive Learning