Skip to content

Commit 9f0f9d4

Browse files
committed
Add example of TrainDataloaderIter and ValDataloaderIter usage
1 parent e146070 commit 9f0f9d4

File tree

4 files changed

+477
-16
lines changed

4 files changed

+477
-16
lines changed

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[flake8]
22
max-line-length = 88
33
extend-ignore = E203
4+
per-file-ignores = __init__.py:F401

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ lr_finder.reset()
7070
- `LRFinder.range_test()` will change the model weights and the optimizer parameters. Both can be restored to their initial state with `LRFinder.reset()`.
7171
- The learning rate and loss history can be accessed through `lr_finder.history`. This will return a dictionary with `lr` and `loss` keys.
7272
- When using `step_mode="linear"` the learning rate range should be within the same order of magnitude.
73+
- `LRFinder.range_test()` expects a pair of `input, label` to be returned from the `DataLoader` objects passed to it. The `input` must be ready to be passed to the model and the `label` must be ready to be passed to the `criterion` without any further data processing/handling/conversion. If you find yourself needing a workaround you can make use of the classes `TrainDataLoaderIter` and `ValDataLoaderIter` to perform any data processing/handling/conversion inbetween the `DataLoader` and the training/evaluation loop. You can find an example of how to use these classes in [examples/lrfinder_cifar10_dataloader_iter](examples/lrfinder_cifar10_dataloader_iter.ipynb).
7374

7475
## Additional support for training
7576

0 commit comments

Comments
 (0)