Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

speed up activations retrieval #41

Open
mschrimpf opened this issue Oct 23, 2020 · 0 comments
Open

speed up activations retrieval #41

mschrimpf opened this issue Oct 23, 2020 · 0 comments

Comments

@mschrimpf
Copy link
Member

mschrimpf commented Oct 23, 2020

when we started writing model-tools, we were primarily thinking of neuroscience stimulus sets with only a couple thousand images. Speed was therefore less of an issue because even with a suboptimal implementation, a few k images are quickly passed through the network.

We are now evaluating models on increasingly large ML benchmarks (e.g. brain-score/vision#232) and due to the slow activations retrieval, the evaluation takes very long (days), sometimes timing out on the cluster. We therefore need to speed up the activations extraction.

Models are already using cuda when possible, I believe the main bottleneck is actually the loading of images which is currently single-threaded. We should profile the code to confirm this and (if true) use multiple workers to load the images to pass into the model (e.g. here and here for pytorch, ideally using existing tools such as DataLoader).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant