Courseiva
ModelinghardMultiple ChoiceObjective-mapped

MLS-C01 Modeling Practice Question

A data scientist trains a neural network using TensorFlow on SageMaker. The training job fails with a 'CUDA out of memory' error. What is the most likely cause and solution?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The model is too large for the GPU. Use a smaller batch size.

CUDA out of memory indicates that the GPU memory is insufficient for the batch size or model size. Reducing the batch size is a common fix. Switching to CPU is not ideal for deep learning. Increasing the number of instances may help but requires distributed training setup. Upgrading to a larger instance type is another option, but reducing batch size is simpler.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The dataset is too large. Use SageMaker Pipe mode.

    Why it's wrong here

    Pipe mode streams data but doesn't reduce GPU memory for model parameters.

  • The model is too large for the GPU. Use a smaller batch size.

    Why this is correct

    Reducing batch size decreases memory usage.

  • The training script has a bug. Use SageMaker Debugger.

    Why it's wrong here

    Debugger helps with debugging but not directly with memory error.

  • The instance type is insufficient. Use distributed training across multiple instances.

    Why it's wrong here

    Distributed training across multiple instances does not resolve a single GPU’s memory exhaustion because TensorFlow’s default data parallelism replicates the entire model on each device; each instance still attempts to load the full model and batch into its own GPU memory, so the same out-of-memory error persists on every node. This option is tempting because distributing workloads is a common remedy for scaling compute capacity, and it would be correct if the bottleneck were insufficient total throughput or training time rather than per-device memory limits.

About these practice questions

One of 1,672 original MLS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.