PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/ML System Design/Luma AI

Debug MNIST denoiser training

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's competency in debugging neural network training pipelines, specifically assessing understanding of data preprocessing and distribution mismatch, normalization consistency, model output-range behavior, and optimization mechanics.

  • medium
  • Luma AI
  • ML System Design
  • Machine Learning Engineer

Debug MNIST denoiser training

Company: Luma AI

Role: Machine Learning Engineer

Category: ML System Design

Difficulty: medium

Interview Round: Technical Screen

How would you debug and fix a Colab notebook that trains a denoising neural network on MNIST so that (a) the training loss steadily decreases and (b) the evaluation loss is close to the training loss? Specifically: ( 1) Data: detect and correct a train/test distribution mismatch so the test set covers all digits 0–9, and ensure identical normalization statistics are applied to training and test data; ( 2) Model: remove or replace an inappropriate final ReLU so the output range supports negative values typical of the denoised signal; ( 3) Optimization: add the missing optimizer.zero_grad() and put backward() and optimizer.step() in the correct order. Describe the sanity checks, assertions, metrics, and minimal code changes you would use to validate each fix, and show the key code snippets.

Quick Answer: This question evaluates a candidate's competency in debugging neural network training pipelines, specifically assessing understanding of data preprocessing and distribution mismatch, normalization consistency, model output-range behavior, and optimization mechanics.

Luma AI logo
Luma AI
Jul 17, 2025, 12:00 AM
Machine Learning Engineer
Technical Screen
ML System Design
66
0

Debugging a Colab Denoising Network on MNIST

Goal: Make a Colab notebook that trains a denoising neural network on MNIST such that:

  • (a) the training loss steadily decreases, and
  • (b) the evaluation loss is close to the training loss.

You should identify and fix issues in three areas and describe how you validate each fix:

1) Data

  • Detect and correct a train/test distribution mismatch so the test set covers all digits 0–9.
  • Ensure the same normalization statistics (mean and std) computed from the training set are applied to both training and test data.

2) Model

  • Remove or replace an inappropriate final ReLU so the output range supports negative values typical of the denoised signal.

3) Optimization

  • Add the missing optimizer.zero_grad() and put backward() and optimizer.step() in the correct order.

For each of the three sections, describe:

  • Sanity checks and assertions you would add.
  • Minimal code changes and key code snippets.
  • Metrics you would track to validate the fix.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More ML System Design•More Luma AI•More Machine Learning Engineer•Luma AI Machine Learning Engineer•Luma AI ML System Design•Machine Learning Engineer ML System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.