Match a job Paths Subjects Questions Quizzes Pricing
Advanced Open Pro

Seeds Fixed, Validation Accuracy Still Differs Between Runs

A CNN training script calls torch.manual_seed(42) and nothing else. The config has cudnn.benchmark = True, a DataLoader with num_workers=8, a NumPy-based augmentation class that creates np.random.default_rng(0) inside __init__, and a data-parallel-free single A100. Five identical runs give final validation accuracies 91.2, 90.8, 91.5, 90.9, 91.1 (%). A colleague claims a new augmentation "improves accuracy by 0.2 points" because the mean of five runs went from 91.1 to 91.3.

  1. List every plausible source of run-to-run difference in this setup, grouped by what you can fix and what you cannot.
  2. Show exactly what you would change to make the run (near-) deterministic, and the cost.
  3. Is the 0.2-point claim supported? Compute the spread of the five runs and say what you would do.
  4. What does determinism buy you, and when should you not enable it?

Share this question

← Back to The PyTorch Training Loop from Scratch practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.