-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
data formatRelated to the zea data format saving and loadingRelated to the zea data format saving and loadingefficiencyImprovements made regarding code or tests efficiencyImprovements made regarding code or tests efficiency
Description
Any dataloaders that use the H5Generator are effectively singlethreaded and cpu-bound:
Line 376 in 2a3a9a6
| def iterator(self): |
Either I am completely misunderstanding the situation, but as far as I know:
tf.data.Dataset.from_generator(image_extractor, ...)
Means that next() runs in Python. This gives the pipeline:
GPU waits → Python → h5py → Python → TF → GPU
and num_workers, AUTOTUNE, prefetch, and batch have no effect in speeding this up.
Currently, I'm training an RF-data VAE that's taking 7s to load a batch, and 120ms to do the forward and backward pass which is why I cannot use the zea dataloader.
I understand that fixing this is quite a large task as there are many dependencies, but it would be good to look into at some point.
Reactions are currently unavailable
Metadata
Metadata
Labels
data formatRelated to the zea data format saving and loadingRelated to the zea data format saving and loadingefficiencyImprovements made regarding code or tests efficiencyImprovements made regarding code or tests efficiency