-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
Calling TreeOfLifeClassifier.predict keeps every batch’s probability tensors on GPU memory until completion, so VRAM usage grows with dataset size. I'm using >10,000 images; this exhausts my 32GB-RTX5000 at about 65% of dataset predicted:
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 130.00 MiB...
Profiling shows that the create_probabilities_for_images helper keeps probability tensors on the device until the entire dataset finishes.
I fixed this by offloading each batch's probabilities to CPU with a tensor.detach().cpu() step before proceeding to the next. Submitted this as #144.
Metadata
Metadata
Assignees
Labels
No labels