计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
clip_contrastive_objective【效率与协作】Compute CLIP-style normalized image/text similarity and symmetric InfoNCE loss for paired multimodal embeddings.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when implementing or checking the core CLIP training mechanism: paired image/text embeddings, L2 normalization, temperature-scaled cosine logits, and symmetric InfoNCE loss.
logit_scale.logits = logit_scale * image_norm @ text_norm.T.Run python tests/test_contrastive_objective.py.
A tiny batch confirms the mechanism but is not full-scale distributed CLIP pretraining.
Stress checks include unequal embedding magnitudes to confirm L2 normalization makes the contrastive mechanism scale-invariant before logits are computed.