Implement Contrastive Loss (InfoNCE) + CLIP Training Loop in PyTorch
Mediummodern-architecturesauto-graded
Build the InfoNCE contrastive loss and a CLIP-style training loop that aligns image and text embeddings.
Solve it
Check your answer
The grader verifies properties of your implementation, so a correct solution written differently from ours still passes.
pip install torchleet
from torchleet import check
check("contrastive-loss-clip", info_nce_loss, SimpleCLIP)