Code Reading — 400-line PyTorch Refactor

Medium · ML Coding · 60 min

Read a legacy global-state noisy-label classifier to trace tensor shapes and per-epoch matmul FLOPs, add a data-layer flag to filter unresolved -1 labels, refactor training and evaluation cleanly while matching baseline losses, and estimate matmul/bmm/attention costs.

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