Skip to content

Commit f384f74

Browse files
committed
Added tutorial on data loading
1 parent 05eb5dc commit f384f74

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/data_loading.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The `online_loading`, `image_pre_loading` and `embedding_pre_loading` settings are only related to the `linear_probing` and `segmentation` tasks (only tasks involving some training -- either linear probe or segmentation decoder), and should not have an impact on the final performance. We provide this `--loading-mode` flag to give more flexibility to the user in terms of the data loading:
2+
3+
* `online_loading`: batch images are loaded online during training and you perform encoder forward passes.
4+
* `image_pre_loading`: all images are first loaded into RAM and you also perform encoder forward passes.
5+
* `embedding_pre_loading`: pre-computed embeddings are loaded and no forward pass with the encoder is performed. **Requires to first have pre-computed embeddings with the `pre_computing_embeddings` task.**
6+
7+
`online_loading` and `image_pre_loading` might be needed in special cases, e.g. if you want to do some LoRA adaptation of the encoder. However, if your goal is to do standard linear probing evaluation, we would suggest to first pre-compute embeddings (e.g. `thunder benchmark h0mini patch_camelyon pre_computing_embeddings`), before to run `linear_probing` with `--loading-mode=embedding_pre_loading` (e.g. `thunder benchmark h0mini patch_camelyon linear_probing --loading-mode=embedding_pre_loading`) to speed up your experiments.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ nav:
2323
- Leaderboards: leaderboards.md
2424
- Tutorials:
2525
- Getting Started: getting_started.md
26+
- Data Loading (Linear Probing & Segmentation): data_loading.md
2627
- Examples: examples.md
2728
- Benchmarking a Custom Model: custom_model.md
2829
- Benchmarking on a Custom Dataset: custom_dataset.md

0 commit comments

Comments
 (0)