Cross-Entropy Loss Implementation

Medium · ML Coding · 60 min

Implement numerically stable cross-entropy loss in NumPy, extending it with boolean masking, uniform label smoothing across all C classes, and analytical gradients with respect to logits.

This is a Pro problem. Pro unlocks the full prompt, a step-by-step walkthrough, a reference solution and tests you can run.

See Pro plans

More OpenAI problems