How can I move the dataloader from CPU to CUDA before starting training loop. #659
Unanswered
DeepNeuralDog
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @mrdbourke
I want to move the dataloader from CPU to CUDA before starting training loop**.(For dataloader: num_worker=2, pin_memory=True)
If I move the the input every time (cpu to gpu) for each epoch, my training time gets too much high(it is really really slow)
So I coded like this:
Is there any easy fix?
Beta Was this translation helpful? Give feedback.
All reactions