Recall & Review
beginner
What is batch size in machine learning training?
Batch size is the number of samples processed together before the model updates its weights. It controls how many examples the model sees at once.
Click to reveal answer
beginner
Why do we shuffle data during training?
Shuffling mixes the order of data samples to prevent the model from learning patterns based on the order. It helps the model generalize better.
Click to reveal answer
intermediate
How does a large batch size affect training speed and memory?
A large batch size speeds up training by processing more samples at once but uses more memory. It may also affect how well the model learns.
Click to reveal answer
intermediate
What is the effect of not shuffling data in each training epoch?
Not shuffling can cause the model to see data in the same order every time, which might lead to overfitting or poor generalization.
Click to reveal answer
beginner
In PyTorch, how do you enable shuffling when creating a DataLoader?
You set the argument
shuffle=True in the DataLoader constructor to shuffle data at every epoch.Click to reveal answer
What does batch size control during training?
✗ Incorrect
Batch size controls how many samples the model processes before updating its weights.
Why is shuffling data important during training?
✗ Incorrect
Shuffling prevents the model from learning patterns based on the order of data.
What happens if batch size is too large?
✗ Incorrect
Large batch sizes speed up training but require more memory.
In PyTorch DataLoader, how do you shuffle data?
✗ Incorrect
Setting shuffle=True enables shuffling of data each epoch.
What is a possible risk of not shuffling data during training?
✗ Incorrect
Not shuffling can cause the model to overfit or generalize poorly.
Explain what batch size is and how it affects training speed and memory.
Think about how many samples the model sees at once and what happens if you change that number.
You got /3 concepts.
Describe why shuffling data is important during training and how to enable it in PyTorch.
Consider what happens if data order stays the same every epoch.
You got /3 concepts.