Recall & Review
beginner
What is batching in machine learning?
Batching means splitting the dataset into small groups called batches. Models learn from one batch at a time instead of the whole dataset, which saves memory and speeds up training.
Click to reveal answer
beginner
Why do we shuffle data before training?
Shuffling mixes the data randomly. This helps the model learn better by preventing it from seeing data in the same order every time, which can cause bias.
Click to reveal answer
intermediate
How does batching affect training speed and memory?
Using batches allows the model to update weights more often and use less memory than training on the full dataset at once. Smaller batches use less memory but may be slower overall.
Click to reveal answer
beginner
What TensorFlow function helps to create batches and shuffle data?
The TensorFlow Dataset API uses
dataset.shuffle(buffer_size) to shuffle and dataset.batch(batch_size) to create batches.Click to reveal answer
intermediate
What is the effect of a larger shuffle buffer size in TensorFlow?
A larger shuffle buffer size means better random mixing of data but uses more memory. A small buffer may not shuffle well, causing less randomness.
Click to reveal answer
What does batching do during model training?
✗ Incorrect
Batching splits the dataset into smaller groups called batches for efficient training.
Why is shuffling data important before training?
✗ Incorrect
Shuffling prevents the model from learning patterns based on data order, improving generalization.
Which TensorFlow method is used to create batches?
✗ Incorrect
dataset.batch() groups data into batches for training.What happens if the shuffle buffer size is too small?
✗ Incorrect
A small shuffle buffer leads to poor mixing of data, reducing randomness.
How does batching affect memory usage?
✗ Incorrect
Batching loads small parts of data at a time, reducing memory needs.
Explain in your own words why batching and shuffling are important in training machine learning models.
Think about how a chef prepares ingredients in small bowls and mixes them well before cooking.
You got /4 concepts.
Describe how you would use TensorFlow Dataset API to prepare data with batching and shuffling.
Remember the order matters: shuffle first, then batch.
You got /4 concepts.