Raise friendly errors in case of `num_epochs` is less than `num_warmup_epochs` in CIFAR10 and Transformers examples
See original GitHub issueI was trying to benchmark torch.inference_mode
vs torch.no_grad
on CIFAR10 example, so I just wanted to run for 3 epochs and average the benchmarks, the default warmup epochs is 4, so the scheduler will raise this error, which is not very clear to new users
f"Milestones should be increasing integers, but given {pair[0]} is smaller "
ValueError: Milestones should be increasing integers, but given 291 is smaller than the previous milestone 388
So I suggest to check num_epochs
vs num_warmup_epochs
inside run
method and raise more clear error message for the users.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Let's train vision transformers (ViT) for cifar 10! - GitHub
Let's train vision transformers for cifar 10! This is an unofficial and elementary implementation of An Image is Worth 16x16 Words: Transformers for...
Read more >arXiv:2104.05704v4 [cs.CV] 7 Jun 2022
This allows for a Transformer based model to be trained from scratch on small datasets like CIFAR-10 and CIFAR-100, providing competitive ...
Read more >CIFAR-10 Benchmark (Image Classification) - Papers With Code
Rank Model Percentage correct PARAMS Year Tags
1 efficient adaptive ensembling 99.612 2022
2 ViT‑H/14 99.5 632M 2020 Transformer
3 µ2Net (ViT‑L/16) 99.49 2022
Read more >Exploring the Limits of Out-of-Distribution Detection
The paper especially focuses on the case where in-distribution (InD) and OOD samples are close to each other (near OOD) (e.g. when CIFAR100...
Read more >Quantum Error Correction and Fault Tolerance – Part 2
Terry Rudolph and Naomi Nickerson from PsiQuantum describe how to build a practical measurement-based quantum computer during a series of ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey @KickItLikeShika, I think adding an assertion can solve this issue. Can you assign this to me?
Hey @himanshu007-creator, thanks a lot for showing interest, we have these 2 examples:
in both, if the num_epochs is less the num_warmup_epochs, the error in the description will be raised, we want to check inside the
run
method in both examples, ifnum_epochs
is less thannum_warmupds_epochs
we should raise a friendly error message explaining what’s the error and why, and what the user should do (either increase thenum_epochs
or decreasenum_warmup_epochs
)