Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT: make
ValDataLoaderIter
able to be reset only when it is
acquired by the syntax of normal `iterator` In `LRFinder.range_test()`, `val_iter` won't be reset after it runs out of values, and it makes `LRFinder._validate()` failed to work correctly after the first iteration of `range_test()`. To fix it, we add a counter to count the times a `ValDataLoaderIter` has run (i.e. times of `__next__()` is called). And reset it only when its `__iter__()` is called. So that it won't be reset automatically like the way `TrainDataLoaderIter` works. See also davidtvs#59 and the docstring of `ValDataLoaderIter` for further details.
- Loading branch information