This one had three distinct failure modes packed into a single scenario and they wanted you to walk through all of them.
Start by systematically isolating each issue: verify data pipeline for distribution mismatch, inspect model architecture for output activation, and trace optimizer step for update loop. Then fix each in order of impact, validating with loss curves and metrics after each change.
Pro tip: Always check the simplest explanations first—like whether the optimizer is actually stepping—before diving into complex data or model issues. Use small, controlled experiments to confirm each fix.
Inspect how training and test data are loaded and preprocessed. Check for normalization differences, label leakage, or incorrect train/test split. Plot sample images and compare statistics.
Review the final layer activation. For denoising, the output should be unbounded (e.g., linear) if images are normalized, or sigmoid if in [0,1]. A softmax or ReLU at output would be wrong.
Check that gradients are computed, optimizer.step() is called, and gradients are zeroed. Ensure loss.backward() is called and parameters are updated. Print parameter values before/after step.
After each fix, run a short training loop and monitor loss. Ensure training loss decreases and eval loss is reasonable. Use a small subset for quick iteration.
Once basic training works, add logging, check for overfitting/underfitting, and tune hyperparameters. Compare denoised outputs visually to ensure quality.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.