CPC / InfoNCE
Representation Learning with Contrastive Predictive Coding
Aaron van den Oord, Yazhe Li, Oriol Vinyals · arXiv 2018
Identify the positive among sampled candidates and implement the stable InfoNCE classification objective.
What you will implement
Implement logits-level InfoNCE with arbitrary positive positions, numerical and gradient checks, and synthetic candidate learning.
- 176. InfoNCE Positive-Candidate Classification
Implement stable InfoNCE from candidate logits, keeping the positive in the denominator and gradients for every candidate.
Implement one objective; input validation and a six-context CPU score-table optimization lab are provided.