0
0
PyTorchml~5 mins

StepLR and MultiStepLR in PyTorch - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is StepLR in PyTorch?
StepLR is a learning rate scheduler that decreases the learning rate by a fixed factor every set number of epochs. It helps the model learn more slowly as training progresses.
Click to reveal answer
intermediate
How does MultiStepLR differ from StepLR?
MultiStepLR decreases the learning rate at specific epochs (called milestones) instead of fixed intervals. This allows more control over when the learning rate changes.
Click to reveal answer
beginner
What parameters do you need to provide to StepLR?
You need to provide the optimizer, step_size (number of epochs between each decrease), and gamma (the factor to multiply the learning rate by).
Click to reveal answer
beginner
What are milestones in MultiStepLR?
Milestones are a list of epoch numbers where the learning rate will be decreased by multiplying with gamma.
Click to reveal answer
beginner
Why use learning rate schedulers like StepLR or MultiStepLR?
They help the model converge better by reducing the learning rate over time, which can improve accuracy and prevent overshooting the best solution.
Click to reveal answer
What does StepLR do to the learning rate?
AKeeps it constant
BIncreases it gradually
CRandomly changes it
DReduces it by a fixed factor every few epochs
In MultiStepLR, what are milestones?
ANumber of batches per epoch
BEpochs where learning rate changes
CInitial learning rates
DLoss values
Which parameter controls how much the learning rate decreases in StepLR?
Agamma
Bstep_size
Cmilestones
Dmomentum
If you want to reduce learning rate at epochs 30 and 80, which scheduler is best?
AStepLR
BNo scheduler
CMultiStepLR
DExponentialLR
What is the main benefit of using learning rate schedulers?
AImprove model convergence and accuracy
BPrevent model from learning
CIncrease model size
DFaster training without accuracy loss
Explain how StepLR works and what parameters it needs.
Think about a clock ticking every few epochs to reduce learning rate.
You got /3 concepts.
    Describe the difference between StepLR and MultiStepLR and when you might use each.
    Compare fixed steps vs chosen milestones.
    You got /4 concepts.